Getting a Mechanical.Body from a Geometry.GeoBodyWrapper
Options
![Rajesh Meena](https://us.v-cdn.net/6037473/uploads/userpics/8IRLMH8K2LS8/nBCQY517BQ4NA.jpeg)
Rajesh Meena
Moderator, Employee Posts: 80
![Solution Developer Community of Practice Member](https://us.v-cdn.net/6037473/uploads/badges/274G8C56SBE6.png)
![Ansys Employee](https://us.v-cdn.net/6037473/uploads/badges/RVRDV39KPJ91.png)
Best Answer
-
One can use below snippet for the same:
BW = ExtAPI.SelectionManager.CurrentSelection.Entities[0] #GeoBodyWrapper
DataModel.Project.Model.Geometry.GetBody(BW)1
Answers
-
I have a very simple question: We need to get some bodies from a .CurrentSelection (ids pointing to GeoBodyWrappers) and perform some operations (individual mesh, ...)
The problem is that i'm not able to retrieve the Mechanical.Body obj from the Wrapper, but it works in the inverse way (Mechanical.Body.GetGeoData()).
Is there a way to do this? Before trying with some filtering over the IDs.0