Solid Edge FrameworkSupport Type Library
BorderColor Property
Description
Sets and returns the color of the border when the BorderVisible property is True.
Property type
Read-write property
Syntax
Visual Basic
Public Property BorderColor As Long
Remarks
The color is stored in a long integer and is created with the RGB function (red, green, and blue color intensities) or as an integer between 0 and 15 that represents standard colors.
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 cBorderColor As VBRUN.ColorConstants
    ' 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 Border color
    cBorderColor = objFrame.BorderColor
    'Set the Bordercolor to Blue
    objFrame.BorderColor = vbBlue

    ' 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.