# (ssdel 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="272"></a> ## (ssdel entity-name selection-set) --- Erase it from the selection set. --- This function deletes the entity, *entity-name*, from the selection set, *selection-set*. Unlike the [ssadd](%28ssadd%20-entity-name%20-selection-set-%29.md) function, *entity-name* and *selection-set* are **not** optional. If *entity-name* is part of the selection set, **ssdel** deletes it and returns the selection set. If it is not part of the selection set, a nil is returned. ### Examples | Code | Comments | | --- | --- | | (setq sset1 (ssget)) | Creates a new selection set called sset1. | | (setq ent1 (entnext)) | Finds the first entity in the drawing and sets it to ent1. | | (ssadd ent1 sset1) | Adds ent1 to sset1 | | (**ssdel** ent1 sset1) | Deletes ent1 from sset1. | | (**ssdel** ent2 sset1) | Assuming ent2 is set to an entity(not in sset1), a nil would return. | **Tell me about...** [(entnext \[entity-name\])](%28entnext%20-entity-name-%29.md) [(setq symbol1 statement1 \[symbol2 statement2\] ...)](%28setq%20symbol1%20statement1%20-symbol2%20statement2-%20...%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) [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/%28ssdel%20entity-name%20selection-set%29.md)