Message 1 of 2
SurfaceBodies.Count = 0 ????
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I took a weldment and used the shrinkwrap tool to create an .ipt file. Then I applied an attribute to a face of the new part for future constraint use. Now when I get the component occurrence the oOcc.Definition.Type = kWeldmentComponentDefinitionObject. This works fine untill I try to iterate throught the faces of the part. If I use a message box to get SurfaceBodies.Count, I get a return of 0. I manually open the part in question and the solid bodies folder contains one solid. Can someone tell me where I'm going wrong?
Dim oWeldCompDef As WeldmentComponentDefinition
oWeldCompDef = oOcc.Definition For I = 1 To oWeldCompDef.SurfaceBodies.Item(1).Faces.Count oFace = oWeldCompDef.SurfaceBodies.Item(1).Faces.Item(I) oSelSet.Select(oFace) ' Get the AttributeSets object from the selected entity. oAttribSets = oFace.AttributeSets ' Check to see if it has the "CCSC" attribute set. If oAttribSets.NameIsUsed("CCSC") Then ' Get the attribute set. oAttribSet = oAttribSets.Item("CCSC") ' Get the attribute on the set. oAttribute = oAttribSet.Item(oAttName) If oAttribute.Value = oAttValue Then MsgBox("Face: " & I) oOcc.CreateGeometryProxy(oFace, oFaceProxy) Exit For End If End If Next