LayoutGrid2D Example

AEC Auto

LayoutGrid2D Example

Examples:

l AecLayoutGrid2DNode

l AecLayoutGrid2DNodes

l AecLayoutGrid2DXNode

l AecLayoutGrid2DXNodes

l AecLayoutGrid2DYNode

l AecLayoutGrid2DYNodes


Sub Example_LayoutGrid2D_AecLayoutGrid2DNode()

    'This example displays the index of a layout node
  
    Dim obj As Object
    Dim pt As Variant
    Dim grid As AecLayoutGrid2D
    Dim node As AecLayoutGrid2DNode
   
    ThisDrawing.Utility.GetEntity obj, pt, "Select a 2D Layout Grid"
  
    If TypeOf obj Is AecLayoutGrid2D Then
        Set grid = obj
        Set node = grid.XNodes.Item(0)
        MsgBox "Node LayoutGrid's Depth is: " & node.LayoutGrid2D.Depth, vbInformation, "LayoutGrid2D Example"
    Else
        MsgBox "Not a 2D Layout Grid", vbExclamation, "LayoutGrid2D Example"
    End If

End Sub

Sub Example_LayoutGrid2D_AecLayoutGrid2DNodes()

    'This example displays the index of a layout node
  
    Dim obj As Object
    Dim pt As Variant
    Dim grid As AecLayoutGrid2D
    Dim nodes As AecLayoutGrid2DNodes
   
    ThisDrawing.Utility.GetEntity obj, pt, "Select a 2D Layout Grid"
  
    If TypeOf obj Is AecLayoutGrid2D Then
        Set grid = obj
        Set nodes = grid.XNodes
        MsgBox "Node collection owner depth is: " & nodes.LayoutGrid2D.Depth, vbInformation, "LayoutGrid2D Example"
    Else
        MsgBox "Not a 2D Layout Grid", vbExclamation, "LayoutGrid2D Example"
    End If

End Sub

Sub Example_LayoutGrid2D_AecLayoutGrid2DXNode()

    'This example displays the depth of the owner grid of a layout xnode
  
    Dim obj As Object
    Dim pt As Variant
    Dim grid As AecLayoutGrid2D
    Dim node As AecLayoutGrid2DNode
   
    ThisDrawing.Utility.GetEntity obj, pt, "Select a 2D Layout Grid"
  
    If TypeOf obj Is AecLayoutGrid2D Then
        Set grid = obj
        Set node = grid.XNodes.Item(0)
        MsgBox "Owner Grid Depth is: " & node.LayoutGrid2D.Depth, vbInformation, "LayoutGrid2D Example"
    Else
        MsgBox "Not a 2D Layout Grid", vbExclamation, "LayoutGrid2D Example"
    End If

End Sub

Sub Example_LayoutGrid2D_AecLayoutGrid2DXNodes()

    'This example displays the depth of the owner grid of a collection of layout Xnodes
  
    Dim obj As Object
    Dim pt As Variant
    Dim grid As AecLayoutGrid2D
    Dim nodes As AecLayoutGrid2DNodes
   
    ThisDrawing.Utility.GetEntity obj, pt, "Select a 2D Layout Grid"
  
    If TypeOf obj Is AecLayoutGrid2D Then
        Set grid = obj
        Set nodes = grid.XNodes
        MsgBox "Owner Grid Depth is: " & nodes.LayoutGrid2D.Depth, vbInformation, "LayoutGrid2D Example"
    Else
        MsgBox "Not a 2D Layout Grid", vbExclamation, "LayoutGrid2D Example"
    End If

End Sub

Sub Example_LayoutGrid2D_AecLayoutGrid2DYNode()

    'This example displays the depth of the owner grid of a layout xnode
  
    Dim obj As Object
    Dim pt As Variant
    Dim grid As AecLayoutGrid2D
    Dim node As AecLayoutGrid2DNode
   
    ThisDrawing.Utility.GetEntity obj, pt, "Select a 2D Layout Grid"
  
    If TypeOf obj Is AecLayoutGrid2D Then
        Set grid = obj
        Set node = grid.YNodes.Item(0)
        MsgBox "Owner Grid Depth is: " & node.LayoutGrid2D.Depth, vbInformation, "LayoutGrid2D Example"
    Else
        MsgBox "Not a 2D Layout Grid", vbExclamation, "LayoutGrid2D Example"
    End If

End Sub

Sub Example_LayoutGrid2D_AecLayoutGrid2DYNodes()

    'This example displays the depth of the owner grid of a collection of layout Ynodes
  
    Dim obj As Object
    Dim pt As Variant
    Dim grid As AecLayoutGrid2D
    Dim nodes As AecLayoutGrid2DNodes
   
    ThisDrawing.Utility.GetEntity obj, pt, "Select a 2D Layout Grid"
  
    If TypeOf obj Is AecLayoutGrid2D Then
        Set grid = obj
        Set nodes = grid.YNodes
        MsgBox "Owner Grid Depth is: " & nodes.LayoutGrid2D.Depth, vbInformation, "LayoutGrid2D Example"
    Else
        MsgBox "Not a 2D Layout Grid", vbExclamation, "LayoutGrid2D Example"
    End If

End Sub