Share
 
 

About Querying Construction XLines (ActiveX)

Once created, you can query a construction line (xline) to determine the points used to create the object.

The BasePoint property can be used to obtain the first point of the xline. While the second point used to create the xline is not stored with the object, you can use the DirectionVector property to obtain the directional vector for the xline.

Query a construction line

AutoLISP
(setq BPoint (vla-get-BasePoint xlineObj)
      Vector (vla-get-DirectionVector xlineObj))
Note: You can use the vlax-variant-value and vlax-safearray->list functions to convert the Variant value returned by the BasePoint and DirectionVector properties to a list data type.
!BPoint
#<variant 8197 ...>

(vlax-safearray->list (vlax-variant-value BPoint))
(2.0 2.0 0.0)
VBA (AutoCAD Only)
Dim BPoint As Variant
Dim Vector As Variant

BPoint = xlineObj.BasePoint
Vector = xlineObj.DirectionVector

Was this information helpful?