Control of Low-Level Graphics and User Input

Certain functions provide direct access to the AutoCAD graphics screen and input devices. They enable ObjectARX applications to use some of the display and user-interaction facilities built into AutoCAD.

The acedGrText() function displays text in the status or menu areas, with or without highlighting. The acedGrDraw() function draws a vector in the current viewport, with control over color and highlighting. The acedGrVecs() function draws multiple vectors. The acedGrRead() function returns “raw” user input, whether from the keyboard or the pointing device; if the call to acedGrRead() enables tracking, the function returns digitized coordinates that can be used for dragging.

Danger: Because these functions depend on code in AutoCAD, their operation can change from release to release. Applications that call these functions may not be upward compatible. Also, they depend on the current hardware configuration. In particular, applications that call acedGrText() and acedGrRead() are not likely to work the same on all configurations unless the developer uses them as described earlier to avoid hardware-specific features. These functions do almost no error reporting and can damage the graphics screen display (see the example for a way to fix this problem).

The following sequence reverses damage to the graphics screen display caused by incorrect calls to acedGrText(), acedGrDraw(), or acedGrVecs().

acedGrText(-3, NULL, 0); 
acedRedraw(NULL, 0); 

The arguments to acedGrText() have the following meanings: -3 restores standard text, NULL == no new text, and 0 == no highlighting. The arguments to acedRedraw() have the following meanings: NULL == all entities, and 0 == entire viewport.