Solid Edge FrameworkSupport Type Library
Document Property
Description
Returns the document to which the referenced object belongs.
Property type
Read-only property
Syntax
Visual Basic
Public Property Document As Object
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFrameWork.Application
    Dim objDoc As SolidEdgeDraft.DraftDocument
    Dim objSheet As SolidEdgeDraft.Sheet
    Dim objCurves As SolidEdgeFrameworkSupport.Curves2d
    Dim objCurve1 As SolidEdgeFrameworkSupport.Curve2d
    Dim objCurve1Doc As SolidEdgeDraft.DraftDocument
    Dim dblpoint(1 To 8) As Double
    ' Report errors
    Const PI = 3.14159265358979
    ' Create/get the application with specific settings
    On Error Resume Next
    Set objApp = GetObject(, "SolidEdge.Application")
    If Err Then
        Err.Clear
        Set objApp = CreateObject("SolidEdge.Application")
        Set objDoc = objApp.Documents.Add("SolidEdge.DraftDocument")
        objApp.Visible = True
    Else
        Set objDoc = objApp.ActiveDocument
    End If
    'getting the Active Sheet object
    Set objSheet = objDoc.ActiveSheet
    'create Curves collection
    Set objCurves = objSheet.Curves2d
    'Define points
    dblpoint(1) = 0.15
    dblpoint(2) = 0.15
    dblpoint(3) = 0.25
    dblpoint(4) = 0.15
    dblpoint(5) = 0.25
    dblpoint(6) = 0.25
    dblpoint(7) = 0.15
    dblpoint(8) = 0.25
    'Create curve
    Set objCurve1 = objCurves.AddByPoints(Pointcount:=4, Points:=dblpoint, FitType:=igDirectFit, Closed:=False)
    'Get document
    Set objCurve1Doc = objCurve1.Document




    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objSheet = Nothing
    Set objCurves = Nothing
    Set objCurve1 = Nothing
    Set objCurve1Doc = Nothing
End Sub
See Also

Curve2d Object  | Curve2d Members

Send comments on this topic.