Solid Edge Part Type Library
GetShorterEdgesOfBody Method
Edge should be shorter than this value.
Count of Shorter Edges will be returned.
Array of shorter edges will be returned.
Array of length of shorter edges will be returned.
Description
Returns array of edges and their respective length.
Syntax
Visual Basic
Public Sub GetShorterEdgesOfBody( _
   ByVal dEdgeShorterThan As Double, _
   ByRef NumShorterEdges As Long, _
   ByRef ShorterEdges() As Object, _
   ByRef EdgeLengthOfEdges() As Double _
) 
Parameters
dEdgeShorterThan
Edge should be shorter than this value.
NumShorterEdges
Count of Shorter Edges will be returned.
ShorterEdges
Array of shorter edges will be returned.
EdgeLengthOfEdges
Array of length of shorter edges will be returned.
Example
Imports System.Runtime.InteropServices
Public Class GetShorterEdgesOfBody

    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 dEdgeShorterThan As Double
        Dim NumShorterEdges As Integer
        Dim ShorterEdges(1) As Object
        Dim EdgeLengthOfEdges(1) As Double
        dEdgeShorterThan = 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.GetShorterEdgesOfBody(dEdgeShorterThan, NumShorterEdges, ShorterEdges, EdgeLengthOfEdges)

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

Model Object  | Model Members