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 objPoints As solidedgeframeworksupport.Points2d
    Dim objPoint1 As solidedgeframeworksupport.Point2d
    Dim objPoint2 As solidedgeframeworksupport.Point2d
    Dim objPoint3 As solidedgeframeworksupport.Point2d
    Dim lngPoint3Zorder 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
    'Create Points collection
    Set objPoints = objSheet.Points2d
    'Create a Point
    Set objPoint1 = objPoints.Add(x:=0.21, y:=0.21)

    'Create second Point
    Set objPoint2 = objPoints.Add(x:=0.25, y:=0.25)
    'Create third point
    Set objPoint3 = objPoints.Add(x:=0.3, y:=0.3)
    'Call BringToFront method
    Call objPoint1.BringToFront
    'get the zorder of the point3
    lngPoint3Zorder = objPoint3.ZOrder


    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objSheet = Nothing
    Set objPoints = Nothing
    Set objPoint1 = Nothing
    Set objPoint2 = Nothing
    Set objPoint3 = Nothing
End Sub
See Also

Point2d Object  | Point2d Members

Send comments on this topic.