Solid Edge Framework Type Library
ActiveDocumentType Property
Description
Returns the type of the currently active document.
Property type
Read-only property
Syntax
Visual Basic
Public Property ActiveDocumentType As DocumentTypeConstants
Remarks
If no document is open in the application, accessing this property generates a run-time error.
Example
Imports SolidEdgeFramework
Imports System.Runtime.InteropServices

Module Example
    <STAThread()> _
    Sub Main()
        Dim objApplication As SolidEdgeFramework.Application = Nothing

        Try
            OleMessageFilter.Register()

            ' Connect to a running instance of Solid Edge.
            objApplication = Marshal.GetActiveObject("SolidEdge.Application")
            Select Case objApplication.ActiveDocumentType
                Case DocumentTypeConstants.igAssemblyDocument
                    ' Assembly Document
                Case DocumentTypeConstants.igDMPartDocument
                    ' DMPart Document
                Case DocumentTypeConstants.igDMSheetMetalDocument
                    ' DMSheetMetal Document
                Case DocumentTypeConstants.igDraftDocument
                    ' Draft Document
                Case DocumentTypeConstants.igPartDocument
                    ' Part Document
                Case DocumentTypeConstants.igSheetMetalDocument
                    ' SheetMetal Document
                Case DocumentTypeConstants.igSyncAssemblyDocument
                    ' SyncAssembly Document
                Case DocumentTypeConstants.igUnknownDocument
                    ' Unknown Document
                Case DocumentTypeConstants.igWeldmentAssemblyDocument
                    ' WeldmentAssembly Document
                Case DocumentTypeConstants.igWeldmentDocument
                    ' Weldment Document
            End Select
        Catch ex As Exception
            ' Write any errors to console.
            Console.WriteLine(ex.Message)
        Finally
            OleMessageFilter.Revoke()
        End Try
    End Sub
End Module
See Also

Application Object  | Application Members