-
-
May 2, 2023 at 10:13 am
akash.purushothaman
SubscriberWhenever an entity is selected in Ansys Mechanical, it's information is shown in the Selection Information Tab.
I would like to know how to access the Selection Information tab using Iron Python, so I would like to extract data from the table or can export the data to a text file.
Thanks
-
May 2, 2023 at 11:53 am
Erik Kostson
Ansys EmployeeHi
Selection Information data can not be accessed via act scripting.
The best way to do this, is to do/run as follows (once a face is selected run script – script can be changed to look on body or edge information)
face_sel = ExtAPI.SelectionManager.CurrentSelection
faceIds=[]
geometry = ExtAPI.DataModel.GeoData
assemblies = geometry.Assemblies
for assembly in assemblies:
assembly_name = assembly.Name
parts = assembly.Parts
parts_count = parts.Count
for part in parts:
part_name = part.Name
bodies = part.Bodies
bodies_count = bodies.Count
for body in bodies:
faces = body.Faces
faces_count = faces.Count
for face in faces:
fid=face.Id
try:
if fid == face_sel.Ids[0]:
print(“exist : face ” + str(fid))
faceIds.append(fid)
print(face.Area)
print(“X: ” + str(face.Centroid[0]))
print(“Y: ” + str(face.Centroid[1]))
print(“Z: ” + str(face.Centroid[2]))
print(body.Name)
print(face.SurfaceType)
print(face.Id)
except:
print(“Select a face!”)-
May 4, 2023 at 5:02 am
akash.purushothaman
SubscriberHi,
But I am looking for a method to access the data in the table shown below.
This tab of Selection Information is activated when an entity is selected.
In manual process, we select the required nodes and in the Selection Information Tab, we change the coordinate system to get the transformed coordinates to a different system.
I am trying to achieve the same through ACT
-
-
- 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
- An Unknown error occurred during solution. Check the Solver Output…..
- What is the difference between bonded contact region and fixed joint
- User manual
- 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
- material damping and modal analysis
- Colors and Mesh Display
-
5290
-
3311
-
2471
-
1308
-
1016
© 2023 Copyright ANSYS, Inc. All rights reserved.