XType Example
Examples:
Sub Example_XType_AecLayoutGrid2D() 'This example displays the X type for a 2D layout grid Dim obj As Object Dim pt As Variant Dim grid As AecLayoutGrid2D ThisDrawing.Utility.GetEntity obj, pt, "Select a 2D Layout Grid" If TypeOf obj Is AecLayoutGrid2D Then Set grid = obj Select Case grid.XType Case 0: MsgBox "Grid X Type is: Manual Spacing", vbInformation, "XType Example" Case 1: MsgBox "Grid X Type is: Auto Spacing Even", vbInformation, "XType Example" Case 2: MsgBox "Grid X Type is: Auto Spacing Bay", vbInformation, "XType Example" End Select Else MsgBox "Not a 2D Layout Grid", vbExclamation, "XType Example" End If
End Sub
Sub Example_XType_AecLayoutGrid3D() 'This example displays the X type for 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 Select Case grid.XType Case 0: MsgBox "Grid X Type is: Manual Spacing", vbInformation, "XType Example" Case 1: MsgBox "Grid X Type is: Auto Spacing Even", vbInformation, "XType Example" Case 2: MsgBox "Grid X Type is: Auto Spacing Bay", vbInformation, "XType Example" End Select Else MsgBox "Not a 3D Layout Grid", vbExclamation, "XType Example" End If
End Sub