See above.
One important thing to understand with geometry in Mechanical : there are two sorts of "geometry" with different sets of IDs:
ExtAPI.DataModel.Project.Model.Geometry.Children
ExtAPI.DataModel.GeoData
There are ways to get the IDs of the geodata geometry from the tree geometry and the other way around:
my_tree_body = ExtAPI.DataModel.Project.Model.Geometry.GetBody(my_geobody) my_geo_body = my_tree_body.GetGeoBody()