C++
int acdbEntLast( ads_name result );
File
acedads.h
Description
Gets the name of the last (nondeleted) main entity in the drawing database. The last entity is selected even if it is not on screen or is on a frozen layer, but a nongraphical object cannot be selected. The last entity is the most recently created entity, so acdbEntLast() can be used to obtain the name of an entity that has just been added by a call to acedCommand(), acedCmd(), or acdbEntMake() (a complex entity does not appear in the database until it is complete).
If acdbEntLast() succeeds, it returns RTNORM; otherwise, it returns RTERROR. When acdbEntLast() fails, it sets the system variable ERRNO to a value that indicates the reason for the failure.
Returns
Resulting last main entry in the drawing database