Solid Edge Geometry Type Library
GetFaces Method
Specifies the number of parent faces.
Specifies the parent faces used to produce the CopySurface object.
Description
Returns the faces that are bounded by the current edge.
Syntax
Visual Basic
Public Sub GetFaces( _
   ByRef NumFaces As Long, _
   ByRef Faces() As Object _
) 
Parameters
NumFaces
Specifies the number of parent faces.
Faces
Specifies the parent faces used to produce the CopySurface object.
Remarks
This method returns the faces that are bounded by the referenced Edge object (at most two in the two-manifold situation).
Example
Private Sub Form_Load()
        Dim objSEApplication As SolidEdgeFramework.Application = Nothing
        Dim objPartDocument As SolidEdgePart.PartDocument = Nothing
        Dim objModels As SolidEdgePart.Models = Nothing
        Dim objModel As SolidEdgePart.Model = Nothing
        Dim objEdges As SolidEdgeGeometry.Edges = Nothing
        Dim objBody As SolidEdgeGeometry.Body = Nothing
        Dim objEdge As SolidEdgeGeometry.Edge = Nothing
        Dim numFaces As Long
        Dim objFaces(2) As Object
        Dim objFace As Object = Nothing

        Try

            ' Connect to a running instance of Solid Edge
            objSEApplication = GetObject(, "SolidEdge.Application")

            If objSEApplication Is Nothing Then
                objSEApplication = CreateObject("SolidEdge.Application")
                objSEApplication.Visible = True
            End If

            ' Get the Part document. It is expected to have a simple cube in the part document.
            objPartDocument = objSEApplication.ActiveDocument
            'Get Model
            objModels = objPartDocument.Models
            'Iterate through each Model
            For Each objModel In objModels
                'Get the body object
                objBody = objModel.Body
                ' Get the edges
                objEdges = objBody.Edges(SolidEdgeGeometry.FeatureTopologyQueryTypeConstants.igQueryAll)
                'Iterate through edges
                For Each objEdge In objEdges
                    Call objEdge.GetFaces(numFaces, objFaces)
                    numFaces = 0
                    'Iterate through each face
                    For Each objFace In objFaces

                    Next objFace
                Next objEdge
            Next objModel
        Catch ex As Exception
            MsgBox(ex.ToString)
        Finally
            objSEApplication = Nothing
            objPartDocument = Nothing
            objModels = Nothing
            objBody = Nothing
            objEdge = Nothing
        End Try
End Sub
See Also

Edge Object  | Edge Members