Hello, thanks for the information and video. I would like to add one more thing, we want to delete all the geometry drawn in the next step while the script is running and for this while GetRootPart().Components.Count > 0: GetRootPart().Components[0].Delete() while GetRootPart().Bodies.Count > 0: GetRootPart().Bodies[0].Delete() while GetRootPart().Curves.Count >0: GetRootPart().Curves[0].Delete() code. If you add this code as an extra here, your Sketch Planes will also be deleted. while GetRootPart().DatumPlanes.Count >0: GetRootPart().DatumPlanes[0].Delete() otherwise you may be encounter an error
Can I create a script parameter in the left panel from typing in python code in the right panel, for example, I type something like "p = CreateScriptParameter(param_name, unit)"?
Hello, once I created my geometry using script (in which parameters are assigned to variables) and set up the model, I can't get the parametric design study to work. It works just fine for the parameters from mechanical (Load, etc) but my output does NOT change for changing the parameters affecting the geometry. I have to open spaceclaim (which will open without the script windows open), open new script (which is blank) load the script, change the parameters, and then run the script, solve for solution each time if I want to iterate through design changes. Any tips?
Hi Andrew, thank you for your comment. If you are interested in our training or mentoring services, please send us an email at info@simutechgroup.com or you can check out the learning hub here: www.ansys.com/services/ansys-learning-hub
Thank you for the comment, if you are interested in mentoring or consulting services, please send us an email at info@simutechgroup.com or you can check out the Ansys Learning Hub here: www.ansys.com/services/ansys-learning-hub
Very helpful video! Thank you for clear explanation and good examples! I'm also interested -- is there function to address to geometry objects -- for example, start line from the middle of previous line. Something like ```start = Point2D.Create(lineMiddle(Curve1))```
Hello, thank you for video it's very useful but I have one doubt. I have 4 same parts in a assembly all 4 parts I have to geometry clean up for each individual part it takes almost 20 min can you guide me how can I save clean up script and apply it for remaining 3 parts.
How can you call a SpaceClaim script from Workbench? Like how you can send a JS Script for the Mesher from a Workbench Journal, is there an equivalent for SpaceClaim?
Hi, I would like to ask a question about scdm scripting. I want to filter out all the faces in a particular plane, such as in the z = 5 plane, in which I can avoid using index such as GetRootPart().Components[8].Content.Bodies[0].Faces[1] or smart variable Face.5. If I use these forms, when I perform parametric modeling, it is likely that the original face ID will not be recognized because all geometric IDs are reassigned. I do not know how to implement this process.
Thank you for your comment lin. If you are interested in any of SimuTech Group's services like training, mentoring, or consulting please send us an email at info@simutechgroup.com or you can check out the Ansys Learning Hub here: www.ansys.com/services/ansys-learning-hub
Hi, do you know if and how can i use the design proprieties (like file name, path ecc) in a script? do you know if exist a full documentation of python scripts in SpaceClaim. My dream is to save 3 file (.scdoc, .dxf and .jpg) on press only one button and i need file name and a path. Thanks
Unfortunately, no. The documentation that is available is buried in the ANSYS installation directory and is very user-UNfriendly. I'm told they plan to improve the documentation, but it's not quite there yet. So at this point, someone who wants to use the feature, is mostly on their own and has to learn the hard way.
It is the best explanation, which removes the fear of scripting in Python. I know python still I was avoiding now I am working.....
Thanks
Hi Deepak, so happy that we could help!
Hello, thanks for the information and video. I would like to add one more thing, we want to delete all the geometry drawn in the next step while the script is running and for this
while GetRootPart().Components.Count > 0:
GetRootPart().Components[0].Delete()
while GetRootPart().Bodies.Count > 0:
GetRootPart().Bodies[0].Delete()
while GetRootPart().Curves.Count >0:
GetRootPart().Curves[0].Delete()
code.
If you add this code as an extra here, your Sketch Planes will also be deleted.
while GetRootPart().DatumPlanes.Count >0:
GetRootPart().DatumPlanes[0].Delete()
otherwise you may be encounter an error
Superb! Thank you for putting this together. Really useful! 😊
Wow, wonderful video! Thank you. I have been trying to find this one for a long time.
Great content and Excellent Explanation
Very smooth and nice demo; Keep up the great work
Thank you for watching. I hope it helped you out!
Thank you for this detailed explanation. It is really helpful
Fabulous! Glad you found it useful!
This is great, you saved me! Awesome video and explanation
Awesome! I'm glad it helped you out!
Good video!!!
Can I create a script parameter in the left panel from typing in python code in the right panel, for example, I type something like "p = CreateScriptParameter(param_name, unit)"?
Hello, once I created my geometry using script (in which parameters are assigned to variables) and set up the model, I can't get the parametric design study to work. It works just fine for the parameters from mechanical (Load, etc) but my output does NOT change for changing the parameters affecting the geometry. I have to open spaceclaim (which will open without the script windows open), open new script (which is blank) load the script, change the parameters, and then run the script, solve for solution each time if I want to iterate through design changes. Any tips?
Hi Andrew, thank you for your comment. If you are interested in our training or mentoring services, please send us an email at info@simutechgroup.com or you can check out the learning hub here: www.ansys.com/services/ansys-learning-hub
Did you find the answer to your problem? I have the same issue:(
How does one assign material? Everytime I delete the solid and create a new one, Mechanical doesn't know which material to assign.
Thank you for the comment, if you are interested in mentoring or consulting services, please send us an email at info@simutechgroup.com or you can check out the Ansys Learning Hub here: www.ansys.com/services/ansys-learning-hub
Nice and easy. Thank you!
My pleasure!
Very helpful video! Thank you for clear explanation and good examples!
I'm also interested -- is there function to address to geometry objects -- for example, start line from the middle of previous line. Something like
```start = Point2D.Create(lineMiddle(Curve1))```
Hello, thank you for video it's very useful but I have one doubt.
I have 4 same parts in a assembly all 4 parts I have to geometry clean up for each individual part it takes almost 20 min can you guide me how can I save clean up script and apply it for remaining 3 parts.
Thank you so much 💖
You are so welcome
How can you call a SpaceClaim script from Workbench? Like how you can send a JS Script for the Mesher from a Workbench Journal, is there an equivalent for SpaceClaim?
Hello! Did you find the solution?
Hi, I would like to ask a question about scdm scripting. I want to filter out all the faces in a particular plane, such as in the z = 5 plane, in which I can avoid using index such as GetRootPart().Components[8].Content.Bodies[0].Faces[1] or smart variable Face.5. If I use these forms, when I perform parametric modeling, it is likely that the original face ID will not be recognized because all geometric IDs are reassigned. I do not know how to implement this process.
Thank you for your comment lin. If you are interested in any of SimuTech Group's services like training, mentoring, or consulting please send us an email at info@simutechgroup.com or you can check out the Ansys Learning Hub here: www.ansys.com/services/ansys-learning-hub
Thank you very much!
@Mauro Vega, same with me I can't save script as group.
Hi, do you know if and how can i use the design proprieties (like file name, path ecc) in a script? do you know if exist a full documentation of python scripts in SpaceClaim.
My dream is to save 3 file (.scdoc, .dxf and .jpg) on press only one button and i need file name and a path.
Thanks
Thank you
My pleasure!
Is there a pdf documentation for Spaceclaim scripting ?
Unfortunately, no. The documentation that is available is buried in the ANSYS installation directory and is very user-UNfriendly. I'm told they plan to improve the documentation, but it's not quite there yet. So at this point, someone who wants to use the feature, is mostly on their own and has to learn the hard way.
cant save my script as group, HELP!
Copy your code, go on the left to groups, create script group, edit Script, paste your code :)
Wow~!! no effort to understand you..~~Thank you
Thank you
Thank you