Solid Edge FrameworkSupport Type Library
BringForward Method
Description
Changes the display order of the referenced object by moving it in front of the first object that obscures it.
Syntax
Visual Basic
Public Sub BringForward() 
Remarks
This command is useful when other objects that are filled hide an object and the user wants to remove the object from hiding while not bringing the object to the top of the priority list.
Example
Private Sub Form_Load()

    Dim objApp As SolidEdgeFrameWork.Application

    Dim objDoc As SolidEdgeDraft.DraftDocument

    Dim objSheet As SolidEdgeDraft.Sheet

    Dim objDatumTargets As SolidEdgeFrameworkSupport.DatumTargets

    Dim objDatumTarget As SolidEdgeFrameworkSupport.DatumTarget

    Dim objDatumTarget1 As SolidEdgeFrameworkSupport.DatumTarget

    Dim objLine As SolidEdgeFrameworkSupport.Line2d

    Dim lngZorderbfr 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

    'Getting the DatumTargets object

    Set objDatumTargets = objSheet.DatumTargets

    'Create a Datum target in the active sheet

    Set objDatumTarget = objDatumTargets.Add(x1:=0.3, y1:=0.25, z1:=0.25)

    'Add a Text to the Datum Target

    objDatumTarget.DatumReference = "A"

    'Get the ZOrder before drawing other elements

    lngZorderbfr = objDatumTarget.ZOrder

    'Add a vertex at the end

    Call objDatumTarget.AddVertex(x:=0.35, y:=0.3, z:=0)



    'Draw a Line in the active sheeet

    Set objLine = objSheet.Lines2d.AddBy2Points(X1:=0.2, Y1:=0.4, _

                                                X2:=0.4, Y2:=0.2)

    'Create another Datum target in the active sheet

    Set objDatumTarget1 = objDatumTargets.Add(x1:=0.4, y1:=0.35, z1:=0)

    'Add a Text to the DatumTarget1

    objDatumTarget1.DatumReference = "B"

    'Add a vertex at the end to the DatumTarget1

    Call objDatumTarget1.AddVertex(x:=0.35, y:=0.15, z:=0)

    'Bring forward first Datum Target

    objDatumTarget.BringForward

    ' USER DISPLAY

    ' Release objects

    Set objApp = Nothing

    Set objDoc = Nothing

    Set objSheet = Nothing

    Set objDatumTargets = Nothing

    Set objDatumTarget = Nothing

    Set objDatumTarget1 = Nothing

    Set objLine = Nothing

End Sub
See Also

DatumTarget Object  | DatumTarget Members