Imports System.IO
Imports System.Runtime.InteropServices
Module Example
<STAThread()> _
Sub Main()
Dim objApplication As SolidEdgeFramework.Application = Nothing
Dim objSheetMetalDocument As SolidEdgePart.SheetMetalDocument = Nothing
Dim objModels As SolidEdgePart.Models = Nothing
Dim objModel As SolidEdgePart.Model = Nothing
Dim objEtches As SolidEdgePart.Etches = Nothing
Try
OleMessageFilter.Register()
objApplication = Marshal.GetActiveObject("SolidEdge.Application")
objSheetMetalDocument = objApplication.ActiveDocument
objModels = objSheetMetalDocument.Models
objModel = objModels.Item(1)
objEtches = objModel.Etches
Catch ex As Exception
Console.WriteLine(ex.Message)
Finally
OleMessageFilter.Revoke()
End Try
End Sub
End Module