Solid Edge Draft Type Library
Get2DModelSheet Property
Description
Returns the 2D Model Sheet.
Property type
Read-only property
Syntax
Visual Basic
Public Property Get2DModelSheet As Sheet
Example
Private Sub btnGet2DModelSheet_Click(sender As System.Object, e As System.EventArgs) Handles btnGet2DModelSheet.Click
    Dim objApplication As SolidEdgeFramework.Application = Nothing
    Dim objDraftDoc As SolidEdgeDraft.DraftDocument = Nothing
    Dim objSheets As SolidEdgeDraft.Sheets = Nothing
    Dim objSections As SolidEdgeDraft.Sections = Nothing
    Dim obj2dModelSheet As SolidEdgeDraft.Sheet = Nothing
    Dim objType As Type = Nothing

    Try
        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

        objDraftDoc = objApplication.ActiveDocument

        objSheets = objDraftDoc.Sheets
        obj2dModelSheet = objSheets.Get2DModelSheet

        objSections = objDraftDoc.Sections
        obj2dModelSheet = objSections.Get2DModelSheet

    Catch ex As Exception
        MsgBox(ex.ToString)
    End Try

End Sub
See Also

Sections Collection  | Sections Members