SurfaceBodies.Count = 0 ????

SurfaceBodies.Count = 0 ????

herrwolf1
Enthusiast Enthusiast
411 Views
1 Reply
Message 1 of 2

SurfaceBodies.Count = 0 ????

herrwolf1
Enthusiast
Enthusiast

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

 

 

 

 

 

0 Likes
412 Views
1 Reply
Reply (1)
Message 2 of 2

herrwolf1
Enthusiast
Enthusiast

Please disregard this post. Chalk this up to severe case of head in rear syndrome.

0 Likes