C++
int acedRedraw( const ads_name ent, int mode );
File
acedads.h
Description
Redraws either the graphics viewport or a single entity, according to the arguments.
The following table shows the acceptable values for mode and the effect that each has. (If ent is not NULL but mode is 0, the call has no effect.)
Modes for acedRedraw:
Redraw mode | Action |
---|---|
1 | Redraw entity |
2 | Undraw entity (blank it out) |
3 | Highlight entity |
4 | Unhighlight entity |
If ent is NULL, acedRedraw() is identical to the AutoCAD REDRAW command.
If ent is a valid entity name, and mode is nonzero, acedRedraw() affects only the specified entity.
acedRedraw() calls must be made in matched pairs. Every call with a mode of 2 must be followed at some point by a call with a mode of 1. Every call with a mode of 3 must be followed at some point by a call with a mode of 4. Mismatched calls such as a call with a mode of 3 followed by a call with a mode of 1 are not allowed. (This is a change from the previous behaviour of this function that was necessary for display performance optimization.)
If acedRedraw() succeeds, it returns RTNORM; otherwise, it returns an error code. When acedRedraw() fails, it sets the system variable ERRNO to a value that indicates the reason for the failure.
Parameters
Parameters | Description |
---|---|
ent | Name of the entity to redraw or NULL to specify the graphics viewport |
mode | Mode in which to redraw |
Notes
The mode values can no longer be passed as negative values (that is, -1, -2, -3, and -4 are no longer allowed).
When acedRedraw() is used within an ARX application that directly opens and manipulates entities (instead of using acdbEntMod()), the acedRedraw() function will not work on entities that have their graphics queued for display (that is, changes have been made to the entitiy, but the changes have not yet been reflected on screen). This situation can occur if, within the same function, the entity is opened, modified, closed, and then acedRedraw() is called. To be sure the entitiy does not have its graphics queued, you can flush currently queued graphics by calling either the entity's draw() functions or the AcTransactionManager::flushGraphics() function.