We’re putting the final touches on our new badges platform. Badge issuance remains temporarily paused, but all completions are being recorded and will be fulfilled once the platform is live. Thank you for your patience.

Ansys Learning Forum Forums Discuss Simulation General Mechanical Mechanical Scripting Reply To: Mechanical Scripting

Erik Kostson
Ansys Employee

Hi

One way I use is to scope say loads, etc. to named selections (ns) and not goemetry in Mechanical. In that way it all works.

To create a named selecton in Spaceclaim as an example of a body (first body in the tree) via script (or one can create the ns manualy inside Spaceclaim):

selection = BodySelection.Create(GetRootPart().Bodies[0])
secondarySelection = Selection.Empty()
resultns = NamedSelection.Create(selection, secondarySelection)

All the best

Erik