Solid Edge FrameworkSupport Type Library
BringToFront Method
Description
Changes the display order of the referenced object by moving it in front of all other overlapping objects.
Syntax
Visual Basic
Public Sub BringToFront() 
Remarks
This command is useful when objects are hidden by other objects that are filled and have a higher priority display. The BringForward method can also be used.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFrameWork.Application
    Dim objDoc As SolidEdgeDraft.DraftDocument
    Dim objSheet As SolidEdgeDraft.Sheet
    Dim objEllipses As SolidEdgeFrameworkSupport.Ellipses2d
    Dim objEllipse1 As SolidEdgeFrameworkSupport.Ellipse2d
    Dim objEllipse2 As SolidEdgeFrameworkSupport.Ellipse2d
    Dim objEllipse3 As SolidEdgeFrameworkSupport.Ellipse2d
    Dim objEllipse4 As SolidEdgeFrameworkSupport.Ellipse2d
    Dim lngZorder As Long
    ' 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 Ellipses2d object
    Set objEllipses = objSheet.Ellipses2d
    'Create 4 ellipse2d objects
    Set objEllipse1 = objEllipses.AddByCenter(xCenter:=0.3, yCenter:=0.25, _
                                              xMajor:=0.1, yMajor:=0, Ratio:=0.5, Orientation:=igGeom2dOrientClockwise)
    Set objEllipse2 = objEllipses.AddByCenter(xCenter:=0.3, yCenter:=0.25, _
                                              xMajor:=0.08, yMajor:=0, Ratio:=0.3, Orientation:=igGeom2dOrientClockwise)
    Set objEllipse3 = objEllipses.AddByCenter(xCenter:=0.15, yCenter:=0.15, _
                                              xMajor:=0.1, yMajor:=0, Ratio:=0.5, Orientation:=igGeom2dOrientClockwise)
    Set objEllipse4 = objEllipses.AddByCenter(xCenter:=0.15, yCenter:=0.15, _
                                              xMajor:=0.08, yMajor:=0, Ratio:=0.3, Orientation:=igGeom2dOrientClockwise)
    'Get the ZOrder of the first Ellipse2d
    lngZorder = objEllipse1.ZOrder
    'Bring to Front the Ellipse1 object
    Call objEllipse1.BringToFront
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objSheet = Nothing
    Set objEllipses = Nothing
    Set objEllipse1 = Nothing
    Set objEllipse2 = Nothing
    Set objEllipse3 = Nothing
    Set objEllipse4 = Nothing
End Sub
See Also

Ellipse2d Object  | Ellipse2d Members