Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
J-Camper
in reply to: sandeep_vaal

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.