How to use scripting features in ANSYS SpaceClaim to run your CAD design iterations
Ғылым және технология
This video will give you an initial glimpse of the feature, along with some basic tips and tricks about how to use it. SpaceClaim makes it easy, even for folks who don’t know its Python language well. The video goes further to show you how to create Parameters and Named Selections, which can ultimately feed a parametric simulation in ANSYS Workbench.
Get in touch:
Contact form: www.simutechgroup.com/contact-us
Email: info@simutechgroup.com
Phone: (844) 825-5971
www.simutechgroup.com
Get more ANSYS Tips & Tricks:
www.simutechgroup.com/trainin...
Learn more about our ANSYS consulting and testing services:
www.simutechgroup.com/consult...
Subscribe to our monthly newsletter:
go.simutechgroup.com/simutech-...
Subscribe to this channel:
/ @simutechgroup
Пікірлер: 41
Wow, wonderful video! Thank you. I have been trying to find this one for a long time.
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
@SimuTechGroup
2 жыл бұрын
Hi Deepak, so happy that we could help!
Superb! Thank you for putting this together. Really useful! 😊
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
Thank you for this detailed explanation. It is really helpful
@MattRidzonPE
6 жыл бұрын
Fabulous! Glad you found it useful!
Great content and Excellent Explanation
Very smooth and nice demo; Keep up the great work
@MattRidzonPE
5 жыл бұрын
Thank you for watching. I hope it helped you out!
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))```
Thank you very much!
Nice and easy. Thank you!
@MattRidzonPE
5 жыл бұрын
My pleasure!
Good video!!!
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.
This is great, you saved me! Awesome video and explanation
@MattRidzonPE
5 жыл бұрын
Awesome! I'm glad it helped you out!
@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
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)"?
Thank you so much 💖
@SimuTechGroup
3 жыл бұрын
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?
@lougvar
Жыл бұрын
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.
@SimuTechGroup
Жыл бұрын
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
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?
@SimuTechGroup
2 жыл бұрын
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
@lougvar
Жыл бұрын
Did you find the answer to your problem? I have the same issue:(
Is there a pdf documentation for Spaceclaim scripting ?
@MattRidzonPE
5 жыл бұрын
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!
@Flo-hu5jb
4 жыл бұрын
Copy your code, go on the left to groups, create script group, edit Script, paste your code :)
How does one assign material? Everytime I delete the solid and create a new one, Mechanical doesn't know which material to assign.
@SimuTechGroup
Жыл бұрын
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
Wow~!! no effort to understand you..~~Thank you
Thank you
Thank you
@MattRidzonPE
5 жыл бұрын
My pleasure!