Solid Edge Part Type Library
GetFacesByAreaOfBody Method
Specify Area.
Returns total number of faces.
Returns array of faces less than specified value.
Returns array of surface area of faces.
Description
Returns array of Faces and their respective area.
Syntax
Visual Basic
Public Sub GetFacesByAreaOfBody( _
   ByVal dAreaLessThan As Double, _
   ByRef NumFaces As Long, _
   ByRef ByAreaFaces() As Object, _
   ByRef SurfaceAreaOfFaces() As Double _
) 
Parameters
dAreaLessThan
Specify Area.
NumFaces
Returns total number of faces.
ByAreaFaces
Returns array of faces less than specified value.
SurfaceAreaOfFaces
Returns array of surface area of faces.
Example
Imports System.Runtime.InteropServices
Public Class GetFacesByAreaOfBody

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objDoc As SolidEdgePart.PartDocument = Nothing
        Dim objModels As SolidEdgePart.Models = Nothing
        Dim objModel As SolidEdgePart.Model = Nothing
        Dim objType As Type = Nothing
        Dim dAreaLessThan As Double
        Dim NumFaces As Integer
        Dim ByAreaFaces(1) As Object
        Dim SurfaceAreaOfFaces(1) As Double
        dAreaLessThan = 0.2

        Try
            ' Create/get the application with specific settings
            objApplication = Marshal.GetActiveObject("SolidEdge.Application")

            If objApplication Is Nothing Then
                ' Get the type from the Solid Edge ProgID
                objType = Type.GetTypeFromProgID("SolidEdge.Application")
                ' Start Solid Edge
                objApplication = Activator.CreateInstance(objType)
                ' Make Solid Edge visible
                objApplication.Visible = True
            End If

            ' Get document
            objDoc = objApplication.ActiveDocument

            ' get the models collection
            objModels = objDoc.Models()
            objModel = objModels.Item(1)

            Call objModel.GetFacesByAreaOfBody(dAreaLessThan, NumFaces, ByAreaFaces, SurfaceAreaOfFaces)

        Catch ex As Exception
            MsgBox(ex.ToString)
        End Try
    End Sub
End Class
See Also

Model Object  | Model Members