XNodes Example

AEC Auto

XNodes Example

Examples:

l AecLayoutGrid2D

l AecLayoutGrid3D


Sub Example_XNodes_AecLayoutGrid2D()

  'This example displays the number of X nodes of a 2D layout grid
  
  Dim obj As Object
  Dim pt As Variant
  Dim grid As AecLayoutGrid2D
  
  ThisDrawing.Utility.GetEntity obj, pt, "Selecta 2D Layout Grid"
  
  If TypeOf obj Is AecLayoutGrid2D Then
      Set grid = obj
      MsgBox "Grid X Nodes is: " & grid.XNodes.Count, vbInformation, "XNodes Example"
  Else
      MsgBox "Not a 2D Layout Grid", vbExclamation, "XNodes Example"
  End If

End Sub

Sub Example_XNodes_AecLayoutGrid3D()

 'This example displays the number of X nodes of a 3D layout grid
  
  Dim obj As Object
  Dim pt As Variant
  Dim grid As AecLayoutGrid3D
  
  ThisDrawing.Utility.GetEntity obj, pt, "Select a 3D Layout Grid"
  
  If TypeOf obj Is AecLayoutGrid3D Then
      Set grid = obj
      MsgBox "Grid X Nodes is: " & grid.XNodes.Count, vbInformation, "XNodes Example"
  Else
      MsgBox "Not a 3D Layout Grid", vbExclamation, "XNodes Example"
  End If

End Sub