Share

acdbEntDel

C++

int acdbEntDel(
    const ads_name ent
);

File

acedads.h

Description

Deletes the specified entity if it is currently in the drawing and undeletes it (restores it to the drawing) if it was deleted during the current editing session.

Note AutoCAD purges deleted entities when it leaves the drawing. Therefore acdbEntDel() can restore entities only during the same editing session in which they were deleted.

If the entity is visible in the current graphics screen, its image is erased or restored, according to the result of the acdbEntDel() call.

Attributes and polyline vertices cannot be deleted independently from their parent entities; acdbEntDel() operates only on main entities. If you need to delete an attribute or vertex, you can use acedCommand() or acedCmd() to invoke the AutoCAD ATTEDIT or PEDIT commands, or use acdbEntMod() to redefine the entity without the unwanted subentities.

If acdbEntDel() succeeds, it returns RTNORM; otherwise, it returns an error code. When acdbEntDel() fails, it sets the system variable ERRNO to a value that indicates the reason for the failure.

Do not pass symbol tables and symbol table entries to acdbEntDel().

Parameters

Parameters Description
ent Entity to be deleted or restored

Was this information helpful?