TAGGED: Discovery AIM, scripting
-
-
July 16, 2019 at 6:46 am
sjyu
SubscriberHi, I want to use command to operate the body in AIM(such as assign material for "BODY 2"). and what I have is the selection set of surface(such as "selectionSet2").
So how can I get the body name by this surface selection set or some surface?
Thanks!
-
July 16, 2019 at 9:10 am
Naresh Patre
Ansys EmployeeHello Frank
I will have to check it.
-
July 17, 2019 at 7:27 am
Naresh Patre
Ansys EmployeeHello Frank
Please refer below code:
model = Study.GetModel(Name="Model 1", Container="Study")
allss=Study.GetAllSelectionSets() # access all selection sets
loc = allss[0].Location # access face of1st selection set ("Selection Set 1")
print loc
parentBody = Study.GetEntityBodies(TopologyString=loc[0], Model = model) # access parent body of face
print parentBody
-
July 17, 2019 at 8:28 am
sjyu
SubscriberNaresh Patre thank you very much!
it is workable.
How can I find this function by myself(like function: GetEntityBodies)? Is there some API reference for AIM?
Thanks!
-
-
July 19, 2019 at 9:49 am
Naresh Patre
Ansys EmployeeHello Frank
Several functions of "Study" object are described in Help document under Customization Suite 2019 R2 - ANSYS AIM and Workbench Scripting Guide - Data Containers - Study. However, functions like GetEntityBodies are not mentioned. But you get get a list of all functions under Study object by executing dir(Study) command.
-
July 19, 2019 at 11:20 am
sjyu
SubscriberNaresh Patre thank you very much!
-
-
- 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.
-
3850
-
2613
-
1853
-
1246
-
600
© 2023 Copyright ANSYS, Inc. All rights reserved.