09-17-2021
05:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-17-2021
05:25 AM
If you don't want to change the model to be actual separate bodies, then you have to look at the FaceShells of the solid body.
simple sample:
Dim pDef As PartComponentDefinition = TryCast(ThisApplication.ActiveDocument.ComponentDefinition, PartComponentDefinition)
If IsNothing(pDef) Then Exit Sub
Dim oBody As SurfaceBody = pDef.SurfaceBodies.Item(1)
MessageBox.Show(oBody.FaceShells.Count)
If you have hollow parts then you will have loop through All FaceShells to look out for Void FaceShells [FaceShell Object], but if not then Count should be sufficient.