Imports System.IO
Imports System.Runtime.InteropServices
Module Example
<STAThread()> _
Sub Main()
Dim objApplication As SolidEdgeFramework.Application
Dim objAssemblyDocument As SolidEdgeAssembly.AssemblyDocument
Dim objOccurrences As SolidEdgeAssembly.Occurrences
Try
OleMessageFilter.Register()
objApplication = Marshal.GetActiveObject("SolidEdge.Application")
objAssemblyDocument = objApplication.ActiveDocument
objOccurrences = objAssemblyDocument.Occurrences
Catch ex As Exception
Console.WriteLine(ex.Message)
Finally
OleMessageFilter.Revoke()
End Try
End Sub
End Module