tablet

AutoCad AutoLISP Functions

 
tablet
 
 
 

Retrieves and sets digitizer (tablet) calibrations

(tablet code [row1 row2 row3 direction]) 

Arguments

code

An integer that can be one of the following:

0 Return the current digitizer calibration. In this case, the remaining arguments must be omitted.

1 Set the calibration according to the arguments that follow. In this case, you must provide the new calibration settings (row1,row2,row3, and direction).

row1, row2, row3

Three 3D points. These three arguments specify the three rows of the tablet's transformation matrix.

The third element in row3 (Z) should always equal 1: tablet returns it as 1 even if you specify a different value in row3.

direction

One 3D point. This is the vector (expressed in the world coordinate system, or WCS) that is normal to the plane that represents the surface of the tablet.

If the specified direction isn't normalized, tablet corrects it, so the direction it returns when you set the calibration may differ from the value you passed.

Return Values

If tablet fails, it returns nil and sets the ERRNO system variable to a value that indicates the reason for the failure (see AutoLISP Error Codes in theAutoLISP Developer's Guide ). This can happen if the digitizer is not a tablet.

Examples

A very simple transformation that can be established with tablet is the identity transformation:

(tablet 1 '(1 0 0) '(0 1 0) '(0 0 1) '(0 0 1))

With this transformation in effect, AutoCAD will receive, effectively, raw digitizer coordinates from the tablet. For example, if you pick the point with digitizer coordinates (5000,15000), AutoCAD will see it as the point in your drawing with those same coordinates.

The TABMODE system variable allows AutoLISP routines to toggle the tablet on and off.

See Also