Import geometry in SpaceClaim from project schematic
Pernelle Marone-Hitz
Member, Moderator, Employee Posts: 871
✭✭✭✭
What is the script to run at the project page level that will create a Static Structural component system, and then open SpaceClaim to import a geometry file?
Tagged:
0
Answers
-
The following code can be used:
myTemplate = GetTemplate(TemplateName="Static Structural",Solver="ANSYS") mySystem = myTemplate.CreateSystem() CADfile = r"C:\Users\dummyFolder\dummyGeomFile.igs" geometry1 = mySystem.GetContainer(ComponentName="Geometry") geometry1.Edit(IsSpaceClaimGeometry=True) def importFile(fileName): myCommand="""DocumentInsert.Execute(r""" + """ + fileName + """ +""")""" return myCommand cmd = importFile(CADfile) geometry1.SendCommand(Language="Python", Command=cmd)
2