TAGGED: displacement-condition, displacements, scripting
-
-
February 19, 2025 at 3:16 pm
ibike8now
SubscriberHello!
I am trying to get from Image two too image one with scripting. I am having trouble setting the I want to set the distance to tabular data and set the indipendant variable and X-axis to "Y" as seen in the 2nd phtot. The third photo is the script I have so far. Does anyone know the sintax?
Also does anyone know how I could inport data from an excel sheet into the tabular data? It says I have to use XML format but is there an easier way. I know I can attactch my excel file to the ansys workbench and define as variables. But i feel that since I have 250 variables it would be ineficent for displacment data. Your help would and advice wold be greatly appreciated!
-
February 19, 2025 at 3:21 pm
Erik Kostson
Ansys EmployeeHi
Try using script recording to record your actions and to convert those (that can be converted) to equivalent act mechanical scripts.
https://developer.ansys.com/blog/scripting-mechanical-engineers#:~:text=Scripting%20inside%20Mechanical&text=There%20are%20recording%20capabilities%20to,can%20be%20triggered%20on%2Ddemand.https://www.youtube.com/watch?v=Q0MpwVSiFGs
Also search the discuss forum where we should have examples of this and many other scripts (also post any script related in that dedicated forum).
https://discuss.ansys.com/
(an example is here say: https://discuss.ansys.com/discussion/3375/how-to-create-a-nodal-displacement-on-a-named-selection
https://discuss.ansys.com/discussion/119/define-tabular-force-through-mechanical-scripting)
All the best
Erik
-
- You must be logged in to reply to this topic.
-
1997
-
897
-
599
-
591
-
444
© 2025 Copyright ANSYS, Inc. All rights reserved.