Solid Edge FrameworkSupport Type Library
ZOrder Property
Description
Specifies the front-to-back order in which an object is displayed relative to other objects.
Property type
Read-only property
Syntax
Visual Basic
Public Property ZOrder As Long
Remarks
This relationship is maintained by storing a cardinal order position on each object. An object with a higher cardinal order is displayed in front of one with a lower cardinal number. A change in an object's ZOrder changes how objects are displayed if filled objects are displayed over other objects. The value assigned to this property can be changed internally to maintain unique values on all objects. Therefore, the value returned for this property may not be the same value to which the property was set.
Example
Private Sub Form_Load()
    Dim objApp As SolidEdgeFrameWork.Application
    Dim objDoc As SolidEdgeDraft.DraftDocument
    Dim objSheet As SolidEdgeDraft.Sheet
    Dim objArcs2d As SolidEdgeFrameworkSupport.Arcs2d
    Dim objArc2d1 As SolidEdgeFrameworkSupport.Arc2d
    Dim objArc2d2 As SolidEdgeFrameworkSupport.Arc2d
    Dim lngZorder1 As Long
    Dim lngZorder2 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 arcs2d object
    Set objArcs2d = objSheet.Arcs2d
    ' Create an arc
    Set objArc2d1 = objArcs2d.AddByStartAlongEnd(xStart:=0.233, yStart:=0.149, _
                                                 xAlong:=0.233, yAlong:=0.278, xEnd:=0.338, yEnd:=0.324)
    'Get zorder for the arc
    lngZorder1 = objArc2d1.ZOrder
    'Create another Arc object
    Set objArc2d2 = objArcs2d.AddByStartAlongEnd(xStart:=0.325, yStart:=0.16, _
                                                 xAlong:=0.269, yAlong:=0.293, xEnd:=0.158, yEnd:=0.34)
    lngZorder2 = objArc2d2.ZOrder
    ' USER DISPLAY
    ' Release objects
    Set objApp = Nothing
    Set objDoc = Nothing
    Set objSheet = Nothing
    Set objArcs2d = Nothing
    Set objArc2d1 = Nothing
    Set objArc2d2 = Nothing
End Sub
See Also

Arc2d Object  | Arc2d Members

Send comments on this topic.