# (ssadd \[entity-name \[selection-set\]\]) [GstarCAD 2011](../../../Index.md) → [Developer Reference](../../%28Developer%20Reference%29.md) → [AutoLISP Reference](../%28AutoLISP%20Reference%29.md) → [LISP Functions](%28LISP%20Functions%29.md) <a id="271"></a> ## (ssadd \[entity-name \[selection-set\]\]) --- Add it to the selection set. --- This function adds entity *entity-name* to *selection-set* or creates a new selection set (when **ssadd** is used without arguments). The **ssadd** function works in one of the three ways below: | Code | *Result* | | --- | --- | | - (**ssadd**) | A new selection set is created with no entitys. | | - (**ssadd** *entity-name*) | A new selection set is created containing entity-name as the only entity. | | - (**ssadd** *entity-name selection-set*) | Adds the entity, entity-name, to an existing selection set, selection-set. | The new or revised selection set name is returned in a format similar to the following: \<Selection set: 26146268\> GstarCAD® can have more than one selection set open at a time. ### Examples | Code | Comments | | --- | --- | | (setq sset1 (**ssadd**)) | Creates a new selection set called sset1. | | (setq ent1 (car (entsel))) | Prompts the user to select the entity to set to ent1 | | (**ssadd** ent1 sset1) | Adds ent1 to sset1. | | (setq ent2 (entlast)) | Returns last entity in drawing; sets it to ent2. | | (**ssadd** ent2 sset1) | Adds ent2 to sset1. | **Tell me about...** [(entlast)](%28entlast%29.md) [(entsel \[prompt\])](%28entsel%20-prompt-%29.md) [(ssdel entity-name selection-set)](%28ssdel%20entity-name%20selection-set%29.md) [(ssget \[mode\] \[point1 \[point2\]\] \[point-list\] \[filter-list\])](%28ssget%20-mode-%20-point1%20-point2-%20-point-list-%20-filter-list-%29.md) [(setq symbol1 statement1 \[symbol2 statement2\] ...)](%28setq%20symbol1%20statement1%20-symbol2%20statement2-%20...%29.md) [LISP Compatibility](../LISP%20Compatibility.md) [Programming Overview of LISP (LISt Processing) Language](../Programming%20Overview%20of%20LISP%20%28LISt%20Processing%29%20Language.md) <a id="holding"></a> ## Other versions with matching text [GstarCAD 2012](../../../../2012/Developer%20Reference/AutoLISP%20Reference/LISP%20Functions/%28ssadd%20-entity-name%20-selection-set-%29.md)