men8th
Nuclear
- Jul 1, 2016
- 19
Hi,
I am trying to write a macro to determine if an entity (face, vertex, surface etc.) which a user has selected is part of a solid body (ie an item which is a member of the solid bodies folder at the top of the feature tree) or if it is part of a surface (ie an item which is a member of the surface bodies folder at the top of the design tree).
Can anybody point me in the right direction? Ideally there would be a "GetParentBodyType" method, or similar, which can be run on the selected entity.
I have this so far:
Set swRefFeature = swSelMgr.GetSelectedObject6(1, -1) 'Get a pointer to the selected geometry
What I'd like is
<pseudo code>
If swRefFeatre.GetParentBodyType <> swSolidBody Then
<end of pseudo code
I am trying to write a macro to determine if an entity (face, vertex, surface etc.) which a user has selected is part of a solid body (ie an item which is a member of the solid bodies folder at the top of the feature tree) or if it is part of a surface (ie an item which is a member of the surface bodies folder at the top of the design tree).
Can anybody point me in the right direction? Ideally there would be a "GetParentBodyType" method, or similar, which can be run on the selected entity.
I have this so far:
Set swRefFeature = swSelMgr.GetSelectedObject6(1, -1) 'Get a pointer to the selected geometry
What I'd like is
<pseudo code>
If swRefFeatre.GetParentBodyType <> swSolidBody Then
'do some stuff
End If<end of pseudo code