ssname (AutoLISP)

Returns the object (entity) name of the indexed element of a selection set

Supported Platforms: Windows and Mac OS

Signature

(ssname ss index)
ss

Type: Pickset (selection set)

A selection set.

index

Type: Integer or Real

Element in a selection set. The first element in the set has an index of zero. To access entities beyond number 32,767 in a selection set, you must supply the index argument as a real.

Return Values

Type: Ename (entity name) or nil

An entity name, if successful. If index is negative or greater than the highest-numbered entity in the selection set, ssname returns nil.

Remarks

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.)

Examples

Get the name of the first entity in a selection set:

(setq ent1 (ssname ss 0))
<Entity name: 1d62d68>

Get the name of the fourth entity in a selection set:

(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))