Solid Edge FrameworkSupport Type Library
Margin Property
Description
Sets and returns the minimum distance from the extents of the OLE object to the extents of the frame boundary.
Property type
Read-write property
Syntax
Visual Basic
Public Property Margin As Double
Remarks
The distance is specified in container units.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFrameWork.Application
    Dim objDoc As SolidEdgeDraft.DraftDocument
    Dim objSheet As SolidEdgeDraft.Sheet
    Dim objSmartFrame2d As SolidEdgeFrameworkSupport.SmartFrame2d
    Dim objSmartFrame2dStyle As SolidEdgeFrameworkSupport.SmartFrame2dStyle
    Dim objFrame As SolidEdgeFrameworkSupport.Frame
    Dim dblMargin 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
    'Get the SamrtFrames2d object
    Set objSmartFrame2d = objSheet.SmartFrames2d.AddBy2Points(StyleName:="Reference", x1:=0.1, y1:=0.1, x2:=0.2, y2:=0.2)
    'Get the Frame object
    Set objFrame = objSmartFrame2d.Frame
    objFrame.BorderVisible = True
    'Get the Margin ogf the Frame
    dblMargin = objFrame.Margin
    'Set the Margin to 0.4
    objFrame.Margin = 0.4
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objSheet = Nothing
    Set objSmartFrame2d = Nothing
    Set objSmartFrame2dStyle = Nothing
    Set objFrame = Nothing
End Sub
See Also

Frame Object  | Frame Members

Send comments on this topic.