TAGGED: mechanical, named-selection, script
-
-
July 14, 2023 at 3:05 pm
Karan Bhuta
SubscriberI want to select my entire geometry everytime even if I make changes in my spaceclaim. Can I do that?
-
July 14, 2023 at 3:35 pm
Erik Kostson
Ansys EmployeeHi
Can you explain more what you want to do?
And why do you need scripting?
The more info your provide the more feedback you can get from the forum users.
All the best
Erik
-
July 14, 2023 at 3:40 pm
Karan Bhuta
SubscriberI have made a script in spaceclaim that will change the dimensions of my geometry everytime I change a single input according to my requirement. Now I want to do analysis on that geometry using mechanical scripting. Now when I go back to hange my geometry in space claim and update the dimensions there, the selections made in mechanical needs to be made again manually. I want to know if there is a way I can script to make the selection automatically even when I update the geometry.
-
July 14, 2023 at 6:13 pm
Erik Kostson
Ansys EmployeeHi
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
-
July 14, 2023 at 7:32 pm
Karan Bhuta
SubscriberHi ,
Thank you for that tip it really helped. The face I have selected is kind of the end face and the changes I make in the spaceclaim script changes the end faces' position everytime which results in change in the face number that face. I want to select the end face every time, can I do that?
Â
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.Â

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Solver Pivot Warning in Beam Element Model
- Saving & sharing of Working project files in .wbpz format
- Understanding Force Convergence Solution Output
- User manual
- An Unknown error occurred during solution. Check the Solver Output…..
- What is the difference between bonded contact region and fixed joint
- The solver engine was unable to converge on a solution for the nonlinear problem as constrained.
- whether have the difference between using contact and target bodies
- Defining rigid body and contact
- Colors and Mesh Display
-
7680
-
4476
-
2957
-
1433
-
1322
© 2023 Copyright ANSYS, Inc. All rights reserved.