Share

About Converting Between Enames and VLA-objects (AutoLISP)

Product Documentation
Intermediate

The vlax-ename->vla-objectfunction allows you to convert entity names (enames) obtained through functions, such as entget, to VLA-objects you can use with ActiveX functions. For example, the following code sets a variable to an ename, then uses vlax-ename->vla-object to convert the ename to a VLA-object:

(setq ename-circle (car (entsel "\nPick a Circle:")))
<Entity name: 27f0538>

(setq vlaobject-circle (vlax-ename->vla-object ename-circle))
#<VLA-OBJECT IAcadCircle 03642c24>

To convert VLA-objects to enames, use vlax-vla-object->ename . For example:

(setq new-ename-circle (vlax-vla-object->ename vlaobject-circle))

<Entity name: 27f0538>

Was this information helpful?