Solid Edge Part Type Library
GetSmallFacesOfBody Method
Specify minimum Radius.
Returns total number of small faces.
Returns array of faces smaller than specified radius.
Returns array of size of small faces.
Description
Returns array of small faces and their respective sizes.
Syntax
Visual Basic
Public Sub GetSmallFacesOfBody( _
   ByVal dFitInRadius As Double, _
   ByRef NumSmallFaces As Long, _
   ByRef SmallFaces() As Object, _
   ByRef SizeOfSmallFaces() As Double _
) 
Parameters
dFitInRadius
Specify minimum Radius.
NumSmallFaces
Returns total number of small faces.
SmallFaces
Returns array of faces smaller than specified radius.
SizeOfSmallFaces
Returns array of size of small faces.
Example
Imports System.Runtime.InteropServices
Public Class GetSmallFacesOfBody

    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 dFitInRadius As Double
        Dim NumOfSmallFaces As Integer
        Dim SmallFaces(1) As Object
        Dim SizeOfSmallFaces(1) As Double
        dFitInRadius = 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.GetSmallFacesOfBody(dFitInRadius, NumOfSmallFaces, SmallFaces, SizeOfSmallFaces)

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

Model Object  | Model Members