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 objApp As SolidEdgeFramework.Application
    Dim objDoc As SolidEdgepart.PartDocument
    Dim objBody As SolidEdgeGeometry.Body
    Dim objEdge As SolidEdgeGeometry.Edge
    Dim objFaces(1 To 2) As SolidEdgeGeometry.Face
    Dim lngNumFaces As Long
    ' Report errors
    Const PI = 3.14159265358979
    ' Create/get the application with specific settings
    On Error Resume Next
    Set objApp = GetObject(, "SolidEdge.Application")
    If Err Then
        Err.Clear
        Set objApp = CreateObject("SolidEdge.Application")
        Set objDoc = objApp.Documents.Add("SolidEdge.PartDocument")
        objApp.Visible = True
    Else
        Set objDoc = objApp.ActiveDocument
    End If
    ' creating the base feature
    If CreateModel(objDoc) <> "" Then
        MsgBox "Error creating the model"
        Exit Sub
    End If
    ' getting the body object of the model
    Set objBody = objDoc.Models(1).Body
    'getting an edge from the collection of edges of the body
    Set objEdge = objBody.Edges(EdgeType:=igQueryAll).Item(1)
    ' getting the collection of faces and the number of faces connected by an edge
    Call objEdge.GetFaces(NumFaces:=lngNumFaces, Faces:=objFaces)
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objBody = Nothing
    Set objEdge = Nothing
End Sub
See Also

Edge Object  | Edge Members

Send comments on this topic.