# (entnext \[entity-name\]) [GstarCAD 2012](../../../Index.md) → [Developer Reference](../../%28Developer%20Reference%29.md) → [AutoLISP Reference](../%28AutoLISP%20Reference%29.md) → [LISP Functions](%28LISP%20Functions%29.md) <a id="162"></a> ## (entnext \[entity-name\]) --- Get the next entity in the drawing. --- This function returns the name of the first non-deleted entity in the database if no arguments are supplied. If an entity name is supplied, **entnext** returns the next entity following the given *entity-name*. When there is no next entity in the database, **entnext** returns *nil*. ### Examples | Code | Returns | | --- | --- | | (setq a (**entnext**)) | \<Entity name: 1fe0540\> | | (setq b (**entnext** a)) | *Entity name following entity* ***a*** | **Tell me about...** [(entdel entity-name)](IDR_LISP_B157.md) [(entget entity-name \[application-list\])](%28entget%20entity-name%20-application-list-%29.md) [(entlast)](%28entlast%29.md) [(entmake \[entity-list\])](%28entmake%20-entity-list-%29.md) [(entmod entity-list)](%28entmod%20entity-list%29.md) [(entsel \[prompt\])](%28entsel%20-prompt-%29.md) [(entupd entity-name)](%28entupd%20entity-name%29.md) [(nentsel \[prompt\])](%28nentsel%20-prompt-%29.md) [(nentselp \[prompt\] \[point\])](%28nentselp%20-prompt-%20-point-%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 2011](../../../../2011/Developer%20Reference/AutoLISP%20Reference/LISP%20Functions/%28entnext%20-entity-name-%29.md)