How To Use: Convert To SheetMetal With VB.NET2005

[ Edited ]


Hi all,

I am wrote a code that find the largest face in the active sheet metal

document body.

there is a ConvToSMs.add(RefFace,[],[],[],[])    function that need to get

RefFace and some optional args.

When I enter the largestFace  that I found I get Error Msg (atached to this


how should i define RefFace?

the code is:



SEconvertToSM(ByVal SMmodel As SolidEdgePart.Model)Dim SEbody As SolidEdgeGeometry.BodyDim SEfaces As SolidEdgeGeometry.FacesDim SEface As SolidEdgeGeometry.FaceDim SETopface As SolidEdgeGeometry.Face'Dim refFace As SolidEdgeFramework.Reference

SETopface = Nothing

SEbody = SMmodel.Body

SEfaces = SEbody.CreateCollection(SolidEdgeGeometry.TopologyCollectionTypeConstants.seFaceCollection)

SEfaces = SEbody.Faces(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryPlane)


 ForEach SEface In SEfacesIf SETopface IsNothingThen

SETopface = SEface


 If SEface.Area > SETopface.Area Then

SETopface = SEface




SEbody = Nothing

SEfaces = Nothing

SEface = Nothing

SETopface = Nothing



















Posted by: amir zeltzer
Post date: 11/29/2007 8:01:17 AM