The variables listed in this chapter access DataCAD's internal variables.
These variables can only be passed as mode IN parameters; they cannot
be used as mode OUT or mode IN OUT parameters. They can be read from
and written to like regular variables. All these variables can be accessed
from DataCAD.

When your macro performs a function similar to a DataCAD function
(adding special door types, for instance), use the DataCAD variable
for that function (door height, thickness, etc.).

I/O Variables

Plotter Variables

The variables in this section contain various user settings. These
variables do not effect plotting as done through DCAL, but instead effect
plotting done through DataCAD. They are available in DCAL so that a
macro can be consistent with the DataCAD Plotting menu.

pltcentx

pltcentx : real;

The x value of the center of the current plot, as defined in world
coordinates.

pltcenty

pltcenty : real;

The y value of the center of the current plot, as defined in world
coordinates.

pltcolor

pltcolor : boolean;

The current user setting for producing a color plot.

pltpcustx

pltpcustx : real;

The custom x paper size in inches. Notice that the units are inches,
not 1/32s of an inch which is the base unit in world coordinates.

pltpcusty

pltpcusty : real;

The custom y paper size in inches. The following code determines
the world coordinate sizes of the currently selected paper size:

IF pltpsize = 1 THEN

x := 10.5;

y := 8.0;

ELSIF pltpsize = 2 THEN

x := 16.0;

y := 10.0;

ELSIF pltpsize = 3 THEN

x := 21.0;

y := 16.0;

ELSIF pltpsize = 4 THEN

x := 33.0;

y := 21.0;

ELSIF pltpsize = 5 THEN

x := 43.0;

y := 33.0;

ELSE

x := pltpcustx;

y := pltpcusty;

END;

{ convert from inches to world coordinates }

x := x * 32.0;

y := y * 32.0;

pltpensort

pltpensort : boolean;

The current user setting for pen sorting.

pltpenspeed

pltpenspeed : integer;

The setting of the plotter pen speed. Not all plotters support pen
speeds set within the program.

pltpenwidth

pltpenwidth : integer;

The setting of the plotter pen width.

pltpsize

pltpsize : integer;

The paper size used by the plotter. The following values are valid:

1 8 x 10.5

2 10 x 16

3 16 x 21

4 12 x 32

5 33 x 43

6 Custom (see pltpcustx and pltpcusty)

pltrot

pltrot : boolean;

true when DataCAD rotates the plots.

pltrotang

pltrotang : real;

When pltrot is true, pltrotang is the angle of rotation for the plot.

pltrotcentx

pltrotcentx : real;

The x value of the center of rotation when DataCAD is doing a rotated
plot.

pltrotcenty

pltrotcenty : real;

The y value of the center of rotation when DataCAD is doing a rotated
plot.

pltscalenum

pltscalenum : integer;

The current plotter scale index setting. See the procedure scale_get
for more information on scale indices.

Data Variables

Doors, Walls , and Windows

These variables access information about doors, walls, and windows.
Most of these variables are accessible from the Architect menu.

centwall

centwall : boolean;

true if you are currently specifying walls by their center lines.
When centwall is false, walls are drawn by one side and DataCAD asks
you to point to the other side.

cut_lyr

cut_lyr : layer;

The layer that DataCAD searches for wall lines when cut_srch is true.

cut_srch

cut_srch : boolean;

Controls whether the DataCAD cutout function searches for lines on
the current layer (cut_srch = false) or on the layer determined by cut_lyr
(cut_srch = true).

docut

docut : boolean;

true when the procedure that places a door or window in a wall cuts
the wall opening, otherwise the wall is not cut. This is the same variable
as is toggled on the Architect menu.

dojamb

dojamb : boolean;

true when jambs are drawn when an opening is cut. This is the same
variable as is toggled on the Architect menu.

doorang

doorang : real;

The angle that determines the opening of a door. This is the same
variable that is accessed from the Doors menu under Architect.

doorhgt

doorhgt : real;

The height of a door.

doorthk

doorthk : real;

The door thickness.

doortype

doortype : integer;

The type of door being drawn at the DataCAD Door menu. Its values
are:

0 Single

1 Double

2 Bi-fold

3 Sliding

glassthk

glassthk : real;

The thickness of the pane of glass that is drawn in the window routines.
A thickness of zero means only one line is drawn, rather than two.

headhgt

headhgt : real;

The header height for windows.

jambwth

jambwth : real;

The jamb width for doors and windows.

sidedoor

sidedoor : boolean;

true when doors and windows are drawn by their sides (jambs). false
when they are drawn by their center and one side. This variable is used
for both doors and windows.

sillhgt

sillhgt : real;

The window sill height.

sillin

sillin : real;

The window sill width on the inside of the wall.

sillout

sillout : real;

The window sill width on the outside of the wall.

wallend

wallend : integer;

The wall end condition; valid values are:

wall_none Nothing is done at the ends.

wall_clip T-intersect with nearest wall.

wall_cap Wall is capped.

wallhilite

wallhilite : boolean;

Controls wall highlighting when getesc is called.

wallhiliteout

wallhiliteout : boolean;

Controls whether wall highlighting highlights the inside or outside
wall. true means the outside wall is highlighted when wallhilite is
also true.

wallhilitecolor

wallhilitecolor : integer;

wallhilitecolor is the color used for highlighting wall lines.

wallhilitewidth

wallhilitewidth : integer;

The line width (weight) used for highlighting wall lines.

wallson

wallson : integer;

Determines when walls are drawn. The valid values for wallson are:

wall_on Draw walls.

wall_off Don't draw walls.

wall_on and wall_off are described in the "Constants" chapter.

wallwidth

wallwidth : real;

The current wall width being drawn.

Entity Property Variables

The variables in this section are associated with entities that are
added to the drawing database.

lineattr

lineattr : integer;

Contains the attribute that is assigned to added entities. This value
is put into the attr field of a variable of type entity. This is used
for such purposes as distinguishing hatching lines from wall boundary
lines.

linecolor

linecolor : integer;

The color assigned to the entities that are added to the database.
This variable is assigned by layer, and changing its value changes the
value for the current layer only. Changing this variable does not change
the color of the layer name on the screen. You must call wrtlyr to force
the layer name to change.

lineosht

lineosht : real;

The current line overshoot factor. Each line is drawn this distance
past its actual end point.

linespcg

linespcg : real;

The current line spacing distance. It is the distance of each line
pattern repeat (dot to dot, dash to dash, etc).

linetype

linetype : integer;

The line type used for entities added to the database. It may take
any of the values: ltype_solid, ltype_dotted, ltype_dashed, or ltype_dotdash.
In addition, any of the user- defined line types may be specified. These
line types are assigned numbers begining at 4; the first user line type
is given the number 4, the next 5, etc.

linewidth

linewidth : integer;

linewidth is the line width (also called line weight) given to entities
added to the database. This value is assigned to the field width of
a variable of type entity.

Polygon Variables

The variables in this section are used in DataCAD's 2D Polygon menu.

plyrect

plyrect : boolean;

Controls whether the 2D Polygon menu enters regular polygons or rectangles.
When it is true the menu starts off in the polygon entry state.

polycntr

polycntr : boolean;

Controls whether DataCAD adds a center point to the regular polygons
it enters on the Polygons menu. The center point is added when polycntr
is true.

polydiam

polydiam : boolean;

true creates polygons by the diameter of the inscribing or circumscribing
circle. When false, polygons are created by the center and one point
on a radius.

polyinsd

polyinsd : boolean;

true inscribes polygons inside their defining circle. When false,
polygons are circumscribed about the defining circle.

polysides

polysides : integer;

The number of sides used in the regular polygons.

polyvert

polyvert : boolean;

true when the second point entered to define a

polygon is at a vertex. When it is false, the second point defines
a point on a face of the polygon.

Symbol Variables

The variables in this section are used when entering symbols from
the template window.

symang

symang : real;

symang is the current symbol rotation around the z axis.

symenlx

symenlx : real;

symenlx is the current symbol enlargement factor in the x direction.

symenly

symenly : real;

symenly is the current symbol enlargement factor in the y direction.

symenlz

symenlz : real;

symenlz is the current symbol enlargement

factor in the z direction.

symexplode

symexplode : boolean;

true when instances of symbols entered at DataCAD's Template menu
are exploded into their constituent entities.

symzoffset

symzoffset : real;

The z offset of instances of symbols entered in DataCAD.

Processing Variables

Grid Variables

These variables control the grid on the current layer. Unless noted,
every layer has its own copy of these variables; therefore, changing
layers may cause the value of these variables to change. Changing these
variables does not cause the grid to redraw.

grid1sz

grid1sz : integer;

The size of the secondary display grid (the grid of crosses) measured
in pixels. This is a global variable, that is, there is not a unique
copy of this variable for every layer.

gridang

gridang : real;

The angle of the grid and cursor on the current layer.

gridclr

gridclr : integer;

The color of the primary display grid (the grid of dots). This is
a global variable, that is, there is not a unique copy of this variable
for every layer.

gridclr1

gridclr1 : integer;

The color of the secondary display grid (the grid of crosses). This
is a global variable, that is, there is not a unique copy of this variable
for every layer.

gridorgx

gridorgx : real;

The x coordinate of the grid origin on the current layer. Changing
this variable does not cause the grid to redraw. Each layer has its
own grid origin.

gridorgy

gridorgy : real;

The y coordinate of the grid origin on the current layer. Changing
this variable does not cause the grid to redraw. Each layer has its
own grid origin.

gridshow

gridshow : boolean;

Determines when the main grid on the current layer (the grid of dots)
is drawn.

gridshowx

gridshowx : real;

The x spacing of the grid of dots on the current layer.

gridshowy

gridshowy : real;

The y spacing of the grid of dots on the current layer.

gridshw1

gridshw1 : boolean;

true when the secondary grid (the grid of crosses ) is drawn.

gridshw1x

gridshw1x : real;

The x spacing for the secondary displayed grid.

gridshw1y

gridshw1y : real;

The y spacing for the secondary displayed grid.

gridsnap

gridsnap : boolean;

true when the cursor snaps to the snap grid.

gridsnapx

gridsnapx : real;

The x distance of the snap grid.

gridsnapy

gridsnapy : real;

The y distance of the snap grid.

numdivs

numdivs : integer;

The number of divisions that orthographic mode is using. When numdivs
= 8, orthmode snaps every 45 degrees.

orthmode

orthmode : boolean;

true when orthographic snapping mode is on. When orthmode is false,
orthographic snapping is off.

Object Snap Variables

The variables in this section control the current object snap modes.

osnap_mode

osnap_mode : integer;

For a description of the values that this variable can have, see
the "Constants" chapter.

osnap_num

osnap_num : integer;

This variable is used when one of the object snap modes currently
in use is osnap_npoint. The line or arc is divided into osnap_num divisions
before snapping occurs.

Text Variables

The variables in this section control text entry and display.

txtaline

txtaline : integer;

txtaline determines the type of text alignment

currently used when text is entered.

The allowed values are:

0 Left justified

1 Center justified

2 Right justified

txtang

txtang : real;

The angle at which text is entered.

txtaspect

txtaspect : real;

The aspect ratio of text that is entered.

txtboxclr

txtboxclr : integer;

The color of text boxes when text is too small to draw or when txton
is false. If txtboxclr is 0, then text boxes are drawn as the color
of the text entity currently being drawn.

txtboxmin

txtboxmin : integer;

When text entities are less than txtboxmin pixels tall, text boxes
are drawn instead of the text itself.

txton

txton : boolean;

When txton is true, text is drawn when text entities are drawn, subject
to txtboxmin. When txton is false, text is drawn as boxes when text
entities are drawn.

txtsize

txtsize : real;

The size (in world coordinates) of entered text.

txtslant

txtslant : real;

The slant (in radians) of entered text.

txtweight

txtweight : integer;

The line weight of entered text.

Hidden Line Removal

The variables in this section control the operation of the DataCAD
hidden line removal system.

hidecolor

hidecolor : integer;

Controls the line color used when DataCAD adds hidden lines.

hideltype

hideltype : integer;

Controls the line type used when DataCAD adds hidden lines.

hidepierce

hidepierce : boolean;

Controls the state of the pierce algorithm used in the hidden line
removal system. When hidepierce is true, pierce calculations are performed.

hidespcg

hidespcg : real;

Controls the hidden line removal line spacing factor.

hidewidth

hidewidth : integer;

Controls the line width used for hidden lines.

Miscellaneous Variables

The variables in this section control several DataCAD functions.
Some of them control how DataCAD looks, while others control what DataCAD
does.

anglestyle

anglestyle : Integer;

Controls DataCAD's current angle style:

0 Degrees, Minutes, Seconds

1 Bearings

2 Not used

3 Decimal Degrees

4 Radians

5 Gradians

aperture

aperture : boolean;

Controls the display of the "miss distance" box around
the DataCAD cursor.

arrowratio

arrowratio : Real;

Controls arrow aspect ratio: Length/Width.

arrowsize

arrowsize : Real;

Controls the size of arrows drawn in the text menu. Size is relative
to current text size.

arrowstyl

arrowstyl : Integer;

Controls the current style of arrow being drawn:

0 Open

1 Closed

2 Bridge

atrdraw

atrdraw : boolean;

When atrdraw is true visible attributes that belong to entities are
drawn along with the entity. You can't control this variable from the
standard DataCAD interface.

autopath

autopath : Boolean;

Automatic creation and setting of path for symbol files.

bigcurs

bigcurs : boolean;

Controls the drawing of the full screen cursor. When bigcurs is true,
the full screen cursor is drawn. When it is false, the small cursor
is drawn. This variable is toggled by the plus (+) key.

boxsym

boxsym : Integer;

Minimum size, in pixels, of symbols before boxes are drawn.

chamfera

chamfera : real;

The length of the chamfer for the first line entered in the Chamfer
menu.

chamferb

chamferb : real;

The length of the chamfer for the second line entered in the Chamfer
menu.

circlefact

circlefact : Real;

Factor for 2D curve drawing precision.

clockwise

clockwise : Boolean;

When true, angles increase in a clockwise direction.

constref

constref : boolean;

true when the distance read out at the bottom of the screen is the
distance from the constant reference point (usually the origin). When
constref is false, the distance is measured from the last point entered
(see refpnt).

copyflag

copyflag : Boolean;

The AndCopy toggle in Move, Rotate, and Enlarge.

crcdiv1

crcdiv1 : integer;

The default primary circle divisions used with three-dimensional
circular entities such as arcs and domes.

crcdiv2

crcdiv2 : integer;

The default secondary circle divisions used with three-dimensional
circular entities such as domes and tori.

curssz

curssz : integer;

The size, in pixels, of each arm of the small cursor.

curvecenters

curvecenters : Boolean;

Controls center point display for 2D curves.

dimcontrolpts

dimcontrolpts : boolean;

Controls the display of associative dimension control points.

dimlimits

dimlimits : boolean;

When true, limits are added to dimensions.

dimminustol

DimMinusTol : Real;

Minus tolerance amount used with DimTolerance and DimLimits.

dimminustolang

DimMinusTolAng : Real;

Minus tolerance amount used with DimTolerance and DimLimits for angular
dimensions.

dimmon

dimmon Boolean;

Controls the display of associative dimensions.

dimorient

dimorient : integer;

The current default dimensioning orientation.

0 Horizontal

1 Vertical

2 Aligned

3 Rotated

dimplustol

dimplustol : real;

Plus tolerance amount used with dimtolerance and dimlimits.

dimplustolang

dimplustolang : Real;

Plus tolerance amount used with DimTolerance and DimLimits for angular
dimensions.

dimticcolor

dimticcolor : integer;

The color of arrows to add to all dimensions.

dimtolerance

dimtolerance : boolean;

When true, tolerances are added to dimensions.

dimtxtcolor

dimtxtcolor : integer

The color of text to add to all dimensions.

distancesync

distancesync : Boolean;

The dissync toggle in the Settings menu.

distdelay

distdelay : Integer;

Delay time for distance readout.

drawlines

drawlines : boolean;

When drawlines are true, entities are drawn with their appropriate
line type. When drawlines are false, entities, even those with a user-defined
line type, are drawn with solid lines. This can speed up redrawing the
display. This variable is toggled in the Display menu under Userline.

drawmarks

drawmarks : boolean;

Controls the drawing of markers every time a point is entered. These
marks are drawn to the screen only and are not remembered. They disappear
during the next screen refresh.

dynamic

dynamic : Boolean;

The Dynamic toggle in 2D Curve Creation menus.

dynamictxt

dynamictxt : boolean;

Controls the Dynamic toggle on the Text menu.

enlcopy

enlcopy : boolean;

Controls the state of the AndCopy flag in the Enlarge menu.

filcut

filcut : boolean;

When true, the lines that are pointed to during a fillet are cut
back to join the resulting arc. When filcut is false, the lines are
not modified.

filrad

filrad : real;

The radius of the arc used for a fillet.

findhatch

findhatch : Boolean;

When false, hatch lines are ignored for entity searches in object
snapping.

hatchon

hatchon : Boolean;

Controls hatch line displays.

hither

hither : real;

The distance from the viewer to the hither clipping plane when DataCAD
is in a perspective projection.

inpstyl

inpstyl : integer;

The current style of entering points when you press (Spacebar). inpstyl
can have the following values:

0 Relative polar coordinates

1 Absolute polar coordinates

2 Relative Cartesian coordinates

3 Absolute Cartesian coordinates

lastdist

lastdist : Point;

Last distance used in Copy, Move, or Stretch.

lastenlpt

lastenlpt : Point;

Last point used for center of 2D enlargement.

lastrotpt

lastrotpt : Point;

Last point used for center of 2D rotation.

layerswitch

layerswitch : Boolean;

layerswitch is the LyrSet toggle in the Views menus.

layoutextents

layoutextents ; Boolean;

When true, only the extents of the drawing display in Plot Layout.

lyrsearch

lyrsearch : boolean;

lyrsearch controls whether DataCAD searches for entities on the current
layer or on every layer that is turned on. When this variable is true,
the search occurs on all of the layers that are on. When it is false,
the search occurs on the current layer only. This variable is toggled
at the Line, Shape, Area menus.

See also the discussion of mode_init.

maxdrag

maxdrag : Integer;

maxdrag is the maximum number of entities to consider for Move/Drag
and Rotate/Drag before using the extents box.

mrkdraw

mrkdraw : boolean;

When mrkdraw is true, markers are drawn every time a point is entered.

mircopy

mircopy : boolean;

mircopy controls the state of the AndCopy flag at the Mirror menu.

mirfixtext

mirfixtext : boolean;

mirfixtext controls the state of the FixText flag at the Mirror menu.

missdis

missdis : integer;

The size, in pixels, of the miss distance applied to searches of
the database. It is also the size of the aperture around the cursor
when aperture is true.

See also ent_near.

movcopy

movcopy : boolean;

movcopy controls the state of the AndCopy flag at the Move menu.

multipen

multipen : Integer;

multipen controls sending pen change commands to plotter.

1 Send pen change commands.

2 Do NOT send pen change commands.

nofloat

nofloat : Boolean;

When true, DataCAD's distance output uses a fixed number of digits
to the right of the decimal point as specified by the variable sigdigits.

noisy

noisy : boolean;

When noisy is set to true, DataCAD can beep. When it is false, DataCAD
does not make noises.

nounits

nounits : Boolean;

When nounits is true, DataCAD's distance output does not append the
currently-set scale units.

ovrdraw

ovrdraw : boolean;

When ovrdraw is false, line overshoots are not drawn.

ratiobox

ratiobox : boolean;

When ratiobox is true, a rubberband box is drawn from the last entered
point. The rubberband box is forced to be of a specific aspect ratio
given by ratioRatio. This rubberbanding occurs during the next call
to getpoint. Turn ratiobox on before calls to getpoint:

ratioratio

ratioratio : real;

ratioratio is the ratio of the rubberband box drawn when ratiobox
is true.

regenorder

regenorder : Integer;

regenorder controls the order in which the database is re-drawn:

0 Active layer first.

1 Active layer last.

2 In order.

rotcopy

rotcopy : boolean;

rotcopy controls the state of the AndCopy flag at the Rotate menu.

rubbx

rubbx : boolean;

When rubbx is true, a rubberband rectangle is drawn from the last
entered point. This rubberbanding occurs during the next call to getpoint.
Turn rubbx on before calls to getpoint:

rubbx := true;

result := getpoint (pt, key);

IF result = res_escape THEN

...

rubbx does not have to be turned off; the call to getpoint automatically
turns it off.

rubln

rubln : boolean;

rubln controls the rubberband line being drawn. Use it in the same
way as rubbx.

savedelay

savedelay : Integer;

savedelay is the delay time for automatic file save.

scaletype

scaletype : Integer;

Controls DataCAD's current scale type:

0 Architectural

1 Engineering

2 Decimal

3 Meters

4 Inches Fraction

5 Inches Decimal

6 Centimeters

7 Millimeters

8 Metric

scrolldis

scrolldis : real;

scrolldis represents the fraction of the screen that moves during
screen scrolling. scrolldis should be between 0.0 and 1.0, but DataCAD
does not check this range.

selecttype

selecttype : integer;

selecttype controls the current Entity, Group, Area, Fence state
when getmode is called.

Controls the quick snapping state in DataCAD. This controls the snapping
to selected 3D entities to their control points.

snapsymfast

snapsymfast : boolean;

Controls whether DataCAD searches through the description of symbols
when snapping. When true, DataCAD considers the insertion points of
symbols when calculating snap points.

srchquick

srchquick : boolean;

Controls the quick searching state in DataCAD. This controls the
searching of selected 3D entities by their control points.

srfgrid

srfgrid : boolean;

When srfgrid is true the grid associated with Bezier surface entities
(entSrf) is drawn when the entities are drawn.

srfpnts

srfpnts : boolean;

When srfpnts is true, the control points associated with Bezier surface
entities (entSrf) are drawn when the entities are drawn.

txtcurs

txtcurs : boolean;

When txtcurs is set to true before calling getpoint the text cursor
is drawn instead of the normal cross hair cursor. This is the cursor
that is used when DataCAD asks you to position some text on the drawing.
The shape and orientation of the text cursor is subject to txtang, txtsize,
txtslant, and txtaspect.

txtuseplt

txtuseplt : boolean;

Controls text scaling. When true, text is scaled relative to the
current plot scale.