Community
Solved! Go to Solution.
Solved by A.Acheson. Go to Solution.
Hi @Mark_XD_UK
The solidbody info can be found under surfacebodies in the part component definition object. See help page here.
You can check between surfaces and solidbodies further if you need to.
Try this out.
Dim partDoc as PartDocument = ThisDoc.Document
Dim compDef as PartComponentDefinition = partDoc.ComponentDefinition
Dim count as Integer = compDef.SurfaceBodies.Count
Dim propertyName As String = "SolidBodyCount"
customPropertySet = partDoc.PropertySets.Item("Inventor User Defined Properties")
Dim prop As [Property]
Try
prop = customPropertySet.Item(propertyName)
Catch
' Assume error means not found
prop = customPropertySet.Add("", propertyName)
End Try
prop.Value = count
Can't find what you're looking for? Ask the community or share your knowledge.