Returns the object (entity) name of the indexed element of a selection set
(ssname ss index)
Entity names in selection sets obtained with ssget are always names of main entities. Subentities (attributes and polyline vertices) are not returned. (The entnext function allows access to them.)
An entity name, if successful. If index is negative or greater than the highest-numbered entity in the selection set, ssname returns nil.
Get the name of the first entity in a selection set:
Command: (setq ent1 (ssname ss 0))
<Entity name: 1d62d68>
Get the name of the fourth entity in a selection set:
Command: (setq ent4 (ssname ss 3))
<Entity name: 1d62d90>
To access entities beyond the number 32,767 in a selection set, you must supply the index argument as a real, as in the following example:
(setq entx (ssname sset 50843.0))
-
The entnext function.