Gets an object
VBA : object.GetEntity
Object, PickedPoint[, Prompt]
VL : (vla-GetEntity
Object Object PickedPoint Prompt)
util 'obj 'ip "\nSelect Object: ")
Object : Utility
The object or objects this method applies to.
Object : Object;
The picked object. Can be one of any of the Drawing Objects.
Variant (three-element array of doubles); output-only
A 3D WCS coordinate specifying the point that was selected.
Prompt : Variant
(string); input-only; optional
The text to display to prompt the user for input.
This method requires the
AutoCAD user to select an object by picking a point on the graphics
screen. If an entity is picked, it is returned in the first parameter
and the second parameter will contain the point picked in WCS
coordinates. If the pick point is not on an entity the call will fail.
The pick point returned
by GetEntity does not necessarily lie on the selected object. The
returned point represents the location of the crosshairs at the time of
selection. The relationship between this point and the object varies
depending on the size of the pickbox and the current zoom scale.
This method can retrieve
an entity even if it is not visible on the screen or if it is on a
;get a reference to the Utilities Object :
(setq util (vla-get-utility
(vla-getentity util 'obj 'ip "\nSelect Object: ")
The reference to the Object is stored in the variable "obj"
and the pickpoint is stored in variable "ip" in the form of a safearray.