Converting between Enames and VLA-objects
 
 
 

The vlax-ename->vla-object function 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>