Solid Edge Part Type Library
GetSpikeFacesOfBody Method
Specify width of Spike.
Returns number of spike faces.
Returns array of spike faces.
Returns width of spike faces.
Description
Returns array of Spike faces and their respective width.
Syntax
Visual Basic
Public Sub GetSpikeFacesOfBody( _
   ByVal dSpikeWidth As Double, _
   ByRef NumSpikeFaces As Long, _
   ByRef SpikeFaces() As Object, _
   ByRef WidthOfSpikeFaces() As Double _
) 
Parameters
dSpikeWidth
Specify width of Spike.
NumSpikeFaces
Returns number of spike faces.
SpikeFaces
Returns array of spike faces.
WidthOfSpikeFaces
Returns width of spike faces.
Example
Imports System.Runtime.InteropServices
Public Class GetSpikeFacesOfBody

    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 dSpikeWidth As Double
        Dim NumSpikeFaces As Integer
        Dim SpikeFaces(1) As Object
        Dim WidthOfSpikeFaces(1) As Double
        dSpikeWidth = 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.GetSpikeFacesOfBody(dSpikeWidth, NumSpikeFaces, SpikeFaces, WidthOfSpikeFaces)

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

Model Object  | Model Members