UseNodeCS Example
Sub Example_UseNodeCS() ' This example attaches a Mass Element to a 2D Layout Grid, and uses the Nodes
' coordinate system.
Dim obj As AcadObject Dim pt As Variant ThisDrawing.Utility.GetEntity obj, pt, "Select Layout Grid" If TypeOf obj Is AecLayoutGrid2D Then Dim grid As AecLayoutGrid2D Set grid = obj Dim mass As AecMassElement Set mass = ThisDrawing.ModelSpace.AddCustomObject("AecMassElement") Dim anchor As New AecAnchorEntToLayoutNode anchor.Reference = grid anchor.Node = 1 anchor.UseNodeCS = True mass.AttachAnchor anchor Else MsgBox "No Layout Grid selected", vbInformation, "UseNodeCS Example" End If
End Sub