Solid Edge Part Type Library
GetTools Method
Description
Syntax
Visual Basic
Public Sub GetTools( _
   ByRef NumofTools As Long, _
   ByRef ToolsArray() As Object _
) 
Parameters
NumofTools
ToolsArray
Example
Imports System.IO
Imports System.Runtime.InteropServices

Module Example
    <STAThread()> _
    Sub Main()
        Dim objApplication As SolidEdgeFramework.Application = Nothing
        Dim objPartDocument As SolidEdgePart.PartDocument = Nothing
        Dim objModels As SolidEdgePart.Models = Nothing
        Dim objModel As SolidEdgePart.Model = Nothing
        Dim objIntersecs As SolidEdgePart.Intersects = Nothing
        Dim objIntersect As SolidEdgePart.Intersect = Nothing
        Dim objTargetBodyIntersect(5) As Object
        Dim objToolBodyIntersect(5) As Object
        Dim objTargetBodyIntersectOut(1) As Object
        Dim objToolBodyIntersectOut(1) As Object
        Dim nTargets As Long
        Dim nTools As Long

        Try
            OleMessageFilter.Register()

            objApplication = Marshal.GetActiveObject("SolidEdge.Application")
            objPartDocument = objApplication.ActiveDocument

            objModels = objPartDocument.Models

            objTargetBodyIntersect(0) = objModels.Item(1).Body
            objToolBodyIntersect(0) = objModels.Item(2).Body

            objModel = objModels.Item(1)
            objIntersecs = objModel.Intersects

            objIntersect = objIntersecs.Add(1, objTargetBodyIntersect, 1, objToolBodyIntersect,
                                           SolidEdgePart.SETargetDesignBodyOption.igCreateMultipleDesignBodiesOnNonManifoldOption,
                                             SolidEdgePart.SETargetConstructionBodyOption.igCreateMultipleConstructionBodiesOnNonManifoldOption)


            objModel.ExtrudedProtrusions.Item(2).RollToFeature()

            objTargetBodyIntersect(0) = objModels.Item(1).Body
            objToolBodyIntersect(0) = objModels.Item(2).Body


            objIntersect.Edit(1, objTargetBodyIntersect, 1, objToolBodyIntersect,
                              SolidEdgePart.SETargetDesignBodyOption.igCreateMultipleDesignBodiesOnNonManifoldOption,
                              SolidEdgePart.SETargetConstructionBodyOption.igCreateMultipleConstructionBodiesOnNonManifoldOption)

            objIntersect.RollToFeature()
            objIntersect.GetTargets(nTargets, objTargetBodyIntersectOut)
            objIntersect.GetTools(nTools, objToolBodyIntersectOut)

        Catch ex As Exception
            Console.WriteLine(ex.Message)
        Finally
            OleMessageFilter.Revoke()
        End Try
    End Sub
End Module
See Also

Intersect Object  | Intersect Members  | Solid Edge ST5 - What's New