# (entlast)
[GstarCAD 2012](../../../Index.md) → [Developer Reference](../../%28Developer%20Reference%29.md) → [AutoLISP Reference](../%28AutoLISP%20Reference%29.md) → [LISP Functions](%28LISP%20Functions%29.md)
<a id="159"></a>
## (entlast)
---
Get the last entity in the drawing.
---
This function retrieves the name of the last non-deleted entity in your database. This is useful if you want to use the last entity drawn.
**Example**
| Code | Returns |
| --- | --- |
| (**entlast**) | \<Entity name: bebb12f4\> |
### NOTES
- The entity does not need to be currently on screen, unthawed, or unlocked to be selected. This behavior differs from the Last selection set option.
- To find the *first* entity in the database, use the [entnext](%28entnext%20-entity-name-%29.md)function with no arguments.
**Tell me about...**
[(entdel entity-name)](IDR_LISP_B157.md)
[(entget entity-name \[application-list\])](%28entget%20entity-name%20-application-list-%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)
[(nentsel \[prompt\])](%28nentsel%20-prompt-%29.md)
[(nentselp \[prompt\] \[point\])](%28nentselp%20-prompt-%20-point-%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/%28entlast%29.md)