-
-
March 22, 2024 at 3:37 pm
Bjørn Hartmann
SubscriberHi,
I am quite new to spaceclaim and spaceclaim scripting. I am trying to build a parametrized script to generate a geometry, which i think will be valuable considering the number of very similar models i build.
However, I am having a hard time getting around selection the variables in my model (curves, points, surfaces ...) without having to use something like
index = [GetRootPart().Curves[i].GetName() for i in range(len(GetRootPart().Curves))].index(name) and then GetRootPart().Curves[index].GetChildren[ICurvePoint]()[0]....Is there no direct way for me to assign a named curve for example to a parameter?
 -
March 26, 2024 at 9:36 am
Atharv Joshi
Ansys EmployeeHi Hartmann,Â
You can try creating a named selection and then use the below command to set the selection.
Curve is selected and added as a named selection Group 1.curve=Selection.CreateByGroups("Group1")Â
Please refer to this course on Scripting in Ansys Discovery where is covers various selection. Ansys Discovery Scripting - Access Objects | Ansys Courses
Thanks and Regards
Atharv
-
- The topic ‘Spaceclaim Scripting – Accessing model elements smarter’ is closed to new replies.
-
3467
-
1057
-
1051
-
918
-
896
© 2025 Copyright ANSYS, Inc. All rights reserved.