PyAcad 0.4.1

Output and Display Control

The functions and constants in this section are defined directly in the ads module.

High Level Functions

printf(text)
printf(pattern, argument...)
printf(pattern, key=value...)
Print the arguments to the Acad console similar to the C printf() function.
prompt(arg)
Write the unchanged argument to the Acad console. Any Python object can be supplied as argument.
princ(arg) -> arg
Write the unchanged argument to the Acad console and return it. Any Python object can be supplied as argument.
prin1(arg) -> arg
Write the "expanded" argument to the Acad console and return it. Any Python object can be supplied as argument.
prin_t(arg) -> arg
Write the "\nexpanded " argument to the Acad console and return it. Any Python object can be supplied as argument. (The strange name is chosen because the lispish "print" is a reserved word in Python).
redraw()

Redraw the Autocad/Intellicad graphics screen as with the REDRAW command.

To redraw a single entity, use the redraw() method of the ads_ename object.

graphscr()
Switch to the Autocad/Intellicad graphics screen.
textscr()
Switch to the Autocad/Intellicad text screen.
textpage()
Switch to the Autocad/Intellicad text screen after (possibly) clearing it.
menucmd()
Not implemented yet.

Low Level Functions

grclear()
Not implemented yet.
grdraw(from, to, color [, hl])
Draws a vector between two points in the current viewport. The from and to arguments specify the endpoints of the vector, expressed in the current UCS. The color argument is an integer with a valid Autocad/Intellicad color number (0 - 255). If the color is -1, the vector is drawn in XOR ink, which complements anything it draws over and erases itself when overdrawn. If the hl argument is given and nonzero, the vector is highlighted; if hl is 0, the vector is drawn in normal display mode.
grvecs()
Not implemented yet.
grread()
Not implemented yet.
grtext()
Not implemented yet.