4D CAD Reference


Next: , Up: (dir)

About this manual

This manual is UNDER CONSTRUCTION.

Documentation on one or multiple html pages.

How to use this manual

microbizz.png
Published by Microbizz (http://www.microbizz.nl)

4D CAD plug-in for 4th Dimension
written by Adriaan van Os (adriaan@microbizz.nl)

4D CAD Reference,
written by Adriaan van Os

Special thanks to
Arend van Randen, David Righart, Justus Janssen and Hans van Os
This documentation last updated on 23 March 2014.

This manual copyright ©2005 Adriaan van Os, The Netherlands. All rights reserved
The names of the actual products and companies listed herein are the trademarks of their
respective owners.


   


Next: , Previous: Top, Up: Top

Contents

Short Contents

Table of Contents


Next: , Previous: Contents, Up: Top

1 Introduction


Next: , Up: Introduction

1.1 History

arpa.png

Development of 4D CAD started in October 1998 at ARPA-Intrabouw, a leading software developer for the building-industries in The Netherlands.

The reasons for starting the project were quite convincing. End-users were dissatisfied with 4D Draw, it missed typical CAD features and we wanted something stable, fast and powerful.

I were given the task of writing the software and a first partial development release (4D CAD 1.0d2) was ready in June 1999. Yet, many features were missing and more development releases had to follow.

New features were always discussed first with Arend van Randen and I have to thank Arend for his excellent analyses and his many valuable suggestions.

When development releases came ready, David Righart started work on the DrawToCAD test application. I thank David for his feedback, his many suggestions and bug reports and for his fine cooperation up to today.

Also I have to thank Justus Janssen for answering my endless questions about AutoCAD and for providing me with test drawings in DXF format. Justus wrote the DXF export module of DrawToCAD (which was later converted to CADExportDXF).

My father Drs. Hans van Os, a retired teacher of mathematics, wrote a first version of the CADPolyAndPoly polyline intersection function, a daunting task.

microbizz.png

In January 2001, I founded Microbizz. From then on, development continued at Microbizz and a first release version (4D CAD 1.0) was ready in July 2001. In successive months, 4D CAD was built into ARPA-Intrabouw’s application software, to the great satisfaction of end-users.

More releases and features followed and finally in November 2004, I found the time to rewrite DrawToCAD to a DemoCAD demonstration package. Work on the 4D CAD Reference started in April 2005 and will continue from there.

It is my sincere hope that 4D CAD will find enthousiastic developers and happy end-users.

Adriaan van Os
April 2005


Next: , Previous: History, Up: Introduction

1.2 Rationale

The rationale behind 4D CAD is simple. It combines the advantages of component software and integrated software.


Next: , Previous: Rationale, Up: Introduction

1.3 How to use this manual

Read the chapter on Concepts to get a fundamental understanding of 4D CAD. Take special care studying the sections on

To learn how to use 4D CAD, read the User reference chapter. The rest of the manual can be used as a reference work. Note the various indices

Important


Next: , Previous: How to use this manual, Up: Introduction

1.4 Requirements

4D CAD strives to be compatible with

Enough memory must be available to load large drawings. Importing raster images only works if Apple Quicktime is installed, both on Macintosh and on Windows.


Next: , Previous: Requirements, Up: Introduction

1.5 Installation and licensing

With 4D CAD, you received a CAD.license file. Put it

The second method ensures that the license file is copied on compilation and installation. Without a valid license file, 4D will quit when loading the CAD plugin .bundle. Please contact adriaan@microbizz.nl if there are any problems with the license file.

This software contains BSD-3 licensed LZ4 compression software, ©2011-2012 Yann Collet.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Next: , Previous: Installation and licensing, Up: Introduction

1.6 DemoCAD

democad.png

DemoCAD is a 4D application with full source code, that demonstrates how to use 4D CAD. To get started with DemoCAD, run the software and play around with the various functions, available in menus.

Then, study the source code, starting with the procedures

To get an understanding of DemoCAD internals, study

DemoCAD was written using Microbizz Toolbox, an application framework for 4th Dimension, written over the years by Adriaan van Os and used by several 4D developers in The Netherlands. This manual doesn’t discuss Microbizz Toolbox (the methods starting with the letter T), but if you are interested, study the above procedures plus

Integrated into Microbizz Toolbox are two more plug-in packages

This manual doesn’t discuss them either.

Important

DemoCAD
©2004-2011 ARPA-Intrabouw, The Netherlands
©2004-2011 Microbizz, The Netherlands


Next: , Previous: DemoCAD, Up: Introduction

1.7 Technical support

For technical support by email, write to support@microbizz.nl with a clear description of the problem, precise error codes and possibly a screendump of what you are doing.

Microbizz can provide technical training and development services. Contact adriaan@microbizz.nl for more information.


Next: , Previous: Technical support, Up: Introduction

1.8 Bibliography

Selected bibliography


Previous: Bibliography, Up: Introduction

1.9 The documentation system

This manual was created with the GNU Texinfo documentation system, using a CodeWarrior plug-in compiler written by Adriaan van Os. It was later ported to Xcode.

texinfo.png

Illustrations were created using 4D CAD and Apple Preview (and exported to the patent-free PNG format).


Next: , Previous: Introduction, Up: Top

2 User reference

This chapter describes 4D CAD from a user perspective, although with hints for developers on customization and related methods.

The mode palette section has subsections for the various modes


Next: , Up: User reference

2.1 Area

A 4D CAD area consists of the following elements

cadarea.png

More elements can be added with a Title split.

Programming
The area can be customized with CADSetDisplay.

Areas
%CAD, %CADView, %CADBackground

Methods
CADGetDisplay, CADSetDisplay.


Next: , Previous: Area, Up: User reference

2.2 Mode palette

Modes on the mode palette are:

modepalette.png

Methods
CADGetMode, CADSetMode.


Next: , Up: Mode palette

2.2.1 Intersect mode

intersectmode.png

Intersect mode is a specialized object selection mode. In this mode you can

Methods
CADSelect.


Next: , Previous: Intersect mode, Up: Mode palette

2.2.2 Enclose mode

enclosemode.png

Enclose mode is a specialized object selection mode. In this mode you can

Methods
CADSelect.


Next: , Previous: Enclose mode, Up: Mode palette

2.2.3 Touch mode

touchmode.png

Touch mode is a specialized object selection mode. In this mode you can

Methods
CADSelect.


Next: , Previous: Touch mode, Up: Mode palette

2.2.4 Reshape mode

reshapemode.png

Reshape mode is a general purpose object selection and edit mode. In this mode you can

When translating, you can

The cursor changes to an arrow cursor when it is on top of a grip handle. It is used for a reshape or resize, where you can

Object type Modifier key Solid grip handle Open grip handle
Line Drag the line’s start- or endpoint
shift Restrict movement to the line’s direction
command Anchor the line’s center
Polyline Drag a polyline vertex Move a polyline line
shift Restrict movement to an adjacent line’s direction Move the line perpendicular to its own direction
command Resize the polyline from its center Resize the polyline from its center
shift & command Resize the polyline proportionally from its center Resize the polyline proportionally from its center
Square Resize the square diagonally Resize the square horizontally or vertically
command Anchor the square’s center Anchor the square’s center
Rectangle Drag a rectangle vertex Drag a rectangle line
shift Resize the rectangle proportionally Resize the rectangle proportionally
command Anchor the rectangle’s center Anchor the rectangle’s center
Circle Resize the circle diagonally Resize the circle horizontally or vertically
command Anchor the circle’s opposite box vertex Anchor the circle’s opposite side
Ellipse Reshape the ellipse, anchoring its center Resize the ellipse horizontally or vertically
shift Resize the ellipse proportionally Resize the ellipse proportionally
command Anchor the ellipse’s opposite box vertex Anchor the ellipse’s center
Circle arc Resize the circle arc Change the circle arc’s start or end angle
Ellipse arc Reshape the ellipse arc Change the ellipse arc’s start or end angle
shift Resize the ellipse arc proportionally
String Resize the string
Raster image Resize the raster image proportionally Resize the raster image vertically or horizontally
shift Resize the raster image unrestricted (unless it is sheared) Resize the raster image proportionally
command Anchor the raster image’s center Anchor the raster image’s center
Block insert Resize the block insert proportionally Resize the block insert vertically or horizontally
shift Resize the block insert unrestricted (unless it is sheared) Resize the block insert proportionally
command Anchor the block insert’s center Anchor the block insert’s center

A reshape or resize can have the effect that an object is flipped horizontally or vertically or both horizontally and vertically. The latter is equal to a 180 degrees rotation.

Important
When you drag, you will notice that nothing happens until the cursor moves a few pixels. This is called drag hesitation and its purpose is to prevent unintentional drags caused by object selection.

Programming
Drags can be customized with CADSetDragPrefs, snaps with CADSetSnapPrefs.

Methods
CADGetGrid, CADSetGrid, CADGetSnapPrefs, CADSetSnapPrefs, CADGetDragPrefs, CADSetDragPrefs.


Next: , Previous: Reshape mode, Up: Mode palette

2.2.5 Translate mode

Translate mode is a specialized object selection and translation mode, available only by calling CADSetMode. In this mode you can

When translating, you can

Important
When you drag, you will notice that nothing happens until the cursor moves a few pixels. This is called drag hesitation and its purpose is to prevent unintentional drags caused by object selection.

Programming
Drags can be customized with CADSetDragPrefs, snaps with CADSetSnapPrefs.

Methods
CADSetMode, CADGetGrid, CADSetGrid, CADGetSnapPrefs, CADSetSnapPrefs, CADGetDragPrefs, CADSetDragPrefs.


Next: , Previous: Translate mode, Up: Mode palette

2.2.6 Zoom in mode

zoominmode.png

Zoom in mode is a specialized zoom mode. In this mode you can

Important
This mode implements stepped zooming, which makes sure that a pixel on the screen always corresponds to an integral number of units. Thus, drawing objects is more precise. This feature can be customized with CADSetZoomPrefs. Also see Zoom info bar.

Methods
CADZoom, CADGetZoom, CADAutoZoom, CADGetZoomPrefs, CADSetZoomPrefs.


Next: , Previous: Zoom in mode, Up: Mode palette

2.2.7 Zoom out mode

zoomoutmode.png

Zoom out mode is a specialized zoom mode. In this mode you can

Important
This mode implements stepped zooming, which makes sure that a pixel on the screen always corresponds to an integral number of units. Thus, drawing objects is more precise. This feature can be customized with CADSetZoomPrefs. Also see Zoom info bar.

Methods
CADZoom, CADGetZoom, CADAutoZoom, CADGetZoomPrefs, CADSetZoomPrefs.


Next: , Previous: Zoom out mode, Up: Mode palette

2.2.8 Zoom continuous mode

zoomcontinuousmode.png

Zoom continuous mode is a specialized zoom mode. In this mode you can

Important
This mode does not implement stepped zooming,

Methods
CADZoom, CADGetZoom, CADAutoZoom, CADGetZoomPrefs, CADSetZoomPrefs.


Next: , Previous: Zoom continuous mode, Up: Mode palette

2.2.9 Drag-scroll mode

dragscrollmode.png

Drag-scroll mode is a general-purpose drag-scroll and zoom mode. In this mode you can

Important
Drag-scroll only works if the corresponding scroll bar is present. The presence of scroll bars can be customized with CADSetDisplay.

Methods
CADScroll, CADScrollTo, CADGetScroll, CADZoom, CADGetZoom, CADAutoZoom, CADGetDisplay, CADSetDisplay. CADGetZoomPrefs, CADSetZoomPrefs.


Next: , Previous: Drag-scroll mode, Up: Mode palette

2.2.10 Draw line mode

drawlinemode.png

Draw line mode is a specialized mode to draw lines. In this mode you can

Line objects are created on the Current layer and with the Current drawing attributes.

Programming
Line drawing can be customized with CADSetDragPrefs, snaps with CADSetSnapPrefs.

Methods
CADAddLine, CADGetCurrentLayer, CADSetCurrentLayer, CADGetDefaults, CADSetDefaults, CADGetGrid, CADSetGrid, CADGetSnapPrefs, CADSetSnapPrefs, CADGetDragPrefs, CADSetDragPrefs.


Next: , Previous: Draw line mode, Up: Mode palette

2.2.11 Draw polyline mode

drawpolylinemode.png

Draw polyline mode is a specialized mode to draw polylines. In this mode you can

Polyline objects are created on the Current layer and with the Current drawing attributes. A closed polyline object must have at least three vertices, an open polyline at least two.

Programming
Polyline drawing can be customized with CADSetDragPrefs, snaps with CADSetSnapPrefs.

Methods
CADAddPolyLine, CADGetCurrentLayer, CADSetCurrentLayer, CADGetDefaults, CADSetDefaults, CADGetGrid, CADSetGrid, CADGetSnapPrefs, CADSetSnapPrefs, CADGetDragPrefs, CADSetDragPrefs.


Next: , Previous: Draw polyline mode, Up: Mode palette

2.2.12 Draw square mode

drawsquaremode.png

Draw square mode is a specialized mode to draw squares. In this mode you can

Square objects are created on the Current layer and with the Current drawing attributes.

Programming
Square drawing can be customized with CADSetDragPrefs.

Methods
CADAddSquare, CADGetCurrentLayer, CADSetCurrentLayer, CADGetDefaults, CADSetDefaults, CADGetDragPrefs, CADSetDragPrefs.


Next: , Previous: Draw square mode, Up: Mode palette

2.2.13 Draw rectangle mode

drawrectanglemode.png

Draw rectangle mode is a specialized mode to draw rectangles. In this mode you can

Rectangle objects are created on the Current layer and with the Current drawing attributes.

Programming
Rectangle drawing can be customized with CADSetDragPrefs, snaps with CADSetSnapPrefs. To set a fixed-width or fixed-length drawing default, call CADSetDefaults.

Methods
CADAddRectangle, CADGetCurrentLayer, CADSetCurrentLayer, CADGetDefaults, CADSetDefaults, CADGetGrid, CADSetGrid, CADGetSnapPrefs, CADSetSnapPrefs, CADGetDragPrefs, CADSetDragPrefs.


Next: , Previous: Draw rectangle mode, Up: Mode palette

2.2.14 Draw circle mode

drawcirclemode.png

Draw circle mode is a specialized mode to draw circles. In this mode you can

Circle objects are created on the Current layer and with the Current drawing attributes.

Programming
Circle drawing can be customized with CADSetDragPrefs.

Methods
CADAddCircle, CADGetCurrentLayer, CADSetCurrentLayer, CADGetDefaults, CADSetDefaults, CADGetDragPrefs, CADSetDragPrefs.


Next: , Previous: Draw circle mode, Up: Mode palette

2.2.15 Draw ellipse mode

drawellipsemode.png

Draw ellipse mode is a specialized mode to draw ellipses. In this mode you can

Ellipse objects are created on the Current layer and with the Current drawing attributes.

Programming
Ellipse drawing can be customized with CADSetDragPrefs, snaps with CADSetSnapPrefs.

Methods
CADAddEllipse, CADGetCurrentLayer, CADSetCurrentLayer, CADGetDefaults, CADSetDefaults, CADGetGrid, CADSetGrid, CADGetSnapPrefs, CADSetSnapPrefs, CADGetDragPrefs, CADSetDragPrefs.


Next: , Previous: Draw ellipse mode, Up: Mode palette

2.2.16 Draw circle arc mode

drawcirclearcmode.png

Draw circle arc mode is a specialized mode to draw circle arcs. In this mode you can

Circle arc objects are created on the Current layer and with the Current drawing attributes.

Programming
Circle arc drawing can be customized with CADSetDragPrefs.

Methods
CADAddCircleArc, CADGetCurrentLayer, CADSetCurrentLayer, CADGetDefaults, CADSetDefaults, CADGetDragPrefs, CADSetDragPrefs.


Next: , Previous: Draw circle arc mode, Up: Mode palette

2.2.17 Draw ellipse arc mode

drawellipsearcmode.png

Draw ellipse arc mode is a specialized mode to draw ellipse arcs. In this mode you can

Ellipse arc objects are created on the Current layer and with the Current drawing attributes.

Programming
Ellipse arc drawing can be customized with CADSetDragPrefs, snaps with CADSetSnapPrefs.

Methods
CADAddEllipseArc, CADGetCurrentLayer, CADSetCurrentLayer, CADGetDefaults, CADSetDefaults, CADGetGrid, CADSetGrid, CADGetSnapPrefs, CADSetSnapPrefs, CADGetDragPrefs, CADSetDragPrefs.


Next: , Previous: Draw ellipse arc mode, Up: Mode palette

2.2.18 Special click mode

specialclickmode.png

In 4D Draw emulation mode, that is for areas of type _4DDraw, clicking with the mouse in Special click mode sets a new 4D Draw coordinate origin. This also works when the rulers are not displayed.

In 4D CAD modes, the purpose of special click mode is application specific. Typical examples are

Dependent on the setting of theSpecialClickModeModifiers parameter of CADSetAreaPrefs, you can

Important
In 4D CAD modes, implementation is left to the application developer (see kCADEventIDSpecialClick and CAD events and for example code the EDtCEvent method in DemoCAD).

Methods
CADAddInsert, CADAddInsertXY, CADGetAreaPrefs, CADSetAreaPrefs, CADGetOnEvent, CADSetOnEvent, CADOnEvent.


Next: , Previous: Special click mode, Up: Mode palette

2.2.19 Write string mode

writestringmode.png

The purpose of write string mode is to add and edit strings. The string

String editing in the form of a string edit box is built into 4D CAD.

Dependent on the setting of theWriteStringModeModifiers parameter of CADSetAreaPrefs, you can also

Important
The application can overrule the built-in string editor with CADSetAreaPrefs (also see kCADEventIDWriteString and CAD events and the EDtCEvent method in DemoCAD).

Methods
CADAddString, CADGetCurrentLayer, CADSetCurrentLayer, CADGetStrDefaults, CADSetStrDefaults, CADGetAreaPrefs, CADSetAreaPrefs, CADGetOnEvent, CADSetOnEvent, CADOnEvent.


Next: , Previous: Write string mode, Up: Mode palette

2.2.20 Clip box mode

clipboxmode.png

Clip box mode sets a clipping rectangle. In this mode you can

The Clip box is used

Programming
The clip box can be read with CADGetClipBox and set with CADSetClipBox.

Methods
CADGetClipBox, CADSetClipBox, CADAutoZoom, CADPrint.


Previous: Clip box mode, Up: Mode palette

2.2.21 Printing preview mode

printpreviewmode.png

Printing preview mode shows a preview of how a drawing would print on paper, with numbered pages. In this mode you can

To calculate the number of pages, their size and alignment, 4D CAD uses the area’s current settings for

Methods
CADPrint, CADPageSetup, CADGetPaperSizes, CADGetScale, CADSetScale, CADGetClipBox, CADSetClipBox, CADGetPrintSpecs, CADSetPrintSpecs.


Next: , Previous: Mode palette, Up: User reference

2.3 Tool palette

toolpalette.png

With the buttons on the tool palette you can

Methods
CADCommand.


Next: , Previous: Tool palette, Up: User reference

2.4 Measure pane

The measure pane is used to display and edit metrical values of selected objects.

measurepane.png

In the measure pane you can

Special considerations

Programming
The measure pane can be customized with CADSetMeasurePrefs.

Methods
CADGetMeasurePrefs, CADSetMeasurePrefs.


Next: , Previous: Measure pane, Up: User reference

2.5 Anchor pane

anchorpane.png

The Anchor pane determines which part of an object is anchored (stays in place) when in the Measure pane a width, length or line length value is changed.

Important
The anchor pane specifies each object’s anchor in its unrotated and unmirrored state. When objects are mirrored or rotated, their anchors will be mirrored and rotated also.


Next: , Previous: Anchor pane, Up: User reference

2.6 Zoom info bar

zoominfobar.png

The zoom info bar displays the size of a screen pixel, measured in the area’s unit (see Unit and scale).

4D CAD implements stepped zooming, which makes sure that a pixel on the screen corresponds to an integral number of units. Thus, drawing objects is more precise (this feature can be customized with CADSetZoomPrefs).

In rare cases, the zoom info bar will display an error code instead. This happens when a screen refresh causes an error. If so, click on the zoom info bar to reset it.

Methods
CADZoom, CADGetZoom, CADAutoZoom, CADGetZoomPrefs, CADSetZoomPrefs.


Next: , Previous: Zoom info bar, Up: User reference

2.7 Title split

A title split splits off left and top title views. The title views scroll in a special manner, most suitable to keep column and row titles into view, as in a spreadsheet. The figure shows (dimmed in the background) a planboard application, written in 4D CAD.

titlesplit.png

Programming

Methods
CADGetTitleSplit, CADSetTitleSplit, CADZoom, CADAutoZoom, CADGetZoom, CADScroll, CADScrollTo, CADGetScroll.


Next: , Previous: Title split, Up: User reference

2.8 Grips and blips

gripsandblips.png

In the figure you see centerblip.png center blips, solidgrip.png solid grip handles and opengrip.png open grip handles for selected objects of diverse type. Note that the Cursor will change to an arrow cursor when you move it on top of a blip or grip handle.

The functions of grips and blips are discussed in the Reshape mode, Translate mode and various draw mode subsections. Not all grip handles will be present for objects with locks (see Locking).

Methods
CADGetLock, CADSetLock, CADGetLockByMask, CADSetLockByMask, CADGetObjLock, CADSetObjLock, CADGetObjLockMask, CADSetObjLockMask.


Next: , Previous: Grips and blips, Up: User reference

2.9 Current layer

All user operations work on the current layer. Typically, the application implements a dialog that lets you set the current layer. Please note that an empty drawing has no Layer, nor a current layer.

Important

Programming
To create a current layer in an empty drawing, call CADAddLayer and CADSetCurrentLayer.

Methods
CADAddLayer, CADGetCurrentLayer, CADSetCurrentLayer.


Next: , Previous: Current layer, Up: User reference

2.10 Current drawing attributes

In the various draw modes, new user objects are drawn with current drawing attributes. Typically, the application implements a dialog that lets you enter these attributes as defaults

Important

Methods
CADGetDefaults, CADSetDefaults, CADGetStrDefaults and CADSetStrDefaults.


Next: , Previous: Current drawing attributes, Up: User reference

2.11 Double-click

Typically, the application implements object information dialogs that let you view and edit metrical data and object attributes. These dialogs show up when you double-click an object. There are several flavours of object information dialogs

The multiple objects variant must have an extra checkbox for each object attribute in the dialog. When the dialog is confirmed and the checkbox is set, the value entered for the attribute is applied to all objects in the selection.

Important
Implementation of object information dialogs is left to the application developer (for example code see the EDtCEvent method in DemoCAD).


Next: , Previous: Double-click, Up: User reference

2.12 Copy and paste

With copy and paste you can generally

In 4D CAD this applies to selected objects in drawings and to selected characters in a measure pane edit box. In particular, you can

Special considerations

Programming
Installing an event procedure gives the programmer full control over copy and paste, see Copy and paste control.

Methods
CADGetOnEvent, CADSetOnEvent, CADCommand, CADGotoPage, CADGetKeyMask, CADSetKeyMask, CADMoveTo, CADCopyTo, CADCopyObjTo, CADCopyBlocks, CADCompareBlock, CADCompareObj.


Next: , Previous: Copy and paste, Up: User reference

2.13 Undo and redo

4D CAD implements single undo and redo. You can

Special considerations

Programming
See Undo handling.

Methods
CADGetOnEvent, CADSetOnEvent, CADGetUndoPrefs, CADSetUndoPrefs, CADTriggerUndo, CADResetUndo.


Next: , Previous: Undo and redo, Up: User reference

2.14 Snaps

Snaps are like magnetic points, they attract the cursor when you drag or draw. Is the cursor too near, then it snaps to the magnetic point. Snaps are visible in the drawing as small circles. They are defined for

Special considerations

Important
The application can add custom snaps to a block with CADSetBlockAddedSnaps. It can determine which snaps are active, by calling CADSetLayerAttributes, CADSetBlockSnapMask and CADSetSnapPrefs. Snapping grids can be set up with CADSetGrid.

Methods
CADGetSnapPrefs, CADSetSnapPrefs, CADFindSnap, CADGetLayerAttributes, CADSetLayerAttributes, CADGetGrid, CADSetGrid, CADGetBlockAddedSnaps, CADSetBlockAddedSnaps, CADGetBlockSnapMask, CADSetBlockSnapMask.


Next: , Previous: Snaps, Up: User reference

2.15 Fast dragging

Normally, full animation is used when you draw or drag objects. 4D CAD was designed to be very fast, but in special circumstances full animation may be too slow (e.g. when working with large raster images). If so, press the option key to draw or drag an outline instead of the full object.

Important
This feature can be customized with CADSetDragPrefs.

Methods
CADGetDragPrefs, CADSetDragPrefs.


Next: , Previous: Fast dragging, Up: User reference

2.16 Using the keyboard

With the keyboard you can

Programming
See Event handling.

Methods
CADGetOnEvent, CADSetOnEvent.


Next: , Previous: Using the keyboard, Up: User reference

2.17 Using the mouse wheel

With the mouse wheel you can, by default

Important
The use of the mouse wheel can be customized with CADSetMouseWheelPrefs.

Methods
CADGetMouseWheelPrefs, CADSetMouseWheelPrefs.


Previous: Using the mouse wheel, Up: User reference

2.18 String editing

In a 4D CAD string edit box, you can apply the following edit operations:

editboxwithcaret.png
multi-editbox.png

If a caret is shown

editboxwithselection.png
multi-editbox-with-selection.png

If a selection is highlighted

The edit box automatically grows and shrinks with the size of the text. If it can not grow, as it has reached the visible edges of the drawing, the text inside the edit box automatically scrolls.

editboxrotated.png

The string edit box has the same position and rotation angle as the text in the drawing.

Multi-line edit boxes

In string editing mode, a single click creates (on mouse-up) a single-line edit box, with a default maximum of 255 characters. Clicking the mouse while dragging a box, creates a multi-line edit box, with a default maximum of 32700 characters.

multiline-left-aligned.png
multiline-centered.png

A single-line string has one (or two) open grips that can be used to resize the string. A multi-line string is different

A single-line string can later be changed into a multi-line string and vice-versa. 4D CAD drawings stored prior to 4D CAD 2.0 contain single-line strings with a maximum length of 255 characters.


Next: , Previous: User reference, Up: Top

3 Concepts

Elementary mathematics

Base elements of a drawing

Area attributes

Object attributes

Application data

Transforms


Next: , Up: Concepts

3.1 Coordinates

Unlike 4D Draw, 4D CAD follows mathematical conventions for coordinates

4D CAD is two-dimensional (there are no 3D features).

Coordinates are 64-bit floating-point values, see Unit and scale.

This manual uses the . for decimal fractions The notation for a point with X-coordinate 1.23 and Y-coordinate −4.56 is (1.23,−4.56).

Methods
CADDistanceXY.


Next: , Previous: Coordinates, Up: Concepts

3.2 Angle

Unlike 4D Draw, 4D CAD follows mathematical conventions for angles

In 4D CAD, angles are always given in degrees, never in radians. The range is 0 to 360 or −180 to 180.

Methods
CADRotateXY.


Next: , Previous: Angle, Up: Concepts

3.3 Goniometry

(under construction)

Methods
CADSin, CADCos, CADArcSin, CADArcCos, CADArcTan2.


Next: , Previous: Goniometry, Up: Concepts

3.4 Linear transformation matrix

A linear transformation matrix is a mathematical tool for describing linear transformations

Any sequence of these operations in a 2-dimensional plane can be described by one linear transformation matrix of 6 parameters. It can do the following

Because parallel lines stay parallel, a linear transformation matrix can describe a 3D isometric projection, but not a 3D perspective projection.

The transformation of a triangle into another triangle uniquely identifies a linear transformation matrix (CADCalcMatrix).

Applying a linear transformation matrix with CADTransform is generally more efficient than a succession of singular operations (CADTranslate, CADScale, CADMirror, CADRotate and CADShear).

Objects of type Block insert and Raster image have a linear transformation matrix attached

The matrix that doesn’t change anything is called the identity matrix (CADIdentityMatrix). A matrix that describes one sequence of the operations scale, rotate and translate (in that order) is called a standard matrix (CADStandardMatrix). A matrix that undoes the effect of another matrix is called an inverse matrix (CADInvertMatrix).

Applying one matrix transformation on another is called a matrix multiplication (CADTransformMatrix). The term multiplication is somewhat misleading. When multiplying two numbers, the order of the two numbers is not important. But when multiplying two matrices the order is important.

Methods
CADIdentityMatrix, CADStandardMatrix, CADTranslateMatrix, CADRotateMatrix, CADScaleMatrix, CADMirrorMatrix, CADShearMatrix, CADTransformMatrix, CADFlipMatrix, CADStretchMatrix, CADInvertMatrix, CADCalcMatrix, CADGetMatrixPlane.


Next: , Previous: Linear transformation matrix, Up: Concepts

3.5 ID

An ID is a number (of type longint) that uniquely identifies an element of a drawing.


Next: , Previous: ID, Up: Concepts

3.6 Layer

Layers are like transparent sheets laying op top of each other, with objects glued to them.

layers.png

The layer order determines the drawing order of the objects, although there is a second drawing order, that of the objects of each layer. Within a layer, objects can be moved to the front or to the back of the layer. The layer itself can be moved in front of or behind other layers.

The next figure shows a drawing where some of the layers are dimmed. Each layer can be in one of the following modes

layersdim.png

So, for example, to create the situation in 4D Draw, you would have

Of course, 4D CAD gives you more power to work with layers than 4D Draw does. Other attributes of a layer are

A layer ID passed as a Scope ID, describes all objects on the layer.

Methods
CADAddLayer, CADRemoveLayer, CADGetLayers, CADGetLayerAttributes, CADSetLayerAttributes, CADGetGrid, CADSetGrid, CADGetLayerKey, CADSetLayerKey, CADGetLayerOrder, CADSetLayerOrder, CADGetCurrentLayer, CADSetCurrentLayer, CADGetSnapPrefs, CADSetSnapPrefs.


Next: , Previous: Layer, Up: Concepts

3.7 Sublayer

Sublayers are a further subdivision of layers (see Layer), but there are some differences

Sublayers are automatically created when importing DXF/DWG files. A sublayer can be the Current layer.

When a sublayer and its parent layer have different attribute values, the weakest value wins. For example, when the layer is dimmed and the sublayer is visible, any object on the sublayer will still be dimmed.

A sublayer ID passed as a Scope ID, describes all objects on the sublayer.

Methods
CADAddSubLayer, CADRemoveLayer, CADGetSubLayers, CADGetLayerAttributes, CADSetLayerAttributes, CADGetLayerKey, CADSetLayerKey, CADGetCurrentLayer, CADSetCurrentLayer, CADGetSnapPrefs, CADSetSnapPrefs.


Next: , Previous: Sublayer, Up: Concepts

3.8 Block

Blocks are like mini drawings. The figure shows a block, inserted at two different places in the drawing.

blocks.png

Inserting a block does not copy the objects of the block. A reference to the block is created in the form of a block insertion object. The block insertion object (or Block insert for short) has a number of attributes

A block can be inserted not only in a drawing but also in another block. DemoCAD lets you edit blocks recursively with option double-click, the code is worth studying.

In fact, there is little difference between a block and the true drawing, except that the true drawing has a drawing plane attached and is immediately visible. The true drawing can be considered the root block in the drawing’s block hierarchy and for programming purposes the true drawing is considered a block with a special block ID assigned, kCADRootBlockID.

A block has the following attributes

Methods
CADAddBlock, CADRemoveBlock, CADGetBlocks, CADGetBlockInfo, CADSetBlockName, CADGetBlockKey, CADSetBlockKey, CADAddInsertXY, CADAddInsert, CADObjInsert, CADGetInsertID, CADGetInsert, CADGetInsertXY, CADSetInsertID, CADSetInsert, CADSetInsertXY, CADGetInsertColor, CADSetInsertColor, CADClear.


Next: , Previous: Block, Up: Concepts

3.9 Object


Next: , Up: Object

3.9.1 Line

(under construction)


Next: , Previous: Line, Up: Object

3.9.2 Polyline

(under construction)


Next: , Previous: Polyline, Up: Object

3.9.3 Square

(under construction)


Next: , Previous: Square, Up: Object

3.9.4 Rectangle

(under construction)


Next: , Previous: Rectangle, Up: Object

3.9.5 Circle

(under construction)


Next: , Previous: Circle, Up: Object

3.9.6 Circle arc

(under construction)


Next: , Previous: Circle arc, Up: Object

3.9.7 Ellipse

(under construction)


Next: , Previous: Ellipse, Up: Object

3.9.8 Ellipse arc

(under construction)


Next: , Previous: Ellipse arc, Up: Object

3.9.9 String

(under construction)


Next: , Previous: String, Up: Object

3.9.10 Raster image

(under construction)


Previous: Raster image, Up: Object

3.9.11 Block insert

(under construction)

Also see Block.


Next: , Previous: Object, Up: Concepts

3.10 Scope

An object scope describes a set of objects. It can have different forms:

4D CAD differentiates between the various IDs, so you can pass any of the above values as a scope ID. The method CADTypeOfScope returns which kind of scope an ID is.

4D CAD methods that expect an object ID operate on a single object, those that expect a scope ID operate on a number of objects (0 or more). Letting 4D CAD operate on a scope is faster and more convenient than working with single objects in a loop (Iterating object scopes).

A target object scope is a scope that a method will change. It can be kCADScopeSelectedObjects or a programmer scope. By passing a programmer scope, you can manipulate objects while leaving the current user selection of objects intact. This is a fundamental programming concept, not found in 4D Draw.

Call CADRemoveScope when you are finished using a programmer scope. CADRemoveBlock removes all programmer scopes attached to the block. CADClear removes all programmer scopes in an area. All other scopes are maintained automatically by 4D CAD.

Scopes change when you remove objects from it (CADFromScope), add objects to it (CADToScope) or apply logical operations on it like addition, negation and intersection (CADScopeLogic).

Be aware that object scopes can change automatically as a result of user operations or as a side effect of methods being called:

By intercepting certain CAD events, you can manipulate the object scope the user operates on.

Important
An object scope describes objects in a block or in the root drawing. It can not enclose objects in several blocks.

Methods
CADAddScope, CADRemoveScope, CADGetScopeIDs, CADTypeOfScope, CADCount, CADGetObjIDsArray, CADOneObjID, CADGetObjID, CADEmptyScope, CADCopyScope, CADToScope, CADFromScope, CADInScope, CADScopeLogic.


Next: , Previous: Scope, Up: Concepts

3.11 Unit and scale

The current unit of a drawing is shown in the Zoom info bar. Default it is in mm, but you can change it by calling CADSetUnit. Setting the unit doesn’t scale current objects. Measure pane edit boxes can have their own unit, see Measure pane.

In 4D CAD, there is no arcane scaling system as in 4D Draw. There is one unit, that represents real world values in the drawing. The drawing is scaled in order to print it on a specific scale or at a given paper size. Setting the print scale doesn’t affect object metrics, as all metric values are specified and stored in real world values.

Linked to the print scale are three other scales

These scales allow you to make fine adjustments to the appearence of linetypes, markings and hatches, both on paper and on the screen. Their initial value is equal to the print scale (default 1:50).

To set the print scale, call CADSetScale. To calculate the scale for a given paper size, call CADGetPaperSizes. Fine adjustment can be made with CADSetPrintSpecs.

Methods
CADGetUnit, CADSetUnit, CADPageSetup, CADGetPaperSizes, CADGetScale, CADSetScale, CADGetPrintSpecs, CADSetPrintSpecs.


Next: , Previous: Unit and scale, Up: Concepts

3.12 Drawing plane

The drawing plane is the size of the drawing, specified in real world coordinates, and given in the area’s unit (see Unit and scale).

Default, the drawing plane is 56 meters wide and 40 meters high. At the default print scale of 1:50, it will print on A0 paper. However, you can set the drawing plane’s boundary coordinates to any 64-bit floating point value (which is large enough for a drawing of the universe in mm).

4D CAD has an auto-resize feature. If objects move outside the drawing plane, the bounds of the drawing plane are automatically extended. This is true for user actions as well as for 4D CAD methods being called.

Methods
CADGetDrawSize, CADSetDrawSize.


Next: , Previous: Drawing plane, Up: Concepts

3.13 Mode

Area modes have been discussed in the Mode palette section of the User reference chapter.

Methods
CADGetMode, CADSetMode.


Next: , Previous: Mode, Up: Concepts

3.14 Cursor

(under construction)


Next: , Previous: Cursor, Up: Concepts

3.15 Area prefs

For an overview of area preferences, see the Thematical method index.


Next: , Previous: Area prefs, Up: Concepts

3.16 Color

(under construction)


Next: , Previous: Color, Up: Concepts

3.17 Fill

(under construction)


Next: , Previous: Fill, Up: Concepts

3.18 Linewidth

(under construction)


Next: , Previous: Linewidth, Up: Concepts

3.19 Linetype

(under construction)

linetypes.png


Next: , Previous: Linetype, Up: Concepts

3.20 Marking

(under construction)


Next: , Previous: Marking, Up: Concepts

3.21 Font

(under construction)


Next: , Previous: Font, Up: Concepts

3.22 Hatch

(under construction)

hatches.png

Also see CAD hatch ID constants


Next: , Previous: Hatch, Up: Concepts

3.23 Metrics

(under construction)


Next: , Previous: Metrics, Up: Concepts

3.24 Bounds

(under construction)


Next: , Previous: Bounds, Up: Concepts

3.25 Locking

(under construction)


Next: , Previous: Locking, Up: Concepts

3.26 Keys

(under construction)


Next: , Previous: Keys, Up: Concepts

3.27 Key masks

(under construction)


Next: , Previous: Key masks, Up: Concepts

3.28 Arrays

(under construction)


Next: , Previous: Arrays, Up: Concepts

3.29 Translate

(under construction)


Next: , Previous: Translate, Up: Concepts

3.30 Scale

(under construction)


Next: , Previous: Scale, Up: Concepts

3.31 Mirror

(under construction)


Next: , Previous: Mirror, Up: Concepts

3.32 Rotate

(under construction)


Next: , Previous: Rotate, Up: Concepts

3.33 Shear

(under construction)


Next: , Previous: Shear, Up: Concepts

3.34 Transform

(under construction)


Next: , Previous: Transform, Up: Concepts

3.35 Lengthen

(under construction)


Next: , Previous: Lengthen, Up: Concepts

3.36 Stretch

(under construction)


Next: , Previous: Stretch, Up: Concepts

3.37 Flip

(under construction)


Previous: Flip, Up: Concepts

3.38 Align

(under construction)


Next: , Previous: Concepts, Up: Top

4 Programming tasks

Thematical method index

Programming style

Event control

Special programming tasks


Next: , Up: Programming tasks

4.1 Thematical method index

Drawings

Importing

Exporting

4D CAD areas

Redraws and 4D forms

Commands, events, errors and undos

Printing

Layers

Blocks

Scopes

Colors & color palette areas

Objects

Object attributes

Object metrics

Move, copy & compare

Mathematics

Linear transformation matrices

Transform & align

Demos

Version info


Next: , Previous: Thematical method index, Up: Programming tasks

4.2 Parameter passing

(under construction)


Next: , Previous: Parameter passing, Up: Programming tasks

4.3 Error handling

(under construction)

Also see the list of Error result codes.


Next: , Previous: Error handling, Up: Programming tasks

4.4 Event handling

(under construction)

Also see the chapter on CAD events.


Next: , Previous: Event handling, Up: Programming tasks

4.5 Undo handling

Methods that call CADResetUndo internally. They always clear undo data.

CADAcceptDXF
CADCancelDXF
CADClear
CADCommand (except for command kCADCmdEditSelectAll)
CADImportDXF
CADLoadFromBlob
CADLoadFromFile
CADResetUndo


Methods that call CADAutoResetUndo internally. They clear undo data if theAutoResetUndoFlag of the area is kCADTrue (see CADGetUndoPrefs and CADSetUndoPrefs).

CADAddBlock
CADAddCircle
CADAddCircleArc
CADAddEllipse
CADAddEllipseArc
CADAddImage
CADAddInsert
CADAddInsertXY
CADAddLayer
CADAddLine
CADAddPolyLine
CADAddRectangle
CADAddSquare
CADAddString
CADAddSubLayer
CADAlign
CADAlignToGrid
CADBlend
CADCopyArea (target)
CADCopyArrays (target)
CADCopyAttributes (target)
CADCopyBlocks (target)
CADCopyByMatrix (target)
CADCopyLayers (target)
CADCopyObjByMatrix (target)
CADCopyObjTo (target)
CADCopyPrefs (target)
CADCopyTo (target)
CADFlipObj
CADImportImage
CADLengthenObj
CADMirror
CADMoveByMatrix (source and target)
CADMoveTo (source and target)
CADMoveToBack
CADMoveToFront
CADPageSetup
CADPolyUndouble
CADPrint
CADPrintToPDF
CADRemoveArray
CADRemoveBlock
CADRemoveLayer
CADRemoveObj
CADRotateObj
CADRotate
CADScale
CADSetBlockName
CADSetCircleArc
CADSetCircle
CADSetClipBox
CADSetColor
CADSetDrawSize
CADSetEllipseArc
CADSetEllipse
CADSetFill
CADSetFont
CADSetGrid
CADSetHatch
CADSetImage
CADSetImageXY
CADSetInsertColor
CADSetInsert
CADSetInsertID
CADSetInsertXY
CADSetKeyMask
CADSetLayer
CADSetLayerAttributes
CADSetLine
CADSetLineType
CADSetLineWidth
CADSetLock
CADSetLockByMask
CADSetMarking
CADSetObjLock
CADSetObjLockMask
CADSetPolyAngle
CADSetPolyLine
CADSetPrintSpecs
CADSetRectangle
CADSetRotation
CADSetScale
CADSetSquare
CADSetString
CADSetStringXY
CADSetUnit
CADShear
CADSplitPoly
CADStretchObj
CADTransform
CADTranslate


Please note that the following methods do not clear undo data:

CADSetBlockKey
CADSetCurrentLayer
CADSetKey
CADSetKeyArray
CADSetLayerOrder
CADSetLayerKey
CADSetObjKey

Also see the chapter on CAD events.


Next: , Previous: Undo handling, Up: Programming tasks

4.6 Copy and paste control

(under construction)

Also see the chapter on CAD events.


Next: , Previous: Copy and paste control, Up: Programming tasks

4.7 Storing and loading drawings

(under construction)


Next: , Previous: Storing and loading drawings, Up: Programming tasks

4.8 Importing DXF files

(under construction)


Next: , Previous: Importing DXF files, Up: Programming tasks

4.9 Importing raster images

(under construction)


Next: , Previous: Importing raster images, Up: Programming tasks

4.10 Handling raster image resolutions

(under construction)


Next: , Previous: Handling raster image resolutions, Up: Programming tasks

4.11 Handling redraws

(under construction)


Next: , Previous: Handling redraws, Up: Programming tasks

4.12 Handling 4D form pages and scrollbars

(under construction)


Next: , Previous: Handling 4D form pages and scrollbars, Up: Programming tasks

4.13 Specifying drawing orders

(under construction)


Next: , Previous: Specifying drawing orders, Up: Programming tasks

4.14 Iterating object scopes

(under construction)


Next: , Previous: Iterating object scopes, Up: Programming tasks

4.15 Converting from 4D Draw

(under construction)


Previous: Converting from 4D Draw, Up: Programming tasks

4.16 Displaying 4D CAD drawings in other plug-ins

(under construction)


Next: , Previous: Programming tasks, Up: Top

5 CAD errors and constants

Important
Please use symbolic constants (kCAD...) rather than numeric values. This makes source code better readable. And the numeric values may be subject to change without notice !

Error result codes

Parameter constants


Next: , Up: CAD errors and constants

5.1 Macintosh error codes

Macintosh error codes are returned unmodified. A list of (some) Macintosh error codes is given here. Note that most Macintosh error codes are negative values. They are not predefined as 4D constant.

Important
Macintosh error codes are retuned on the Mac and also on Windows by ASINTPPC.DLL.


Next: , Previous: Macintosh error codes, Up: CAD errors and constants

5.2 Windows error codes

Windows specific plugin error codes are not predefined as 4D constant. They are calculated by the formula PlugInError = - 25000 - WindowsErrorCode, where a list of WindowsErrorCode values is given here.


Next: , Previous: Windows error codes, Up: CAD errors and constants

5.3 Generic plugin error codes

The following constants are generic plugin and 4D error codes. Nothe that they are documented, but not predefined as 4D constant.

Value Constant Description
-19109 kLicenseNameTooLong
-19108 kLicenseBadPassword
-19107 kLicenseBadParam
-19106 kLicenseExpired
-19105 kLicenseBadSoftwareID
-19104 kLicenseNotFound
-19103 kLicenseBadCode
-19102 kLicenseBadSize
-19101 kLicenseBadVersion
-10503 k4DRecordIsOutOfRange
-9998 k4DDuplicatedKey
-9997 k4DMaximumNumberOfRecordsReached
-9992 k4DWrongPassword
-9991 k4DPrivilegesError
-9990 k4DTimeoutError
-9987 k4DAlreadyRelatedToThisRecord
-9986 k4DRecordLockedDuringAutomaticDeletion
-9985 k4DRecursiveIntegrity
-9984 k4DDuplicatedIndexCancelsTransaction
-9982 k4DRecordIsNotInTheSelection
-9981 k4DInvalidFieldSent
-9980 k4DStructureIsLocked
-9977 k4DNamedSelectionDoesNotExist
-9974 k4DRecordHasAlreadyBeenDeleted
-9972 k4DTableNumberRequestedIsOutOfRange
-9971 k4DFieldNumberRequestedIsOutOfRange
-9970 k4DFieldIsNotIndexed
-9969 k4DInvalidFieldTypeRequested
-9968 k4DInvalidSelectedRecordNumberRequested
-9967 k4DRecordCouldNotBeModifiedAndLoaded
-9966 k4DInvalidTypeRequested
-9965 k4DBadSearchDefinitionTableSent
-9964 k4DBadSortDefinitionTableSent
-9963 k4DInvalidRecordNumberRequested
-9946 k4DNamedSelectionToClearDoesntExist
-9939 k4DPluginMethodCanNotBeExecuted
-1 k4DPluginCallNotImplemented
10 k4DBadFieldType
16 k4DFieldHasNoRelation
30 k4DVariableExpected
42 k4DRecordCannotBePushed
45 k4DFieldOrVarExpected
47 k4DFieldMustBeAlpha
48 k4DSyntaxError
53 kIndexOutOfRange
54 kIncompatibleArgumentTypes
64 k4DPtrToLocalVar
65 k4DBadPtrObjType
66 k4DBadPtrMemType
67 k4DBadPtrType
68 k4DBadPtr
69 k4DBadArrayType
70 k4DBadArray
71 k4DBadIntType
72 k4DKeyNotFound
73 k4DDuplicateKeyFound
74 k4DBadFunctionResultType
75 k4DVarNotOfTypeText
76 k4DVarNotOfTypeLongint
77 k4DVarNotOfTypePicture
78 k4DTextTooLong
79 kStrTooLong
80 kBadDialog
81 kParamOutOfRange
82 k4DPrinterBusy
83 k4DSubFieldExpected
84 k4DVarNotOfTypePointer
85 k4DPtrNotOfTypeFieldOrSubField
86 k4DPtrNotOfTypeField
87 k4DPtrNotOfTypeFileOrField
88 k4DCantSearchOnThisFieldType
91 k4DTooManySortLines
92 k4DTooManySearchLines
93 k4DBadVarPtrOnServer
94 k4DBadVarRecPtrOnServer
95 k4DBadVarPtrTypeOnServer
96 k4DBadArrayTypeOnServer
97 kNilCharsHandleErr
98 kNilDataHandleErr
99 k4DMacOSGlobalsNotFound
100 kWin32PathnameTooLong
101 kWin32UnknownError
102 k4DProcedureNotFound
103 k4DBadText
105 k4DBadFunctionParamResultType
106 k4DProcessWindowNotFound
107 kWin32FontNameTooLong
108 kPrinterDoesntSupportResolution
109 kPrintTooLargeForThisResolution
110 kQuickTimeNotInstalled
111 kQuickTimeVersionTooOld
112 kMemMoveErr
113 kWin32PrintingError
114 kOffscreenError
115 kGraphBadMatrix
116 kInternalError
117 kSystemSoftwareTooOld
118 kQuickTimeUnknownErr
119 kUnresolvedLibraryFunction
120 kNumericalInstability
121 kImplementationRestriction
122 k4DBadArraySize
123 kBadParameter
124 kBadFloatStr
125 kBadLongintStr
126 kMacUnknownError
127 kBadFloatValue
128 kFloatValueOutOfRange
129 kPDFWriterError
130 kPDFDocAlreadyOpen
131 kPDFPageAlreadyOpen
132 kPDFPageNotOpen
133 kPDFBusy
134 kGraphBadPicture
135 kBadUTF8
136 kNotMacRomanStr
137 k4DPluginPackageNotFound
138 k4DPluginPackageInstalledTwice
139 k4DBadStructureDefinition
140 k4DVarNotOfTypeBlob
141 k4DSizeMismatch
142 kIntValueOutOfRange
143 kQtmlClientDLLNotFound
144 kZlibError
145 kOutlineFontNotFound
146 kUnknownFontFormat
147 kEditBoxValueNotAccepted
148 kBadResourceData
149 kBadResourceFormat
150 kBadOperation
151 kGraphBadDialog
4001 k4DBadFileNumber
4002 k4DBadRecordNumber
4003 k4DBadFieldNumber
4004 k4DNoCurrentRecord
4004 k4DNoCurrentRecord
19501 kRowValueFatalErr
19502 kRowNilFatalErr
19503 kRowIndexOutOfRange
19504 kRowBadParameter
19505 kRowBadMemMgr
19506 kRowBadMerge
19507 kRowBadElementSize
19508 kRowBadBlockCount
19509 kRowBadSwap
19510 kChainNilFatalErr
19511 kChainIncompatible
19512 kChainInternalError
19513 kChainBadSwap
19514 kChainBadMerge
19515 kChainBadParameter
19516 kFileIOBadAsyncState
19517 kFileIOBadBufferState
19518 kFileIODontDoThatAgain
19520 kBadMemMgr
19522 kReelNilParticlePtrErr
19523 kReelNilBlockPtrErr
19524 kReelNotEmptyErr
19525 kReelBadParameter
19526 kReelBadParticleSize
19527 kReelBadLogicalCount
19528 kReelBadMerge
19529 kReelBadSwap
19530 kRollBadParameter
19531 kRollNilValuePtrErr
19532 kRollBadMerge
19533 kRollIncompatible
19534 kRollBadSwap
19540 kLumpFatalSizeErr
19541 kLumpBadOffsErr
19542 kLumpNilDataPtrErr
19543 kLumpBadMemMgr
19544 kLumpValueOutOfRange
19545 kStreamBadParam
19546 kStreamBadValue
19547 kStreamBadOperation
19548 kStreamInternalError
19549 kStreamBadStoredValue
19550 kStreamBadMarkerValue
19551 kStreamEndOfInput
19552 kStreamReadBufferNotEmpty
19561 kSortBadParam
19562 kSortBadPtr
19563 kSortBadDataArraySize
19564 kSortBadPtrArraySize
19565 kSortDataNotAnArray
19570 kBufferTypesDontMatch
19574 kBufferBadType4D
19575 kSosoOnServerBusy
19576 kSosoBadCall
19577 kSosoBadDataID
19578 kSosoServerOutOfMemory
19579 kSosoServerNoResponse
19580 kProfilerStackOverflow
19581 kProfilerTriggerWasNotStarted
19582 kProfilerTriggerIsNotRunning
19583 kProfilerBadCallingChain
19584 kProfilerBadStackPtr
19585 kProfilerMissingTriggerName
19586 kProfilerBadHardware
19590 kAvlTreeBadNodeCount
19591 kAvlTreeBadParameter
19592 kAvlTreeNilPointer
19593 kAvlTreeIncompatible
19594 kAvlTreeOverflow
19595 kAvlTreeLinesNotEmpty
19596 kAvlTreeInternalError


Next: , Previous: Generic plugin error codes, Up: CAD errors and constants

5.4 CAD error codes

Value Constant Description
-128 kCADUserCanceledOperation User canceled the operation
0 kCADNoError No error
19545 kCADStreamBadParam
19546 kCADStreamBadValue
19547 kCADStreamBadOperation
19548 kCADStreamInternalError
19549 kCADStreamBadStoredValue
19550 kCADStreamBadMarkerValue
19538 kCADAvlTreeBadNodeCount
19537 kCADAvlTreeBadParameter
19536 kCADAvlTreeNilPointer
19535 kCADAvlTreeIncompatible
19700 kCADUserStop
19701 kCADBadPackPtr
19702 kCADBadAreaParam
19703 kCADBadParam
19704 kCADBadPtr
19705 kCADCommandIsDisabled
19706 kCADBadSystemSoftwareVersion
19707 kCADBadResourceSize
19708 kCADBadUnitScaleZoomParams
19709 kCADBadSubsectorPtr
19710 kCADBadObjType
19711 kCADBadTree
19712 kCADBadLayerID
19713 kCADBadObjID
19714 kCADBadObjScope
19715 kCADBadBlockID
19716 kCADBadArraySizeForThisScope
19717 kCADExpectsOneObjectSelected
19718 kCADBadLineTypeID
19719 kCADBadBoxObj
19720 kCADDuplicateBoxObjOrderID
19721 kCADBadInsertPtr
19722 kCADDXFImportSessionPendingErr
19723 kCADDXFImportSessionNotPendingErr
19724 kCADDXFBadLayerPtr
19725 kCADBlockRefError
19726 kCADNameTooLong
19727 kCADNoSuchObject
19728 kCADTooManyLayers
19729 kCADBadObjSectorLink
19730 kCADBadObjBlockPtr
19731 kCADBadSector
19732 kCADBadObjSelectionRef
19733 kCADBadObjPtr
19734 kCADCannotFillOpenPoly
19735 kCADBadDrawingSize
19736 kCADBadMatrix
19737 kCADCannotStretchObj
19738 kCADCannotCalcMatrix
19739 kCADCannotFlipObj
19740 kCADNotSquare
19741 kCADBadArraySize
19742 kCADInternalGroupIndexError
19743 kCADBadCommandNumber
19744 kCADBadPoly
19745 kCADPolyCannotBeOpen
19746 kCADInternalError
19747 kCADPolyCannotBeClosed
19748 kCADBadMarkingID
19749 kCADDuplicateOrderID
19750 kCADWalkTreeInternalError
19751 kCADSortTreeInternalError
19752 kCADCannotRemoveUsedLayer
19753 kCADImplementationRestriction
19754 kCADBadScopeID
19755 kCADCannotBeTargetScope
19756 kCADCannotPrint
19757 kCADNothingToPrintInClipBox
19758 kCADFoundCRorLFInString
19759 kCADPrintToLargeAtThisScaleOrResolution
19760 kCADTargetAreaCanNotBeSourceArea
19761 kCADArrayIDNotFound
19762 kCADArrayTypesDiffer
19763 kCADBadLayerModeToSelect
19764 kCADCannotInsertThisBlock
19765 kCADBadTypeOfKey
19766 kCADCannotLengthenObj
19767 kCADNoCurrentLayer
19768 kCADCurrentLayerNotEditable
19769 kCADRecentObjIDNotInScope
19770 kCADBadEventResult
19771 kCADBadEventPhase
19772 kCADBadClipboardAreaPtr
19773 kCADCannotPaste
19774 kCADBadLock
19775 kCADBadStoredValue
19776 kCADBadStoredMarker
19777 kCADFileCannotBeRead
19778 kCADFileVersionTooOld
19779 kCADFileVersionTooNew
19780 kCADUnexpectedEndOfInput
19781 kCADBadStructure
19782 kCADNoCADDataInPictOrBlob
19783 kCADNoRasterDataInPicture
19784 kCADNotA4DCADDrawing
19785 kCADCannotUndo
19786 kCADDuplicateObjID
19787 kCADBadHatch
19788 kCADBadHatchID
19789 kCADCannotHatchOpenPoly
19790 kCADPolyAndPolyRestriction
19791 kCADPolyAndPolyBadPolygon
19792 kCADPolyAndPolyBadVertexPtr
19793 kCADPolyAndPolyBadKnotPtr
19794 kCADPolyAndPolyBadNetwork
19795 kCADPolyAndPolyUnimplemented
19796 kCADMeasureTaskError
19797 kCADMeasurePaneInvalidFloatFormat
19798 kCADBadTypeOfMeasure
19799 kCADMeasurePaneFloatOutOfRange
19800 kCADTeighaConverterNotInstalled


Next: , Previous: CAD error codes, Up: CAD errors and constants

5.5 CAD alignment constants

Value Constant Type Description
0 kCADAlignNot longint
1 kCADAlignLeft longint
1 kCADAlignBottom longint
2 kCADAlignMid longint
3 kCADAlignRight longint
3 kCADAlignTop longint

Used by
CADAlign and CADAlignToGrid.

Also see
CAD hatch alignment constants, CAD print alignment constants, CAD raster image alignment constants, CAD scroll alignment constants, CAD string horizontal justification constants, CAD string vertical justification constants and CAD zoom alignment constants.


Next: , Previous: CAD alignment constants, Up: CAD errors and constants

5.6 CAD block ID constants

Value Constant Type Description
0 kCADRootBlockID longint

Used by
Used by many 4D CAD methods.


Next: , Previous: CAD block ID constants, Up: CAD errors and constants

5.7 CAD block type constants

Value Constant Type Description
0 kCADBlockTypeAny longint
1 kCADBlockTypeCAD longint
2 kCADBlockTypeDXF longint
3 kCADBlockTypeDRGroup longint

Used by
CADGetBlockInfo and CADGetBlocks.


Next: , Previous: CAD block type constants, Up: CAD errors and constants

5.8 CAD boolean constants

The kCADFalse and kCADTrue constants work around a strange limitation of 4D plugins, namely that they can’t have parameters of type boolean.

Value Constant Type Description
0 kCADFalse integer Boolean False equivalent
1 kCADTrue integer Boolean True equivalent

Used by
Used by 4D CAD methods that have a parameter whose name ends in Flag.


Next: , Previous: CAD boolean constants, Up: CAD errors and constants

5.9 CAD bounds type constants

Value Constant Type Description
1 kCADTypeOfBoundsLogicalBounds longint
2 kCADTypeOfBoundsPhysicalBounds longint
3 kCADTypeOfBoundsDrawBounds longint
4 kCADTypeOfBoundsAlignBounds longint

Used by
CADBounds, CADPolyBounds and CADStringBounds.


Next: , Previous: CAD bounds type constants, Up: CAD errors and constants

5.10 CAD color constants

Value Constant Type Description
15 kCADColorUncolored longint
16 kCADColorBlack longint
16777231 kCADColorWhite longint

Used by
CADGetSysBackColor, CADGetBackColor, CADSetBackColor, CADGetDefaults, CADSetDefaults, CADGetStrDefaults, CADSetStrDefaults, CADAddLine, CADAddSquare, CADAddRectangle, CADAddPolyLine, CADAddCircle, CADAddCircleArc, CADAddEllipse, CADAddEllipseArc, CADAddString, CADAddInsertXY, CADAddInsert, CADAddImage, CADObjLine, CADObjSquare, CADObjRectangle, CADObjPolyLine, CADObjCircle, CADObjCircleArc, CADObjEllipse, CADObjEllipseArc, CADObjString, CADObjInsert, CADObjImage, CADGetImage, CADSetImage, CADGetImageXY, CADSetImageXY, CADGetFill, CADSetFill, CADGetColor, CADSetColor, CADGetInsertColor, CADSetInsertColor, CADHatchToLine, CADGetHatch, CADSetHatch, CADImportDXF, CADToPixels, CADExportRasterImage, CADGetItemColor, CADSetItemColor, CADIndexToColor, CADColorToIndex, CADDXFToColor, CADColorToDXF, CADRGBToColor, CADColorToRGB, CADBlendColor and CADSpirograph.


Next: , Previous: CAD color constants, Up: CAD errors and constants

5.11 CAD command constants

Value Constant Type Description
1 kCADCmdMirrorHorizontal longint
2 kCADCmdMirrorVertical longint
3 kCADCmdFlipLeftRight longint
4 kCADCmdFlipTopBottom longint
5 kCADCmdRotatePlus90 longint
6 kCADCmdRotateMinus90 longint
7 kCADCmdRotateObjPlus90 longint
8 kCADCmdRotateObjMinus90 longint

Used by
CADCommand.


Next: , Previous: CAD command constants, Up: CAD errors and constants

5.12 CAD cursor constants

Value Constant Type Description
0 kCADCursorDefault longint
1 kCADCursorArrow longint
2 kCADCursorDragScroll longint
3 kCADCursorZoomIn longint
4 kCADCursorZoomOut longint
5 kCADCursorZoomContinuous longint
6 kCADCursorZoomNot longint
7 kCADCursorClick longint
8 kCADCursorWrite longint
9 kCADCursorSelect1 longint
10 kCADCursorSelect2 longint
11 kCADCursorSelect3 longint
12 kCADCursorSelect4 longint
13 kCADCursorSelect5 longint
14 kCADCursorInUse longint
15 kCADCursorDraft longint
16 kCADCursorSnap longint
17 kCADCursorIBeam longint

Used by
CADGetAreaPrefs and CADSetAreaPrefs.


Next: , Previous: CAD cursor constants, Up: CAD errors and constants

5.13 CAD cursor size constants

Value Constant Type Description
1 kCADSelectCursorSmall longint
2 kCADSelectCursorStandard longint
3 kCADSelectCursorLarge longint
4 kCADSelectCursorVeryLarge longint
5 kCADSelectCursorLargest longint

Used by
CADGetDragPrefs and CADSetDragPrefs.


Next: , Previous: CAD cursor size constants, Up: CAD errors and constants

5.14 CAD display constants

Value Constant Type Description
1 kCADDisplayModalTools longint
2 kCADDisplayButtonTools longint
4 kCADDisplayZoomInfo longint
8 kCADDisplayMeasurePane longint
16 kCADDisplayHorizontalScrollBar longint
32 kCADDisplayVerticalScrollBar longint
64 kCADDisplayFrame longint
128 kCADDisplayBorder longint
256 kCADDisplayBoard longint
512 kCADDisplayHasAutoResize longint
1024 kCADDisplayMeasurePaneAnchors longint
2048 kCADDisplayMeasurePaneUp longint
4096 kCADDisplayMeasurePaneMargin longint
8192 kCADDisplayMenus longint
16384 kCADDisplayRulers longint
32768 kCADDisplayRulerLines longint
17919 kCADDisplayDefault longint

Used by
CADGetDisplay and CADSetDisplay.


Next: , Previous: CAD display constants, Up: CAD errors and constants

5.15 CAD DXF import constants

Value Constant Type Description
'' kCADDefaultDXFFontStr string
0 kCADDefaultDXFSolidFillStyle longint
0 kCADDefaultDXFSolidFillColor longint
0 kCADDefaultDXF3DFaceFillStyle longint
0 kCADDefaultDXF3DFaceFillColor longint
kCADTrue kCADDefaultDXFInvisibleObjFlag integer
kCADTrue kCADDefaultDXFConvertPolyToLine integer
kCADTrue kCADDefaultDXFConvertPolyToBox integer
kCADFalse kCADDefaultDXFReadColorsFlag integer

Used by
CADImportDXF.


Next: , Previous: CAD DXF import constants, Up: CAD errors and constants

5.16 CAD DXF/DWG export file format constants

Value Constant Type Description
2 kDXFFormatR12 longint
13 kDXFFormatR13 longint
14 kDXFFormatR14 longint
15 kDXFFormat2000 longint
1012 kDWGFormatR12 longint
1013 kDWGFormatR13 longint
1014 kDWGFormatR14 longint
1015 kDWGFormat2000 longint
1016 kDWGFormat2004 longint
1017 kDWGFormat2007 longint
1018 kDWGFormat2010 longint

Important
The DWG formats are available only if the Teigha File Converter has been installed.

Used by
CADExportDXF.


Next: , Previous: CAD DXF/DWG export file format constants, Up: CAD errors and constants

5.17 CAD error handling constants

Value Constant Type Description
0 kCADErrorResultDontFilter longint
1 kCADErrorResultDoFilter longint

Used by
CADOnError.


Next: , Previous: CAD error handling constants, Up: CAD errors and constants

5.18 CAD event data constants

Value Constant Type Description
1 kCADEventDataSolidGrip longint
2 kCADEventDataOpenGrip longint

1 kCADEventDataZoomIn longint
2 kCADEventDataZoomOut longint
3 kCADEventDataZoomContinuous longint

1 kCADEventDataScrollH longint
2 kCADEventDataScrollV longint

1 kCADEventDataTransByMouse longint
2 kCADEventDataTransByArrowKey longint
3 kCADEventDataTransByMeasurePane longint

1 kCADEventDataRotateObjByMouse longint under development
3 kCADEventDataRotateObjByMeasure longint

Used by
CADOnEvent.

Also see
The chapter on CAD events.


Next: , Previous: CAD event data constants, Up: CAD errors and constants

5.19 CAD event filter constants

Value Constant Type Description
−1 kCADEventFilterAll longint

1 kCADEventFilter1ModeChange longint
2 kCADEventFilter1Command longint
4 kCADEventFilter1Zoom longint
8 kCADEventFilter1Scroll longint
16 kCADEventFilter1DragScroll longint
32 kCADEventFilter1ClipBox longint
64 kCADEventFilter1EditCut longint
128 kCADEventFilter1EditCopy longint
256 kCADEventFilter1EditPaste longint
512 kCADEventFilter1EditClear longint
1024 kCADEventFilter1EditSelectAll longint
2048 kCADEventFilter1UndoRedo longint

1 kCADEventFilter2KeyDown longint
2 kCADEventFilter2AutoKeyDown longint
4 kCADEventFilter2SelectDeselect longint
8 kCADEventFilter2ObjDoubleClick longint
16 kCADEventFilter2ObjTranslate longint
32 kCADEventFilter2ObjReshape longint
64 kCADEventFilter2ObjCreate longint
128 kCADEventFilter2SpecialClick longint
256 kCADEventFilter2WriteString longint
512 kCADEventFilter2ObjRotate longint
1024 kCADEventFilter2ChangeOfMeasure longint
2048 kCADEventFilter2ContextMenu longint
4096 kCADEventFilter2Idle longint

Used by
CADGetOnEvent and CADSetOnEvent.


Next: , Previous: CAD event filter constants, Up: CAD errors and constants

5.20 CAD event ID constants

Value Constant Type Description
1 kCADEventIDModeChange longint
2 kCADEventIDCommand longint
3 kCADEventIDZoom longint
4 kCADEventIDScroll longint
5 kCADEventIDDragScroll longint
6 kCADEventIDClipBox longint
7 kCADEventIDEditCut longint
8 kCADEventIDEditCopy longint
9 kCADEventIDEditPaste longint
10 kCADEventIDEditClear longint
11 kCADEventIDEditSelectAll longint
12 kCADEventIDUndoRedo longint
33 kCADEventIDKeyDown longint
34 kCADEventIDAutoKeyDown longint
35 kCADEventIDSelectDeselect longint
36 kCADEventIDObjDoubleClick longint
37 kCADEventIDObjTranslate longint
38 kCADEventIDObjReshape longint
39 kCADEventIDObjCreate longint
40 kCADEventIDSpecialClick longint
41 kCADEventIDWriteString longint
42 kCADEventIDObjRotate longint
43 kCADEventIDChangeOfMeasure longint
44 kCADEventIDContextMenu longint
45 kCADEventIDIdle longint

Used by
CADOnEvent.

Also see
The chapter on CAD events.


Next: , Previous: CAD event ID constants, Up: CAD errors and constants

5.21 CAD event phase constants

Value Constant Type Description
1 kCADEventPhaseBefore longint
2 kCADEventPhaseDuring longint
3 kCADEventPhaseAfter longint
4 kCADEventPhaseTrack longint

Used by
CADGetOnEvent, CADSetOnEvent and CADOnEvent.


Next: , Previous: CAD event phase constants, Up: CAD errors and constants

5.22 CAD event result filter constants

Value Constant Type Description
0 kCADEventResultDontFilter longint
1 kCADEventResultDoFilter longint

Used by
CADOnEvent.


Next: , Previous: CAD event result filter constants, Up: CAD errors and constants

5.23 CAD event result trigger constants

Value Constant Type Description
0 kCADEventResultTriggerUndoRedo longint trigger an undo and redo
1 kCADEventResultTriggerUndoOnly longint trigger an undo only
2 kCADEventResultTriggerNone longint trigger nothing
3 kCADEventResultTriggerTrackObj longint trigger a kCADEventPhaseTrack each time the mouse is over another (or no) object
4 kCADEventResultTriggerTrackX longint trigger a kCADEventPhaseTrack each time the mouse X-coordinate changes
5 kCADEventResultTriggerTrackY longint trigger a kCADEventPhaseTrack each time the mouse Y-coordinate changes
6 kCADEventResultTriggerTrackXY longint trigger a kCADEventPhaseTrack each time the mouse X- or Y-coordinate changes
8 kCADEventResultTriggerIdle longint also trigger kCADEventIDIdle events during the track

Used by
CADOnEvent for kCADEventIDSpecialClick.


Next: , Previous: CAD event result trigger constants, Up: CAD errors and constants

5.24 CAD fill style constants

Value Constant Type Description
1 kCADFillStyleEmpty longint
2 kCADFillStyleSolid longint
3 kCADFillStyleTransparent longint
4 kCADFillStyleBackgroundColor longint

Used by
CADGetDefaults, CADSetDefaults, CADAddSquare, CADAddRectangle, CADAddPolyLine, CADAddCircle, CADAddCircleArc, CADAddEllipse, CADAddEllipseArc, CADObjSquare, CADObjRectangle, CADObjPolyLine, CADObjCircle, CADObjCircleArc, CADObjEllipse, CADObjEllipseArc, CADGetFill, CADSetFill and CADImportDXF.


Next: , Previous: CAD fill style constants, Up: CAD errors and constants

5.25 CAD flip constants

Value Constant Type Description
1 kCADMaskFlipLeftRight longint
2 kCADMaskFlipTopBottom longint

Used by
CADFlipObj and CADFlipMatrix.


Next: , Previous: CAD flip constants, Up: CAD errors and constants

5.26 CAD font style constants

Value Constant Type Description
0 kCADMaskFontStyleNone longint
1 kCADMaskFontStylePlain longint
2 kCADMaskFontStyleBold longint
4 kCADMaskFontStyleItalic longint
8 kCADMaskFontStyleUnderlined longint
16 kCADMaskFontStyleCondensed longint
32 kCADMaskFontStyleExtended longint

Used by
CADGetStrDefaults, CADSetStrDefaults, CADAddString, CADObjString, CADStringBounds, CADGetFont and CADSetFont


Next: , Previous: CAD font style constants, Up: CAD errors and constants

5.27 CAD goto page constants

Value Constant Type Description
0 kCADGotoPageAutomatic longint

Used by
CADGotoPage.


Next: , Previous: CAD goto page constants, Up: CAD errors and constants

5.28 CAD hatch alignment constants

Value Constant Type Description
1 kCADHatchAlignLeft longint
1 kCADHatchAlignBottom longint
2 kCADHatchAlignMid longint
3 kCADHatchAlignRight longint
3 kCADHatchAlignTop longint

Used by
CADGetHatch and CADSetHatch.


Next: , Previous: CAD hatch alignment constants, Up: CAD errors and constants

5.29 CAD hatch ID constants

Value Constant Type Description
1 kCADHatchIDNoHatch longint
2 kCADHatchIDAnsi31 longint
3 kCADHatchIDAnsi32 longint
4 kCADHatchIDAnsi33 longint
5 kCADHatchIDAnsi34 longint
6 kCADHatchIDAnsi35 longint
7 kCADHatchIDAnsi36 longint
8 kCADHatchIDAnsi37 longint
9 kCADHatchIDAnsi38 longint
10 kCADHatchIDStripes longint
11 kCADHatchIDBrass longint
12 kCADHatchIDDash longint
13 kCADHatchIDDots longint
14 kCADHatchIDGrate longint
15 kCADHatchIDNet longint
16 kCADHatchIDNet3 longint
17 kCADHatchIDSteel longint
18 kCADHatchIDPlastic1 longint
19 kCADHatchIDPlastic2 longint
20 kCADHatchIDRubber longint
21 kCADHatchIDPiazza longint
22 kCADHatchIDStars longint
23 kCADHatchIDHex longint
24 kCADHatchIDHoney longint
25 kCADHatchIDDanube longint
26 kCADHatchIDZigZag longint
27 kCADHatchIDStreet longint
28 kCADHatchIDCross longint
29 kCADHatchIDGrass longint
30 kCADHatchIDHound longint
31 kCADHatchIDEarth longint
32 kCADHatchIDParket longint
33 kCADHatchIDChess longint
34 kCADHatchIDDolmit longint
35 kCADHatchIDBambino longint
36 kCADHatchIDBrick1 longint
37 kCADHatchIDBrick2 longint
38 kCADHatchIDBrick3 longint
39 kCADHatchIDSand longint
40 kCADHatchIDFelt longint

Used by
CADGetDefaults, CADSetDefaults, CADAddSquare, CADAddRectangle, CADAddPolyLine, CADAddCircle, CADAddCircleArc, CADAddEllipse, CADAddEllipseArc, CADObjSquare, CADObjRectangle, CADObjPolyLine, CADObjCircle, CADObjCircleArc, CADObjEllipse, CADObjEllipseArc, CADGetHatch and CADSetHatch.


Next: , Previous: CAD hatch ID constants, Up: CAD errors and constants

5.30 CAD hatch param constants

Value Constant Type Description
1 kCADHatchParamsIDMask longint
2 kCADHatchParamsColorMask longint
4 kCADHatchParamsScaleMask longint
8 kCADHatchParamsRotationMask longint
16 kCADHatchParamsTranslationXMask longint
32 kCADHatchParamsTranslationYMask longint
64 kCADHatchParamsAlignHMask longint
128 kCADHatchParamsAlignVMask longint
255 kCADHatchParamsAllMask longint

Used by
CADGetHatch and CADSetHatch.


Next: , Previous: CAD hatch param constants, Up: CAD errors and constants

5.31 CAD key mask constants

Value Constant Type Description
−1 kCADKeyMaskAllKeys longint
1 kCADKeyMaskForKey01 longint
2 kCADKeyMaskForKey02 longint
4 kCADKeyMaskForKey03 longint
8 kCADKeyMaskForKey04 longint
16 kCADKeyMaskForKey05 longint
32 kCADKeyMaskForKey06 longint
64 kCADKeyMaskForKey07 longint
128 kCADKeyMaskForKey08 longint
256 kCADKeyMaskForKey09 longint
512 kCADKeyMaskForKey10 longint

Used by
CADGetKeyMask and CADSetKeyMask.


Next: , Previous: CAD key mask constants, Up: CAD errors and constants

5.32 CAD key constants

Value Constant Type Description
10 kCADMaxKeyIndex longint Number of keys available for Objects, Blocks, Layers, and Sublayers

Used by
CADGetLayerKey, CADSetLayerKey, CADGetBlockKey, CADSetBlockKey, CADGetKey, CADSetKey, CADGetObjKey, CADSetObjKey, CADGetKeyArray, CADSetKeyArray and CADFindByKey.


Next: , Previous: CAD key constants, Up: CAD errors and constants

5.33 CAD layer ID constants

Value Constant Type Description
0 kCADNoCurrentLayerID longint
4095 kCADNotOnSubLayerID longint

Used by
CADGetCurrentLayer, CADGetLayer, CADSetLayer and CADGetObjInfo.


Next: , Previous: CAD layer ID constants, Up: CAD errors and constants

5.34 CAD layer mode constants

Value Constant Type Description
1 kCADLayerModeInvisible longint
2 kCADLayerModeDimmed longint
3 kCADLayerModeVisible longint
4 kCADLayerModeEditable longint

Used by
CADGetSnapPrefs, CADSetSnapPrefs, CADGetLayerAttributes, CADSetLayerAttributes, CADGetGrid, CADSetGrid, CADSelect, CADFindCrossings and CADHatchToLine.


Next: , Previous: CAD layer mode constants, Up: CAD errors and constants

5.35 CAD layer removal constants

Value Constant Type Description
1 kCADLayerToRemoveMustBeEmpty longint
2 kCADLayerToRemoveMakeEmpty longint

Used by
CADRemoveLayer.


Next: , Previous: CAD layer removal constants, Up: CAD errors and constants

5.36 CAD linetype ID constants

Value Constant Type Description
1 kCADLineTypeContinuousID longint
2 kCADLineTypeBorderID longint
3 kCADLineTypeCenterID longint
4 kCADLineTypeDashDotID longint
5 kCADLineTypeDashedID longint
6 kCADLineTypeDivideID longint
7 kCADLineTypeDottedID longint
8 kCADLineTypePhantomID longint

Used by
CADGetLineTypeIDs, CADGetLineTypeDefinition, CADGetDefaults, CADSetDefaults, CADAddLine, CADAddSquare, CADAddRectangle, CADAddPolyLine, CADAddCircle, CADAddCircleArc, CADAddEllipse, CADAddEllipseArc, CADObjLine, CADObjSquare, CADObjRectangle, CADObjPolyLine, CADObjCircle, CADObjCircleArc, CADObjEllipse, CADObjEllipseArc, CADGetLineType and CADSetLineType.


Next: , Previous: CAD linetype ID constants, Up: CAD errors and constants

5.37 CAD linetype type constants

Value Constant Type Description
1 kCADLineTypeStandardType longint
2 kCADLineTypeDXFType longint
3 kCADLineTypeApplicationType longint

Used by
CADGetLineTypeDefinition.


Next: , Previous: CAD linetype type constants, Up: CAD errors and constants

5.38 CAD locking parameter constants

Value Constant Type Description
1 kCADLockingIgnoreLock longint
2 kCADLockingSkipLock longint

Not all calls implement kCADLockingSkipLock. See each call for more info.

Used by
CADRemoveLayer, CADRemoveBlock, CADSetBlockKey, CADSetBlockName, CADSetLayer, CADMoveToFront, CADMoveToBack, CADRemoveObj, CADSetFill, CADSetColor, CADSetInsertColor, CADSetLineWidth, CADSetFont, CADSetLineType, CADSetMarking, CADSetHatch, CADSetKey, CADSetObjKey, CADSetKeyArray, CADTranslate, CADRotate, CADScale, CADMirror, CADShear, CADTransform, CADRotateObj, CADSetRotation, CADStretchObj, CADLengthenObj, CADFlipObj, CADAlign, CADAlignToGrid and CADBlend.


Next: , Previous: CAD locking parameter constants, Up: CAD errors and constants

5.39 CAD marking ID constants

Value Constant Type Description
1 kCADMarkingNoneID longint
2 kCADMarkingByOpenArrowID longint
3 kCADMarkingByClosedArrowID longint
4 kCADMarkingByReverseOpenArrowID longint
5 kCADMarkingByReverseClosedArrID longint
6 kCADMarkingByOpenDartID longint
7 kCADMarkingByClosedDartID longint
8 kCADMarkingByReverseOpenDartID longint
9 kCADMarkingByReverseClosedDrtID longint
10 kCADMarkingByOpenBarID longint
11 kCADMarkingByClosedBarID longint
12 kCADMarkingByOpenSlashID longint
13 kCADMarkingByClosedSlashID longint
14 kCADMarkingByOpenSlashBarID longint
15 kCADMarkingByClosedSlashBarID longint
16 kCADMarkingByOpenCrossID longint
17 kCADMarkingByClosedCrossID longint
18 kCADMarkingByOpenDotID longint
19 kCADMarkingByClosedDotID longint

Used by
CADGetDefaults, CADSetDefaults, CADObjLine, CADObjCircleArc, CADObjEllipseArc, CADGetMarking and CADSetMarking.


Next: , Previous: CAD marking ID constants, Up: CAD errors and constants

5.40 CAD measure type constants

Value Constant Type Description
1 kCADMeasureLength longint
2 kCADMeasureWidth longint
3 kCADMeasureLengthDiff longint
4 kCADMeasureWidthDiff longint
5 kCADMeasureLineLength longint
6 kCADMeasureLineLengthDiff longint
7 kCADMeasureRotation longint
8 kCADMeasureRotationDiff longint
9 kCADMeasureX longint
10 kCADMeasureY longint
11 kCADMeasureXDiff longint
12 kCADMeasureYDiff longint
13 kCADMeasureStartAngle longint
14 kCADMeasureEndAngle longint
15 kCADMeasurePerimeter longint
16 kCADMeasureSurfaceArea longint

Used by
CADGetMeasurePrefs, CADSetMeasurePrefs and CADOnEvent.


Next: , Previous: CAD measure type constants, Up: CAD errors and constants

5.41 CAD menu command constants

Value Constant Type Description
1001 kCADCmdAbout longint
2001 kCADCmdFileNew longint
2002 kCADCmdFileOpen longint
2003 kCADCmdFileSave longint
2004 kCADCmdFileSaveAs longint
2005 kCADCmdFilePageSetup longint
2006 kCADCmdFilePrint longint
2007 kCADCmdFilePrintToPDF longint Implemented on Mac OS X only
2008 kCADCmdFileImportDXF longint
2009 kCADCmdFileExportDXF longint
2010 kCADCmdFileImportRasterImage longint
2011 kCADCmdFileExportRasterImage longint
3001 kCADCmdEditUndo longint
3002 kCADCmdEditCut longint
3003 kCADCmdEditCopy longint
3004 kCADCmdEditPaste longint
3005 kCADCmdEditClear longint
3006 kCADCmdEditSelectAll longint
20001 kCADCmdToggleModePalette longint
20002 kCADCmdToggleToolPalette longint
20003 kCADCmdToggleZoomInfo longint
20004 kCADCmdToggleMeasurePane longint
20005 kCADCmdToggleAnchorPane longint
20006 kCADCmdToggleHorzScrollBar longint
20007 kCADCmdToggleVertScrollBar longint
20008 kCADCmdToggleBorder longint
20009 kCADCmdToggleBoard longint
20010 kCADCmdToggleMenus longint
20011 kCADCmdToggleRulers longint
20012 kCADCmdToggleRulerLines longint

Used by
CADCommand.


Next: , Previous: CAD menu command constants, Up: CAD errors and constants

5.42 CAD method name constants

Value Constant Type Description
CADAcceptDXF mCADAcceptDXF string
CADAddArray mCADAddArray string
CADAddBlock mCADAddBlock string
CADAddCircle mCADAddCircle string
CADAddCircleArc mCADAddCircleArc string
CADAddEllipse mCADAddEllipse string
CADAddEllipseArc mCADAddEllipseArc string
CADAddImage mCADAddImage string
CADAddInsert mCADAddInsert string
CADAddInsertXY mCADAddInsertXY string
CADAddLayer mCADAddLayer string
CADAddLine mCADAddLine string
CADAddPolyLine mCADAddPolyLine string
CADAddRectangle mCADAddRectangle string
CADAddScope mCADAddScope string
CADAddSquare mCADAddSquare string
CADAddString mCADAddString string
CADAddSubLayer mCADAddSubLayer string
CADAlign mCADAlign string
mCADAlignToGrid mCADAlignToGrid string
CADArcAndArc mCADArcAndArc string
CADArcCos mCADArcCos string
CADArcSin mCADArcSin string
CADArcTan2 mCADArcTan2 string
CADAutoZoom mCADAutoZoom string
CADBlend mCADBlend string
CADBlendColor mCADBlendColor string
CADBlobToFile mCADBlobToFile string
CADBounds mCADBounds string
CADCalcImageMatrix mCADCalcImageMatrix string
CADCalcImageResolution mCADCalcImageResolution string
CADCalcMatrix mCADCalcMatrix string
CADCancelDXF mCADCancelDXF string
CADCheckPoly mCADCheckPoly string
CADClear mCADClear string
CADColorToDXF mCADColorToDXF string
CADColorToIndex mCADColorToIndex string
CADColorToRGB mCADColorToRGB string
CADCommand mCADCommand string
CADCompareBlock mCADCompareBlock string
CADCompareObj mCADCompareObj string
CADCopyArea mCADCopyArea string
CADCopyArrays mCADCopyArrays string
CADCopyAttributes mCADCopyAttributes string
CADCopyBlocks mCADCopyBlocks string
CADCopyByMatrix mCADCopyByMatrix string
CADCopyLayers mCADCopyLayers string
CADCopyObjByMatrix mCADCopyObjByMatrix string
CADCopyObjTo mCADCopyObjTo string
CADCopyPageSetup mCADCopyPageSetup string
CADCopyPrefs mCADCopyPrefs string
CADCopyScope mCADCopyScope string
CADCopyTo mCADCopyTo string
CADCos mCADCos string
CADCount mCADCount string
CADDXFToColor mCADDXFToColor string
CADDecimalDifference mCADDecimalDifference string
CADDecimalSum mCADDecimalSum string
CADDistanceXY mCADDistanceXY string
CADEmptyScope mCADEmptyScope string
CADEndOffscreen mCADEndOffscreen string
CADExportDXF mCADExportDXF string
CADExportRasterImage mCADExportRasterImage string
CADFileToBlob mCADFileToBlob string
CADFindByKey mCADFindByKey string
CADFindByLock mCADFindByLock string
CADFindByType mCADFindByType string
CADFindCrossings mCADFindCrossings string
CADFindSnap mCADFindSnap string
CADFlipMatrix mCADFlipMatrix string
CADFlipObj mCADFlipObj string
CADFromScope mCADFromScope string
CADGetAreaPrefs mCADGetAreaPrefs string
CADGetArray mCADGetArray string
CADGetArrayIDs mCADGetArrayIDs string
CADGetBackColor mCADGetBackColor string
CADGetBlockAddedSnaps mCADGetBlockAddedSnaps string
CADGetBlockInfo mCADGetBlockInfo string
CADGetBlockKey mCADGetBlockKey string
CADGetBlockSnapMask mCADGetBlockSnapMask string
CADGetBlocks mCADGetBlocks string
CADGetCADFile mCADGetCADFile string
CADGetCircle mCADGetCircle string
CADGetCircleArc mCADGetCircleArc string
CADGetClipBox mCADGetClipBox string
CADGetColor mCADGetColor string
CADGetColorItem mCADGetColorItem string
CADGetColorsDim mCADGetColorsDim string
CADGetCurrentLayer mCADGetCurrentLayer string
CADGetDXFFile mCADGetDXFFile string
CADGetDefaults mCADGetDefaults string
CADGetDimPrefs mCADGetDimPrefs string
CADGetDisplay mCADGetDisplay string
CADGetDragPrefs mCADGetDragPrefs string
CADGetDrawPrefs mCADGetDrawPrefs string
CADGetDrawSize mCADGetDrawSize string
CADGetEllipse mCADGetEllipse string
CADGetEllipseArc mCADGetEllipseArc string
CADGetFill mCADGetFill string
CADGetFont mCADGetFont string
CADGetGrid mCADGetGrid string
CADGetHatch mCADGetHatch string
CADGetImage mCADGetImage string
CADGetImageFile mCADGetImageFile string
CADGetImageFileInfo mCADGetImageFileInfo string
CADGetImageInfo mCADGetImageInfo string
CADGetImageXY mCADGetImageXY string
CADGetInsert mCADGetInsert string
CADGetInsertColor mCADGetInsertColor string
CADGetInsertID mCADGetInsertID string
CADGetInsertXY mCADGetInsertXY string
CADGetItemColor mCADGetItemColor string
CADGetKey mCADGetKey string
CADGetKeyArray mCADGetKeyArray string
CADGetKeyMask mCADGetKeyMask string
CADGetLayer mCADGetLayer string
CADGetLayerAttributes mCADGetLayerAttributes string
CADGetLayerKey mCADGetLayerKey string
CADGetLayerOrder mCADGetLayerOrder string
CADGetLayers mCADGetLayers string
CADGetLine mCADGetLine string
CADGetLineType mCADGetLineType string
CADGetLineTypeDefinition mCADGetLineTypeDefinition string
CADGetLineTypeIDs mCADGetLineTypeIDs string
CADGetLineWidth mCADGetLineWidth string
CADGetLock mCADGetLock string
CADGetLockByMask mCADGetLockByMask string
CADGetMarking mCADGetMarking string
CADGetMatrixPlane mCADGetMatrixPlane string
CADGetMeasurePrefs mCADGetMeasurePrefs string
CADGetMode mCADGetMode string
CADGetMouseWheelPrefs mCADGetMouseWheelPrefs string
CADGetObjID mCADGetObjID string
CADGetObjIDsArray mCADGetObjIDsArray string
CADGetObjInfo mCADGetObjInfo string
CADGetObjKey mCADGetObjKey string
CADGetObjLock mCADGetObjLock string
CADGetObjLockMask mCADGetObjLockMask string
CADGetObjType mCADGetObjType string
CADGetOnError mCADGetOnError string
CADGetOnEvent mCADGetOnEvent string
CADGetPaperSizes mCADGetPaperSizes string
CADGetPolyAngle mCADGetPolyAngle string
CADGetPolyLine mCADGetPolyLine string
CADGetPrintSpecs mCADGetPrintSpecs string
CADGetRectangle mCADGetRectangle string
CADGetRedraw mCADGetRedraw string
CADGetRef mCADGetRef string
CADGetRotation mCADGetRotation string
CADGetScale mCADGetScale string
CADGetScopeIDs mCADGetScopeIDs string
CADGetScroll mCADGetScroll string
CADGetSnapPrefs mCADGetSnapPrefs string
CADGetSquare mCADGetSquare string
CADGetStrDefaults mCADGetStrDefaults string
CADGetString mCADGetString string
CADGetStringXY mCADGetStringXY string
CADGetSubLayers mCADGetSubLayers string
CADGetSysBackColor mCADGetSysBackColor string
CADGetTitleSplit mCADGetTitleSplit string
CADGetUndoPrefs mCADGetUndoPrefs string
CADGetUnit mCADGetUnit string
CADGetVersion mCADGetVersion string
CADGetZoom mCADGetZoom string
CADGetZoomPrefs mCADGetZoomPrefs string
CADGotoPage mCADGotoPage string
CADHatchToLine mCADHatchToLine string
CADIdentityMatrix mCADIdentityMatrix string
CADImportDXF mCADImportDXF string
CADImportImage mCADImportImage string
CADInScope mCADInScope string
CADIndexToColor mCADIndexToColor string
CADInvertMatrix mCADInvertMatrix string
CADLastArea mCADLastArea string
CADLengthenObj mCADLengthenObj string
CADLineAndArc mCADLineAndArc string
CADLineAndLine mCADLineAndLine string
CADLineAndRect mCADLineAndRect string
CADLoadFromBlob mCADLoadFromBlob string
CADLoadFromFile mCADLoadFromFile string
CADLoadFromRes mCADLoadFromRes string
CADMetrics mCADMetrics string
CADMetricsByMatrix mCADMetricsByMatrix string
CADMirror mCADMirror string
CADMirrorMatrix mCADMirrorMatrix string
CADMoveByMatrix mCADMoveByMatrix string
CADMoveTo mCADMoveTo string
CADMoveToBack mCADMoveToBack string
CADMoveToFront mCADMoveToFront string
CADNewOffscreen mCADNewOffscreen string
CADObjBox mCADObjBox string
CADObjCenter mCADObjCenter string
CADObjCircle mCADObjCircle string
CADObjCircleArc mCADObjCircleArc string
CADObjEllipse mCADObjEllipse string
CADObjEllipseArc mCADObjEllipseArc string
CADObjImage mCADObjImage string
CADObjInsert mCADObjInsert string
CADObjLine mCADObjLine string
CADObjPerimeter mCADObjPerimeter string
CADObjPolyLine mCADObjPolyLine string
CADObjRectangle mCADObjRectangle string
CADObjSquare mCADObjSquare string
CADObjString mCADObjString string
CADObjSurface mCADObjSurface string
CADOneObjID mCADOneObjID string
CADPageSetup mCADPageSetup string
CADPictToBlob mCADPictToBlob string
CADPointInPoly mCADPointInPoly string
CADPointInRect mCADPointInRect string
CADPointOnLine mCADPointOnLine string
CADPolyAndPoly mCADPolyAndPoly string
CADPolyBounds mCADPolyBounds string
CADPolyCalc mCADPolyCalc string
CADPolyUndouble mCADPolyUndouble string
CADPrint mCADPrint string
CADPrintToPDF mCADPrintToPDF string
CADPutCADFile mCADPutCADFile string
CADRGBToColor mCADRGBToColor string
CADRectAndRect mCADRectAndRect string
CADRedrawArea mCADRedrawArea string
CADRefFromBlob mCADRefFromBlob string
CADRefFromFile mCADRefFromFile string
CADRemoveArray mCADRemoveArray string
CADRemoveBlock mCADRemoveBlock string
CADRemoveLayer mCADRemoveLayer string
CADRemoveObj mCADRemoveObj string
CADRemoveScope mCADRemoveScope string
CADResetUndo mCADResetUndo string
CADRotate mCADRotate string
CADRotateMatrix mCADRotateMatrix string
CADRotateObj mCADRotateObj string
CADRotateXY mCADRotateXY string
CADScale mCADScale string
CADScaleMatrix mCADScaleMatrix string
CADScaleXY mCADScaleXY string
CADScopeLogic mCADScopeLogic string
CADScroll mCADScroll string
CADScrollTo mCADScrollTo string
CADSelect mCADSelect string
CADSetAreaPrefs mCADSetAreaPrefs string
CADSetArray mCADSetArray string
CADSetBackColor mCADSetBackColor string
CADSetBlockAddedSnaps mCADSetBlockAddedSnaps string
CADSetBlockKey mCADSetBlockKey string
CADSetBlockName mCADSetBlockName string
CADSetBlockSnapMask mCADSetBlockSnapMask string
CADSetCircle mCADSetCircle string
CADSetCircleArc mCADSetCircleArc string
CADSetClipBox mCADSetClipBox string
CADSetColor mCADSetColor string
CADSetColorItem mCADSetColorItem string
CADSetColorsDim mCADSetColorsDim string
CADSetCurrentLayer mCADSetCurrentLayer string
CADSetDefaults mCADSetDefaults string
CADSetDimPrefs mCADSetDimPrefs string
CADSetDisplay mCADSetDisplay string
CADSetDragPrefs mCADSetDragPrefs string
CADSetDrawPrefs mCADSetDrawPrefs string
CADSetDrawSize mCADSetDrawSize string
CADSetEllipse mCADSetEllipse string
CADSetEllipseArc mCADSetEllipseArc string
CADSetFill mCADSetFill string
CADSetFont mCADSetFont string
CADSetGrid mCADSetGrid string
CADSetHatch mCADSetHatch string
CADSetImage mCADSetImage string
CADSetImageXY mCADSetImageXY string
CADSetInsert mCADSetInsert string
CADSetInsertColor mCADSetInsertColor string
CADSetInsertID mCADSetInsertID string
CADSetInsertXY mCADSetInsertXY string
CADSetItemColor mCADSetItemColor string
CADSetKey mCADSetKey string
CADSetKeyArray mCADSetKeyArray string
CADSetKeyMask mCADSetKeyMask string
CADSetLayer mCADSetLayer string
CADSetLayerAttributes mCADSetLayerAttributes string
CADSetLayerKey mCADSetLayerKey string
CADSetLayerOrder mCADSetLayerOrder string
CADSetLine mCADSetLine string
CADSetLineType mCADSetLineType string
CADSetLineWidth mCADSetLineWidth string
CADSetLock mCADSetLock string
mCADSetLockByMask mCADSetLockByMask string
CADSetMarking mCADSetMarking string
CADSetMeasurePrefs mCADSetMeasurePrefs string
CADSetMode mCADSetMode string
CADSetMouseWheelPrefs mCADSetMouseWheelPrefs string
CADSetObjKey mCADSetObjKey string
CADSetObjLock mCADSetObjLock string
CADSetObjLockMask mCADSetObjLockMask string
CADSetOnError mCADSetOnError string
CADSetOnEvent mCADSetOnEvent string
CADSetPolyAngle mCADSetPolyAngle string
CADSetPolyLine mCADSetPolyLine string
CADSetPrintSpecs mCADSetPrintSpecs string
CADSetRectangle mCADSetRectangle string
CADSetRedraw mCADSetRedraw string
CADSetRef mCADSetRef string
CADSetRotation mCADSetRotation string
CADSetScale mCADSetScale string
CADSetSnapPrefs mCADSetSnapPrefs string
CADSetSquare mCADSetSquare string
CADSetStrDefaults mCADSetStrDefaults string
CADSetString mCADSetString string
CADSetStringXY mCADSetStringXY string
CADSetTitleSplit mCADSetTitleSplit string
CADSetUndoPrefs mCADSetUndoPrefs string
CADSetUnit mCADSetUnit string
CADSetZoomPrefs mCADSetZoomPrefs string
CADShear mCADShear string
CADShearMatrix mCADShearMatrix string
CADSin mCADSin string
CADSpirograph mCADSpirograph string
CADSplitPoly mCADSplitPoly string
CADSplitPolyXY mCADSplitPolyXY string
CADStandardMatrix mCADStandardMatrix string
CADStoreToBlob mCADStoreToBlob string
CADStoreToFile mCADStoreToFile string
CADStretchMatrix mCADStretchMatrix string
CADStretchObj mCADStretchObj string
CADStringBounds mCADStringBounds string
CADToPixels mCADToPixels string
CADToScope mCADToScope string
CADTransform mCADTransform string
CADTransformMatrix mCADTransformMatrix string
CADTransformXY mCADTransformXY string
CADTranslate mCADTranslate string
CADTranslateMatrix mCADTranslateMatrix string
CADTriggerUndo mCADTriggerUndo string
CADTypeOfScope mCADTypeOfScope string
CADZoom mCADZoom string

Used by
To be used by the application, e.g. in Error handling.


Next: , Previous: CAD method name constants, Up: CAD errors and constants

5.43 CAD mirror constants

Value Constant Type Description
1 kCADMaskMirrorInVerticalAxis longint
2 kCADMaskMirrorInHorizontalAxis longint
4 kCADMaskMirrorInAscendDiagonal longint
8 kCADMaskMirrorInDescendDiagonal longint

Used by
CADMirror and CADMirrorMatrix.


Next: , Previous: CAD mirror constants, Up: CAD errors and constants

5.44 CAD mode constants

Value Constant Type Description
1 kCADModeIntersect longint
2 kCADModeEnclose longint
3 kCADModeTouch longint
4 kCADModeReshape longint
5 kCADModeRotate longint
6 kCADModeTranslate longint
7 kCADModeZoomIn longint
8 kCADModeZoomOut longint
9 kCADModeZoomContinuous longint
10 kCADModeDragScroll longint
11 kCADModeDrawLine longint
12 kCADModeDrawPolyLine longint
13 kCADModeDrawSquare longint
14 kCADModeDrawRectangle longint
15 kCADModeDrawCircle longint
16 kCADModeDrawEllipse longint
17 kCADModeDrawCircleArc longint
18 kCADModeDrawEllipseArc longint
19 kCADModeSpecialClick longint
20 kCADModeWriteString longint
21 kCADModeClipBox longint
22 kCADModePrintingPreview longint

Used by
CADLoadFromFile, CADLoadFromBlob, CADLoadFromRes, CADGetMode, CADSetMode and CADOnEvent.


Next: , Previous: CAD mode constants, Up: CAD errors and constants

5.45 CAD mode mask constants

Value Constant Type Description
-1 kCADModeMaskAll longint
1 kCADModeMaskIntersect longint
2 kCADModeMaskEnclose longint
4 kCADModeMaskTouch longint
8 kCADModeMaskReshape longint
16 kCADModeMaskRotate longint
32 kCADModeMaskTranslate longint
64 kCADModeMaskZoomIn longint
128 kCADModeMaskZoomOut longint
256 kCADModeMaskZoomContinuous longint
512 kCADModeMaskDragScroll longint
1024 kCADModeMaskDrawLine longint
2048 kCADModeMaskDrawPolyLine longint
4096 kCADModeMaskDrawSquare longint
8192 kCADModeMaskDrawRectangle longint
16384 kCADModeMaskDrawCircle longint
32768 kCADModeMaskDrawEllipse longint
65536 kCADModeMaskDrawCircleArc longint
131072 kCADModeMaskDrawEllipseArc longint
262144 kCADModeMaskSpecialClick longint
524288 kCADModeMaskWriteString longint
1048576 kCADModeMaskClipBox longint
2097152 kCADModeMaskPrintingPreview longint

Used by
CADGetDisplay and CADSetDisplay.


Next: , Previous: CAD mode mask constants, Up: CAD errors and constants

5.46 CAD modifier key constants

Value Constant Type Description
0 kCADModifierNoKey longint
256 kCADModifierCommandKey longint
512 kCADModifierShiftKey longint
2048 kCADModifierOptionKey longint

Used by
CADGetAreaPrefs, CADSetAreaPrefs, CADGetMouseWheelPrefs, CADSetMouseWheelPrefs, CADCommand and CADOnEvent.


Next: , Previous: CAD modifier key constants, Up: CAD errors and constants

5.47 CAD mouse wheel use constants

Value Constant Type Description
1 kCADUseMouseWheelForScroll longint
2 kCADUseMouseWheelForZoom longint

Used by
CADGetMouseWheelPrefs and CADSetMouseWheelPrefs.


Next: , Previous: CAD mouse wheel use constants, Up: CAD errors and constants

5.48 CAD mouse wheel zoom constants

Value Constant Type Description
1 kCADMouseWheelDownZoomsIn longint
2 kCADMouseWheelDownZoomsOut longint

Used by
CADGetMouseWheelPrefs and CADSetMouseWheelPrefs.


Next: , Previous: CAD mouse wheel zoom constants, Up: CAD errors and constants

5.49 CAD object locking mask constants

Value Constant Type Description
1 kCADObjLockMaskCutAndRemove longint
2 kCADObjLockMaskTranslate longint
4 kCADObjLockMaskReshape longint
8 kCADObjLockMaskReshapeH longint
16 kCADObjLockMaskReshapeV longint
32 kCADObjLockMaskRotateArcStart longint
64 kCADObjLockMaskRotateArcEnd longint
128 kCADObjLockMaskRotateObj longint
256 kCADObjLockMaskMirror longint
512 kCADObjLockMaskFillStyle longint
1024 kCADObjLockMaskFillColor longint
2048 kCADObjLockMaskLineStyleParams longint
4096 kCADObjLockMaskLineColor longint
8192 kCADObjLockMaskLineWidth longint
16384 kCADObjLockMaskHatchParams longint
32768 kCADObjLockMaskHatchColor longint
65536 kCADObjLockMaskMarkingParams longint
131072 kCADObjLockMaskTextFont longint
262144 kCADObjLockMaskTextSize longint
524288 kCADObjLockMaskTextStyle longint
1048576 kCADObjLockMaskTextAlignHV longint
2097152 kCADObjLockMaskTextEdit longint
4194304 kCADObjLockMaskTextMaxLength longint
8388608 kCADObjLockMaskTextMultiParams longint
16777216 kCADObjLockMaskInsertBlock longint
33554432 kCADObjLockMaskInsertColor longint
67108864 kCADObjLockMaskImageParams longint
134217728 kCADObjLockMaskLayer longint
268435456 kCADObjLockMaskSubLayer longint
536870912 kCADObjLockMaskDRName longint
1073741824 kCADObjLockMaskDRUngroup longint

Used by
CADGetLockByMask, CADSetLockByMask, CADGetObjLockMask, CADSetObjLockMask, CADGetDefaults and CADSetDefaults.


Next: , Previous: CAD object locking mask constants, Up: CAD errors and constants

5.50 CAD object locking type constants

Value Constant Type Description
1 kCADObjLockCutAndRemove longint
2 kCADObjLockTranslate longint
3 kCADObjLockReshape longint
4 kCADObjLockReshapeH longint
5 kCADObjLockReshapeV longint
6 kCADObjLockRotateArcStart longint
7 kCADObjLockRotateArcEnd longint
8 kCADObjLockRotateObj longint
9 kCADObjLockMirror longint
10 kCADObjLockFillStyle longint
11 kCADObjLockFillColor longint
12 kCADObjLockLineStyleParams longint
13 kCADObjLockLineColor longint
14 kCADObjLockLineWidth longint
15 kCADObjLockHatchParams longint
16 kCADObjLockHatchColor longint
17 kCADObjLockMarkingParams longint
18 kCADObjLockTextFont longint
19 kCADObjLockTextSize longint
20 kCADObjLockTextStyle longint
21 kCADObjLockTextAlignHV longint
22 kCADObjLockTextEdit longint
23 kCADObjLockTextMaxLength longint
24 kCADObjLockTextMultilineParams longint
25 kCADObjLockInsertBlock longint
26 kCADObjLockInsertColor longint
27 kCADObjLockImageParams longint
28 kCADObjLockLayer longint
29 kCADObjLockSubLayer longint
30 kCADObjLockDRName longint
31 kCADObjLockDRUngroup longint

Used by
CADGetLock, CADSetLock, CADGetObjLock, CADSetObjLock and CADFindByLock.


Next: , Previous: CAD object locking type constants, Up: CAD errors and constants

5.51 CAD object to get constants

Value Constant Type Description
1 kCADGetFirstObj longint
2 kCADGetNextObj longint
3 kCADGetPrevObj longint
4 kCADGetLastObj longint
5 kCADGetObjByIndex longint

Used by
CADGetObjID.


Next: , Previous: CAD object to get constants, Up: CAD errors and constants

5.52 CAD object type constants

Value Constant Type Description
2 kCADObjTypeLine longint
3 kCADObjTypeSquare longint
4 kCADObjTypeRectangle longint
5 kCADObjTypePolyLine longint
6 kCADObjTypeCircle longint
7 kCADObjTypeCircleArc longint
8 kCADObjTypeEllipse longint
9 kCADObjTypeEllipseArc longint
10 kCADObjTypeString longint
11 kCADObjTypeRasterImage longint
12 kCADObjTypeInsert longint

Used by
CADGetObjType, CADGetObjInfo and CADFindByType.


Next: , Previous: CAD object type constants, Up: CAD errors and constants

5.53 CAD paper orientation constants

Value Constant Type Description
1 kCADPaperOrientationPortrait longint
2 kCADPaperOrientationLandscape longint
3 kCADPaperOrientReversePortrait longint
4 kCADPaperOrientReverseLandscape longint

Used by
CADGetPaperSizes.


Next: , Previous: CAD paper orientation constants, Up: CAD errors and constants

5.54 CAD papersize unit constants

Value Constant Type Description
1 kCADPaperSizeUnitmm longint
2 kCADPaperSizeUnitInch longint
3 kCADPaperSizeUnitPixel longint

Used by
CADGetPaperSizes.


Next: , Previous: CAD papersize unit constants, Up: CAD errors and constants

5.55 CAD pixel type constants

Value Constant Type Description
1 kCADPixelTypeBW longint May fail on Windows if the imported raster image has a color bit depth larger than 1
8 kCADPixelTypeGray longint Currently implemented on Windows only. Note that 4Dv12 has a fragmented heap on Windows, causing memory problems with large color pictures. Large grayscale scans are less memory hungry. The problem doesn't occur on Mac OS X
32 kCADPixelTypeColor longint


Next: , Previous: CAD pixel type constants, Up: CAD errors and constants

5.56 CAD PDF flag constants

Value Constant Type Description
0 kCADPDFFlagNone longint
1 kCADPDFFlagPrintProgressOSX longint

Used by
CADPrintToPDF.


Next: , Previous: CAD PDF flag constants, Up: CAD errors and constants

5.57 CAD PDF engine constants

Value Constant Type Description
2 kCADPDFEngineAppleOSX longint Mac OS X built-in PDF engine (Mac only)

Used by
CADPrintToPDF.


Next: , Previous: CAD PDF engine constants, Up: CAD errors and constants

5.58 CAD point in polyline constants

Value Constant Type Description
0 kCADPointOutsidePoly longint
1 kCADPointOnPolyEdge longint
2 kCADPointInsidePoly longint

Used by
CADPointInPoly.


Next: , Previous: CAD point in polyline constants, Up: CAD errors and constants

5.59 CAD polyline check constants

Value Constant Type Description
0 kCADPolyCheckNoResult longint
1 kCADPolyCheckOK longint
2 kCADPolyCheckSelfCrossing longint
3 kCADPolyCheckDoublePoint longint
4 kCADPolyCheckDoubleLine longint

Used by
CADCheckPoly.


Next: , Previous: CAD polyline check constants, Up: CAD errors and constants

5.60 CAD polyline split constants

Value Constant Type Description
2 kCADSplitPolyToClosedPolys longint Splits to closed polylines, not returning any open connecting lines that may be part of the source polyline
3 kCADSplitPolyToTriangles1 longint Splits to triangles from the first polyline vertex
4 kCADSplitPolyToTriangles2 longint Splits to triangles from the polyline center of mass

Used by
CADSplitPoly and CADSplitPolyXY.


Next: , Previous: CAD polyline split constants, Up: CAD errors and constants

5.61 CAD print alignment constants

Value Constant Type Description
1 kCADAlignPrintOnPaperLeft longint
1 kCADAlignPrintOnPaperBottom longint
2 kCADAlignPrintOnPaperMid longint
3 kCADAlignPrintOnPaperRight longint
3 kCADAlignPrintOnPaperTop longint

Used by
CADGetPrintSpecs and CADSetPrintSpecs.


Next: , Previous: CAD print alignment constants, Up: CAD errors and constants

5.62 CAD print orientation constants

Value Constant Type Description
1 kCADPrintOrientationRotate0 longint
2 kCADPrintOrientationRotate90 longint
3 kCADPrintOrientationRotate180 longint
4 kCADPrintOrientationRotate270 longint

Used by
CADGetPrintSpecs and CADSetPrintSpecs.


Next: , Previous: CAD print orientation constants, Up: CAD errors and constants

5.63 CAD print resolution constants

Value Constant Type Description
0 kCADDefaultPrinterResolution longint

Used by
CADGetPrintSpecs and CADSetPrintSpecs.


Next: , Previous: CAD print resolution constants, Up: CAD errors and constants

5.64 CAD print size to use constants

Value Constant Type Description
1 kCADPrintSizeUseScopeBounds longint Calculates the physical bounds of the object scope to print and then fits it on paper (the default and useful for CAD drawings)
2 kCADPrintSizeUseDrawSize longint Fits the drawing plane on paper (useful for graphical designs related to a paper size)

Used by
CADGetPrintSpecs and CADSetPrintSpecs.


Next: , Previous: CAD print size to use constants, Up: CAD errors and constants

5.65 CAD progress constants

Value Constant Type Description
0 kCADProgressOpenAutomatic longint Open a progress dialog without Stop button for long operations
1 kCADProgressOpenAutoWithStop longint Open a progress dialog with Stop button for long operations
2 kCADProgressOpenNow longint Open a progress dialog without Stop button immediately
3 kCADProgressOpenNowWithStop longint Open a progress dialog with Stop button immediately
4 kCADProgressOpenNot longint Don’t open a progress dialog

Used by
CADLoadFromFile, CADLoadFromBlob, CADLoadFromRes, CADStoreToFile, CADStoreToBlob and CADFindCrossings.


Next: , Previous: CAD progress constants, Up: CAD errors and constants

5.66 CAD raster compression quality constants

Value Constant Type Description
0 kCADCompressQualityLeast longint
25 kCADCompressQualityLow longint
50 kCADCompressQualityAverage longint
80 kCADCompressQualityGood longint
90 kCADCompressQualityExcellent longint
100 kCADCompressQualityBest longint Produces lossless images with format kCADRasterJPEG2000

Used by
CADExportRasterImage.


Next: , Previous: CAD raster compression quality constants, Up: CAD errors and constants

5.67 CAD raster image alignment constants

Value Constant Type Description
1 kCADImageAlignLeft longint
1 kCADImageAlignBottom longint
2 kCADImageAlignMid longint
3 kCADImageAlignRight longint
3 kCADImageAlignTop longint

Used by
CADAddImage, CADObjImage, CADGetImage, CADSetImage, CADGetImageXY, CADSetImageXY and CADImportImage.


Next: , Previous: CAD raster image alignment constants, Up: CAD errors and constants

5.68 CAD raster image format constants

Value Constant Type Description
1 kCADRasterJPEG longint
2 kCADRasterJPEG2000 longint MacOS X only
3 kCADRasterBMP longint
4 kCADRasterPhotoshop longint MacOS X only
5 kCADRasterPNG longint
6 kCADRasterTIFF longint
7 kCADRasterMacPICT longint MacOS X only

Used by
CADExportRasterImage.


Next: , Previous: CAD raster image format constants, Up: CAD errors and constants

5.69 CAD raster pixel size constants

Value Constant Type Description
16 kCADRasterPixelWidthMin longint
4000 kCADRasterPixelWidthMax longint
16 kCADRasterPixelHeightMin longint
4000 kCADRasterPixelHeightMax longint

Used by
CADToPixels and CADExportRasterImage.


Next: , Previous: CAD raster pixel size constants, Up: CAD errors and constants

5.70 CAD redraw mode constants

Value Constant Type Description
1 kCADRedrawModeRedrawNot longint
2 kCADRedrawModeRedrawAutomatic longint
3 kCADRedrawModeRedrawNow longint
4 kCADRedrawModeRedrawWithWatch longint

Used by
CADGetRedraw, CADSetRedraw and CADRedrawArea.


Next: , Previous: CAD redraw mode constants, Up: CAD errors and constants

5.71 CAD scope logic constants

Value Constant Type Description
1 kCADScopeLogicOr longint
2 kCADScopeLogicAnd longint
3 kCADScopeLogicXor longint
4 kCADScopeLogicAndNotB longint
5 kCADScopeLogicAndNotA longint

Used by
CADScopeLogic.


Next: , Previous: CAD scope logic constants, Up: CAD errors and constants

5.72 CAD scope type constants

Value Constant Type Description
1 kCADTypeOfScopeBySpecialID longint The Scope is either kCADScopeSelectedObjects, kCADScopeAllObjects or kCADScopeObjOnEditableLayers
2 kCADTypeOfScopeByScopeID longint The Scope is a programmer scope ID
3 kCADTypeOfScopeByLayerID longint The Scope is a Layer ID
4 kCADTypeOfScopeBySubLayerID longint The Scope is a Sublayer ID
5 kCADTypeOfScopeByObjID longint The Scope is an Object ID

Used by
CADTypeOfScope.


Next: , Previous: CAD scope type constants, Up: CAD errors and constants

5.73 CAD scope constants

Value Constant Type Description
1 kCADScopeSelectedObjects longint Selected objects, can be a target scope
3 kCADScopeAllObjects longint All objects, can’t be a target scope
4 kCADScopeObjOnEditableLayers longint All objects on layers with mode kCADLayerModeEditable, can’t be a target scope

Important
An object scope refers to objects in one Block or to objects in the root block of a drawing. It never consists of objects in different blocks. So, for example kCADScopeAllObjects for kCADRootBlockID refers to block insertion objects, but not to the contents of inserted blocks.

Used by
CADTriggerUndo, CADGetPaperSizes, CADTypeOfScope, CADEmptyScope, CADCopyScope, CADToScope, CADFromScope, CADInScope, CADScopeLogic, CADSelect, CADCount, CADGetObjIDsArray, CADOneObjID, CADGetObjID, CADGetLayer, CADSetLayer, CADGetObjType, CADFindByType, CADMoveToFront, CADMoveToBack, CADRemoveObj, CADBounds, CADMetrics, CADMetricsByMatrix, CADFindSnap, CADFindCrossings, CADHatchToLine, CADSplitPoly, CADGetFill, CADSetFill, CADGetColor, CADSetColor, CADGetInsertColor, CADSetInsertColor, CADGetLineWidth, CADSetLineWidth, CADGetFont, CADSetFont, CADGetLineType, CADSetLineType, CADGetMarking, CADSetMarking, CADGetHatch, CADSetHatch, CADGetLock, CADSetLock, CADGetLockByMask, CADSetLock, CADFindByLock, CADGetKey, CADSetKey, CADGetKeyArray, CADSetKeyArray, CADFindByKey, CADMoveTo, CADCopyTo, CADMoveByMatrix, CADCopyByMatrix, CADCompareObj, CADTranslate, CADRotate, CADScale, CADMirror, CADShear, CADTransform, CADRotateObj, CADGetRotation, CADSetRotation, CADStretchObj, CADLengthenObj, CADFlipObj, CADAlign, CADAlignToGrid, CADBlend, CADSpirograph and CADOnEvent.


Next: , Previous: CAD scope constants, Up: CAD errors and constants

5.74 CAD scroll alignment constants

Value Constant Type Description
1 kCADScrollAlignLeft longint
1 kCADScrollAlignBottom longint
2 kCADScrollAlignMid longint
3 kCADScrollAlignRight longint
3 kCADScrollAlignTop longint

Used by
CADScrollTo and CADGetScroll.


Next: , Previous: CAD scroll alignment constants, Up: CAD errors and constants

5.75 CAD selection action constants

Value Constant Type Description
1 kCADSelectActionSelect longint
2 kCADSelectActionSelectAdd longint
3 kCADSelectActionDeselect longint

Used by
CADSelect and CADOnEvent.


Next: , Previous: CAD selection action constants, Up: CAD errors and constants

5.76 CAD selection method constants

Value Constant Type Description
1 kCADSelectMethodByClick longint
2 kCADSelectMethodByIntersect longint
3 kCADSelectMethodByEnclose longint
4 kCADSelectMethodByLine longint

Used by
CADSelect.


Next: , Previous: CAD selection method constants, Up: CAD errors and constants

5.77 CAD shear constants

Value Constant Type Description
1 kCADShearX longint
2 kCADShearY longint

Used by
CADShear and CADShearMatrix.


Next: , Previous: CAD shear constants, Up: CAD errors and constants

5.78 CAD snap size constants

Value Constant Type Description
0 kCADSnapMinimumPixelRadius longint
5 kCADSnapDefaultPixelRadius longint
100 kCADSnapMaximumPixelRadius longint

Used by
CADGetSnapPrefs and CADSetSnapPrefs.


Next: , Previous: CAD snap size constants, Up: CAD errors and constants

5.79 CAD snap type constants

Value Constant Type Description
0 kCADSnapNoSnap longint
1 kCADSnapByFilledGrip longint
2 kCADSnapByOpenGrip longint
3 kCADSnapByBlip longint
4 kCADSnapByCrossing longint
5 kCADSnapAddedToBlock longint
6 kCADSnapByGrid longint

Used by
CADFindSnap.


Next: , Previous: CAD snap type constants, Up: CAD errors and constants

5.80 CAD snap mask constants

Value Constant Type Description
-1 kCADActivateAllSnaps longint
0 kCADActivateNoSnap longint
1 kCADActivateSnapByFilledGrip longint
2 kCADActivateSnapByOpenGrip longint
4 kCADActivateSnapByBlip longint
7 kCADActivateSnapByGripOrBlip longint
8 kCADActivateSnapByCrossing longint
15 kCADActivateSnapByObj longint
16 kCADActivateSnapAddedToBlock longint

Used by
CADGetBlockSnapMask and CADSetBlockSnapMask.


Next: , Previous: CAD snap mask constants, Up: CAD errors and constants

5.81 CAD spirograph constants

Value Constant Type Description
1279 kCADSpirographDefaultColorMax longint
1535 kCADSpirographLastColorMax longint

Used by
CADSpirograph.


Next: , Previous: CAD spirograph constants, Up: CAD errors and constants

5.82 CAD stretch anchor constants

Value Constant Type Description
1 kCADStretchObjAnchoredLeft longint
1 kCADStretchObjAnchoredBottom longint
2 kCADStretchObjAnchoredMid longint
3 kCADStretchObjAnchoredRight longint
3 kCADStretchObjAnchoredTop longint

Used by
CADStretchObj and CADOnEvent.


Next: , Previous: CAD stretch anchor constants, Up: CAD errors and constants

5.83 CAD string horizontal justification constants

Value Constant Type Description
1 kCADJustifyLeft longint
2 kCADJustifyRight longint
3 kCADJustifyCentered longint

Used by
CADGetStrDefaults, CADSetStrDefaults, CADAddString, CADObjString, CADGetStringXY, CADSetStringXY, CADStringBounds, CADGetFont and CADSetFont.


Next: , Previous: CAD string horizontal justification constants, Up: CAD errors and constants

5.84 CAD string maximum length constants

Value Constant Type Description
0 kCADMaxStringLengthDefault longint
255 kCADMaxStringLengthStr255 longint
32700 kCADMaxStringLengthText4D longint

Constant kCADMaxStringLengthDefault specifies kCADMaxStringLengthStr255 for single-line strings and kCADMaxStringLengthText4D for multi-line strings.

Used by
CADSetStrDefaults, CADAddString, CADSetString.


Next: , Previous: CAD string maximum length constants, Up: CAD errors and constants

5.85 CAD string vertical justification constants

Value Constant Type Description
1 kCADJustifyTop longint
2 kCADJustifyBottom longint
3 kCADJustifyMid longint

Used by
CADGetDefaults, CADSetStrDefaults, CADAddString, CADObjString, CADGetStringXY, CADSetStringXY, CADStringBounds, CADGetFont and CADSetFont.


Next: , Previous: CAD string vertical justification constants, Up: CAD errors and constants

5.86 CAD title split constants

Value Constant Type Description
0 kCADTitleSplitMaskNone longint
1 kCADTitleSplitMaskLeft longint
2 kCADTitleSplitMaskTop longint
4 kCADTitleSplitMaskHorzScrollBar longint
8 kCADTitleSplitMaskVertScrollBar longint

Used by
CADGetTitleSplit and CADSetTitleSplit.


Next: , Previous: CAD title split constants, Up: CAD errors and constants

5.87 CAD undo trigger constants

Value Constant Type Description
0 kCADTriggerUndoRedo longint
1 kCADTriggerUndoOnly longint
2 kCADTriggerNoUndo longint

Used by
CADTriggerUndo and CADCommand.


Next: , Previous: CAD undo trigger constants, Up: CAD errors and constants

5.88 CAD undo constants

Value Constant Type Description
1 kCADUndoByApplication longint
2 kCADUndoTranslate longint
3 kCADUndoTranslateByKey longint
4 kCADUndoReshape longint
5 kCADUndoMirrorHorizontal longint
6 kCADUndoMirrorVertical longint
7 kCADUndoFlipLeftRight longint
8 kCADUndoFlipTopBottom longint
9 kCADUndoRotatePlus90 longint
10 kCADUndoRotateMinus90 longint
11 kCADUndoRotateObjPlus90 longint
12 kCADUndoRotateObjMinus90 longint
13 kCADUndoRemoveObj longint
14 kCADUndoDrawObj longint
15 kCADUndoWriteString longint
16 kCADUndoSpecialClick longint
17 kCADUndoTranslateByMeasurePane longint
18 kCADUndoRotateObjByMeasurePane longint

Used by
CADOnEvent.


Next: , Previous: CAD undo constants, Up: CAD errors and constants

5.89 CAD unit conversion constants

Value Constant Type Description
1 kCADConversionUnitmm longint
2 kCADConversionUnitInch longint
3 kCADConversionUnitPixel longint

Used by
CADGetUnit and CADSetUnit.


Next: , Previous: CAD unit conversion constants, Up: CAD errors and constants

5.90 CAD version constants

Value Constant Type Description
kCADVersion string

The version string consists of:

Important
kCADVersion is a compile-time value, not a run-time value. The CADGetVersion function returns a run-time value. By comparing kCADVersion with the result of CADGetVersion you can check whether run-time and compile-time values match (in other words if the same version of CAD is installed as you compiled with).

Used by
To be used by the application


Next: , Previous: CAD version constants, Up: CAD errors and constants

5.91 CAD view constants

Value Constant Type Description
1 kCADMainView longint
2 kCADLeftTitleView longint
3 kCADTopTitleView longint
4 kCADTopLeftTitleView longint

Used by
CADScroll, CADScrollTo, CADGetScroll, CADZoom, CADAutoZoom and CADGetZoom.


Next: , Previous: CAD view constants, Up: CAD errors and constants

5.92 CAD zoom alignment constants

Value Constant Type Description
0 kCADZoomAlignNot longint
1 kCADZoomAlignLeft longint
1 kCADZoomAlignBottom longint
2 kCADZoomAlignMid longint
3 kCADZoomAlignRight longint
3 kCADZoomAlignTop longint

Used by
CADZoom, CADAutoZoom, CADGetTitleSplit and CADSetTitleSplit.


Previous: CAD zoom alignment constants, Up: CAD errors and constants

5.93 CAD zoom method constants

Value Constant Type Description
0 kCADZoomByCurrentMethod longint
1 kCADZoomByFreeFactor longint
2 kCADZoomBySmallDecimalSteps longint
3 kCADZoomByLargeDecimalSteps longint

Used by
CADZoom, CADAutoZoom, CADGetZoomPrefs and CADSetZoomPrefs.


Next: , Previous: CAD errors and constants, Up: Top

6 CAD areas and methods

A Thematical method index was given in the chapter on Programming tasks. The lists that follow are alphabetical.

Areas

Callback prototypes

Methods


Next: , Up: CAD areas and methods

6.1 %CAD

eacad.png

The plug-in method %CAD defines an editable 4D CAD area. To use it, add it as a variable of type Plug-in Area to a 4D form. The variable must be typed as a longint, in this case as C_LONGINT(eaCAD), the Area ID.

The %CAD area can be used as an auto-resizable area. This is a useful feature, as the area will accomodate itself automatically when the user resizes the 4D form’s window. To accomplish this

The area can be customized with CADSetDisplay, CADSetTitleSplit and CADSetBackColor, see Area.

A %CAD area can be put on a 4D output form also, but it is recommended that you use a %CADView area for that purpose instead. A %CAD area can not be used on a 4D output form for printing, 4D CAD has its own printing methods.

Loading and storing of drawings is handled by calling 4D CAD methods, see Storing and loading drawings.

Related methods
%CADView, %CADBackground, CADGetSysBackColor, CADGetBackColor, CADSetBackColor, CADGetDisplay, CADSetDisplay, CADGetTitleSplit, CADSetTitleSplit, CADLoadFromBlob, CADStoreToBlob, CADLoadFromFile, CADStoreToFile.


Next: , Previous: %CAD, Up: CAD areas and methods

6.2 %CADBackground

eacadbackground.png

The plug-in method %CADBackground defines a 4D CAD area that is not editable and not focusable (tabable) as on object on a 4D form. A %CADBackground area is an ideal way to show background graphics on a 4D form You can put it on page 0 of the form, or on separate pages. It will try to use the background color of the 4D form as background color, but you can still call CADSetBackColor.

To use it, add %CADBackground as a variable of type Plug-in Area to a 4D form. The variable must be typed as a longint, in the example as C_LONGINT(eaBackground), the Area ID.

A %CADBackground area can also be put on a 4D output form, but it can not be used on a 4D output form for printing, 4D CAD has its own printing methods.

Loading of drawings is handled by calling 4D CAD methods, see Storing and loading drawings.

Related methods
%CAD, %CADView, CADGetSysBackColor, CADGetBackColor, CADSetBackColor, CADGetDisplay, CADSetDisplay, CADLoadFromBlob, CADLoadFromFile, CADLoadFromRes.


Next: , Previous: %CADBackground, Up: CAD areas and methods

6.3 %CADColors

eacadcolors.png

The plug-in method %CADColors defines a 4D CAD area with a color palette. It can be used in application dialogs. for example to set line colors and fill colors.

To use it, add %CADColors as a variable of type Plug-in Area to a 4D form. The variable must be typed as a longint, in the example as C_LONGINT(eaEdtCol), the Area ID.

The default palette shown is the 4D color palette, but the palette can be changed by calling CADSetItemColor. 4D CAD accepts 16-million colors, which is more than there are on the color palette. When an actual color value is not found on the palette, for example for an object that was imported from a DXF file, you can best change the last color on the palette to hold the actual color value (the last color is by default black and the last color on the first row is black also).

The whole color palette can be dimmed with CADSetColorsDim, to indicate that it is not enterable.

Related methods
CADGetColorItem, CADSetColorItem, CADGetItemColor, CADSetItemColor, CADGetColorsDim, CADSetColorsDim, CADIndexToColor, CADColorToIndex, CADRGBToColor, CADColorToRGB, CADDXFToColor, CADColorToDXF, CADBlendColor.


Next: , Previous: %CADColors, Up: CAD areas and methods

6.4 %CADView

eacadview.png

The plug-in method %CADView defines a 4D CAD area that is not focusable (tabable) as on object on a 4D form. The area can be edited with the mouse, but not with the keyboard. Of course, you can make its layers non-editable (see CADSetLayerAttributes). A %CADView area is an ideal way to show preview areas (hence the name) or for use as an area that shows graphics of some form.

To use it, add %CADView as a variable of type Plug-in Area to a 4D form. The variable must be typed as a longint, in the example as C_LONGINT(eaCADPrev), the Area ID.

A %CADView area can also be put on a 4D output form. In this case, it will try to use auto zoom in this order

A %CADView area can not be used on a 4D output form for printing, 4D CAD has its own printing methods.

The area can be customized with CADSetDisplay and CADSetBackColor, see Area. Loading of drawings is handled by calling 4D CAD methods, see Storing and loading drawings.

Related methods
%CAD, %CADBackground, CADGetSysBackColor, CADGetBackColor, CADSetBackColor, CADGetDisplay, CADSetDisplay, CADLoadFromBlob, CADLoadFromFile, CADLoadFromRes.


Next: , Previous: %CADView, Up: CAD areas and methods

6.5 CADOnError

CADOnError is not a callable method, but a prototype of a 4D method that you install as an error callback method. 4D CAD will call the method when an error occurs as a result of user operations in the 4D CAD area.

IO Parameter Type Description
in theCADArea longint Area ID
in theError OSErr The Error result code found. Note that CADOnError is not called for kCADUserCanceledOperation or kCADNoError
in theAlertFlag integer kCADFalse if the error occurred during a screen update, so that an alert dialog could possibly cause an endless loop, kCADTrue otherwise
out theErrorResult longint Set to kCADErrorResultDoFilter to handle the error yourself, set to kCADErrorResultDontFilter to let 4D CAD handle the error.

The method is not called when a 4D CAD method finds an error. Methods return an Error result code, see Error handling.

Important
You must type the parameters of callback methods, otherwise 4D will crash in a compiled application.

Related methods
CADGetOnError, CADSetOnError, CADGetOnEvent, CADSetOnEvent, CADOnEvent.


Next: , Previous: CADOnError, Up: CAD areas and methods

6.6 CADOnEvent

CADOnEvent is not a callable method, but a prototype of a 4D method that you install as an event callback method. 4D CAD will call the method when specific events occur.

IO Parameter Type
in theCADArea longint Area ID
in theEventID longint An event ID constant
in theEventPhase longint An event phase constant
in theEventData1 longint See CAD events
in theEventData2 longint See CAD events
in theEventData3 longint See CAD events
in theEventData4 longint See CAD events
in theMouseX real
in theMouseY real
in theEventValue1 real See CAD events
in theEventValue2 real See CAD events
in theKeyAsciiValue integer
in theModifiers longint A mask of modifier key constants
in theTickCount longint
in/out theEventResult longint

For a description of the parameters, see the chapter on CAD events. For an example, see EDtCEvent and EBlockEdEvent in DemoCAD. Also see the sections on Event handling, Undo handling and Copy and paste control.

Important
You must type the parameters of callback methods, otherwise 4D will crash in a compiled application.

Related methods
CADGetOnEvent, CADSetOnEvent, CADGetOnError, CADSetOnError, CADOnError.


Next: , Previous: CADOnEvent, Up: CAD areas and methods

6.7 CADAcceptDXF

CADAcceptDXF accepts the pending results of a previous call to CADImportDXF.

IO Parameter Type Description
in theCADArea longint Area ID
in theDXFtoCADUnitFactor real See Unit and scale and Importing DXF files. The factor converts the unit of the DXF file to the current unit of the drawing.
in thePrintScale real The print scale is required in converting DXF lineweights into CAD linewidths.
out function result OSErr Error result code, also see Error handling

Remarks
Before accepting with CADAcceptDXF, you can call CADSetUnit to change the current unit of the drawing.

Important
You must call CADAcceptDXF or CADCancelDXF after a successful call to CADImportDXF.

Related methods
CADGetDXFFile, CADImportDXF, CADCancelDXF, CADGetUnit and CADSetUnit.


Next: , Previous: CADAcceptDXF, Up: CAD areas and methods

6.8 CADAddArray

CADAddArray stores a copy of a 4D array inside a drawing.

IO Parameter Type Description
in theCADArea longint Area ID
in theArrayMinID longint See Arrays and Keys. Pass the minimum desired array ID or 0 to get the first free array ID
out theArrayResultID longint See Arrays
in theArray array Any 4D one- or two-dimensional array, except arrays of pointer
out function result OSErr Error result code, also see Error handling

Remarks
The purpose is to store custom data in 4D CAD drawings, see Arrays and Keys.

Related methods
CADGetArray, CADSetArray, CADRemoveArray and CADGetArrayIDs.


Next: , Previous: CADAddArray, Up: CAD areas and methods

6.9 CADAddBlock

CADAddBlocks adds an empty Block to a drawing.

IO Parameter Type Description
in theCADArea longint Area ID
in theBlockName Str255 Name of the new block, up to 255 characters long (need not be unique)
out theNewBlockID longint See Block
out function result OSErr Error result code, also see Error handling

Remarks
Until you call CADAddInsert or CADAddInsertXY, blocks are not visible in the drawing.

Related methods
CADRemoveBlock, CADGetBlocks, CADGetBlockKey, CADSetBlockKey, CADGetBlockInfo, CADSetBlockName, CADAddInsert and CADAddInsertXY.


Next: , Previous: CADAddBlock, Up: CAD areas and methods

6.10 CADAddCircle

CADAddCircle adds a Circle to a drawing or a block.

IO Parameter Type Description
in theCADArea longint Area ID
in theBlockID longint A Block ID or kCADRootBlockID for the root drawing
in theLayerOrSubLayerID longint Layer ID or Sublayer ID
in theCenterX real See Circle and Coordinates
in theCenterY real See Circle and Coordinates
in theRadius real See Circle
in theRotation real See Circle and Angle. The rotation is visible in the Linetype, the Hatch and in the Transform to an Ellipse
in theLineWidth real Linewidth (also see Linewidth and linetype restrictions)
in theLineTypeID longint Linetype ID or a linetype ID constant
in theLineColor longint Color or a color constant
in theFillStyle integer A fill style constant, see Fill
in theFillColor longint Color or a color constant
in theHatchID longint A Hatch ID or hatch ID constant
out theNewObjID longint Object ID of the new object
out function result OSErr Error result code, also see Error handling

Related methods
CADAddEllipse, CADGetCircle, CADSetCircle, CADObjCircle, CADLineAndArc, CADArcAndArc.


Next: , Previous: CADAddCircle, Up: CAD areas and methods

6.11 CADAddCircleArc

CADAddCircleArc adds a Circle arc to a drawing or a block.

IO Parameter Type Description
in theCADArea longint Area ID
in theBlockID longint A Block ID or kCADRootBlockID for the root drawing
in theLayerOrSubLayerID longint Layer ID or Sublayer ID
in theCenterX real See Circle arc and Coordinates
in theCenterY real See Circle arc and Coordinates
in theRadius real See Circle arc
in theRotation real See Circle arc and Angle
in theStartAngle real See Circle arc and Angle
in theEndAngle real See Circle arc and Angle
in theLineWidth real Linewidth (also see Linewidth and linetype restrictions)
in theLineTypeID longint Linetype ID or a linetype ID constant
in theLineColor longint Color or a color constant
in theFillStyle integer A fill style constant, see Fill
in theFillColor longint Color or a color constant
in theHatchID longint A Hatch ID or hatch ID constant
out theNewObjID longint Object ID of the new object
out function result OSErr Error result code, also see Error handling

Related methods
CADAddEllipseArc, CADGetCircleArc, CADSetCircleArc, CADObjCircleArc, CADLineAndArc, CADArcAndArc.


Next: , Previous: CADAddCircleArc, Up: CAD areas and methods

6.12 CADAddEllipse

CADAddEllipse adds an Ellipse to a drawing or a block.

IO Parameter Type Description
in theCADArea longint Area ID
in theBlockID longint A Block ID or kCADRootBlockID for the root drawing
in theLayerOrSubLayerID longint Layer ID or Sublayer ID
in theCenterX real See Ellipse and Coordinates
in theCenterY real See Ellipse and Coordinates
in theRadiusX real See Ellipse
in theRadiusY real See Ellipse
in theRotation real See Ellipse and Angle
in theLineWidth real Linewidth (also see Linewidth and linetype restrictions)
in theLineTypeID longint Linetype ID or a linetype ID constant
in theLineColor longint Color or a color constant
in theFillStyle integer A fill style constant, see Fill
in theFillColor longint Color or a color constant
in theHatchID longint A Hatch ID or hatch ID constant
out theNewObjID longint Object ID of the new object
out function result OSErr Error result code, also see Error handling

Related methods
CADAddCircle, CADGetEllipse, CADSetEllipse, CADObjEllipse, CADLineAndArc, CADArcAndArc.


Next: , Previous: CADAddEllipse, Up: CAD areas and methods

6.13 CADAddEllipseArc

CADAddEllipseArc adds an Ellipse arc to a drawing or a block.

IO Parameter Type Description
in theCADArea longint Area ID
in theBlockID longint A Block ID or kCADRootBlockID for the root drawing
in theLayerOrSubLayerID longint Layer ID or Sublayer ID
in theCenterX real See Ellipse arc and Coordinates
in theCenterY real See Ellipse arc and Coordinates
in theRadiusX real See Ellipse arc
in theRadiusY real See Ellipse arc
in theRotation real See Ellipse arc and Angle
in theStartAngle real See Ellipse arc and Angle
in theEndAngle real See Ellipse arc and Angle
in theLineWidth real Linewidth (also see Linewidth and linetype restrictions)
in theLineTypeID longint Linetype ID or a linetype ID constant
in theLineColor longint Color or a color constant
in theFillStyle integer A fill style constant, see Fill
in theFillColor longint Color or a color constant
in theHatchID longint A Hatch ID or hatch ID constant
out theNewObjID longint Object ID of the new object
out function result OSErr Error result code, also see Error handling

Related methods
CADAddCircleArc, CADGetEllipseArc, CADSetEllipseArc, CADObjEllipseArc, CADLineAndArc, CADArcAndArc.


Next: , Previous: CADAddEllipseArc, Up: CAD areas and methods

6.14 CADAddImage

CADAddImage creates a Raster image from a picture and adds it to a drawing or a block.

IO Parameter Type Description
in theCADArea longint Area ID
in theBlockID longint A Block ID or kCADRootBlockID for the root drawing
in theLayerOrSubLayerID longint Layer ID or Sublayer ID
in theAnchorX real See Raster image. The insertion point X-coordinate
in theAnchorY real See Raster image. The insertion point Y-coordinate
in theImageAlignH integer A raster image alignment constant
in theImageAlignV integer A raster image alignment constant
in theTransparentFlag integer A boolean constant (see Raster image)
in theScanResolutionH real See Handling raster image resolutions
in theScanResolutionV real See Handling raster image resolutions
in thePrintResolutionH real See Handling raster image resolutions
in thePrintResolutionV real See Handling raster image resolutions
in theRotation real See Raster image and Angle
in thePixelType integer Pass kCADPixelTypeBW or kCADPixelTypeColor
in theRasterPicture Picture Picture field or variable. Vector information is converted to raster information
out theNewObjID longint Object ID of the new object
out function result OSErr Error result code, also see Error handling

Resolution formulas

Resolution [in dpi] = UnitsPerInch [ in Unit/Inch ] * NumberOfPixels / Size [ in Unit]

Size [in Unit] = UnitsPerInch [ in Unit/Inch ] * NumberOfPixels / Resolution [ in dpi]

So, for example, if the CAD unit is mm:

Resolution [in dpi] = 25.4 * NumberOfPixels / Size [ in Unit]

Size [in Unit] = 25.4 * NumberOfPixels / Resolution [ in dpi]

Related methods
CADGetImage, CADSetImage, CADGetImageXY, CADSetImageXY, CADObjImage, CADCalcImageResolution, CADCalcImageMatrix, CADGetImageInfo CADGetImageFile, CADGetImageFileInfo and CADImportImage.


Next: , Previous: CADAddImage, Up: CAD areas and methods

6.15 CADAddInsert

CADAddInsert places a Block by adding a Block insert object with a Transform to a drawing or another block.

IO Parameter Type Description
in theCADArea longint Area ID
in theBlockID longint A Block ID or kCADRootBlockID for the root drawing
in theLayerOrSubLayerID longint Layer ID or Sublayer ID
in theInsertBlockID longint Block ID of the Block to place
in theMatrixParam1 real Parameter 1 of a Linear transformation matrix
in theMatrixParam2 real Parameter 2 of a Linear transformation matrix
in theMatrixParam3 real Parameter 3 of a Linear transformation matrix
in theMatrixParam4 real Parameter 4 of a Linear transformation matrix
in theMatrixParam5 real Parameter 5 of a Linear transformation matrix
in theMatrixParam6 real Parameter 6 of a Linear transformation matrix
out theNewObjID longint Object ID of the new object
out function result OSErr Error result code, also see Error handling

Important
Non-terminating circular block inserts will lead to plug-in crashes (e.g. when block A places block B and at the same time block B places block A).

Related methods
CADAddInsertXY, CADObjInsert, CADGetInsertID, CADSetInsertID, CADGetInsert, CADSetInsert, CADGetInsertXY, CADSetInsertXY, CADGetBlockInfo, CADGetBlocks, CADStandardMatrix.


Next: , Previous: CADAddInsert, Up: CAD areas and methods

6.16 CADAddInsertXY

CADAddInsertXY places a Block by adding a Block insert object to a drawing or another block.

IO Parameter Type Description
in theCADArea longint Area ID
in theBlockID longint A Block ID or kCADRootBlockID for the root drawing
in theLayerOrSubLayerID longint Layer ID or Sublayer ID
in theInsertBlockID longint Block ID of the Block to place
in theInsertX real Insertion point X-coordinate
in theInsertY real Insertion point Y-coordinate
out theNewObjID longint Object ID of the new object
out function result OSErr Error result code, also see Error handling

Important
Non-terminating circular block inserts will lead to plug-in crashes (e.g. when block A places block B and at the same time block B places block A).

Related methods
CADAddInsert, CADObjInsert, CADGetInsertID, CADSetInsertID, CADGetInsert, CADSetInsert, CADGetInsertXY, CADSetInsertXY, CADGetBlockInfo, CADGetBlocks.


Next: , Previous: CADAddInsertXY, Up: CAD areas and methods

6.17 CADAddLayer

CADAddLayer adds an empty Layer to a drawing.

IO Parameter Type Description
in theCADArea longint Area ID
in theLayerName Str255 Name of the new layer, up to 255 characters long (need not be unique)
out theNewLayerID longint Layer ID of the new layer
out function result OSErr Error result code, also see Error handling

Remarks
The mode of the new layer is kCADLayerModeEditable.

Important
CADAddLayer doesn’t set the current layer. You may have to call CADSetCurrentLayer separately.

Related methods
CADAddSubLayer, CADRemoveLayer, CADGetLayers, CADGetSubLayers, CADGetLayerAttributes, CADSetLayerAttributes, CADGetGrid, CADSetGrid, CADGetLayerKey, CADSetLayerKey, CADGetLayerOrder, CADSetLayerOrder, CADGetCurrentLayer, CADSetCurrentLayer.


Next: , Previous: CADAddLayer, Up: CAD areas and methods

6.18 CADAddLine

CADAddLine adds a Line to a drawing or a block.

IO Parameter Type Description
in theCADArea longint Area ID
in theBlockID longint A Block ID or kCADRootBlockID for the root drawing
in theLayerOrSubLayerID longint Layer ID or Sublayer ID
in theStartX real X-coordinate of the start point of the Line
in theStartY real Y-coordinate of the start point of the Line
in theEndX real X-coordinate of the end point of the Line
in theEndY real Y-coordinate of the end point of the Line
in theLineWidth real Linewidth (also see Linewidth and linetype restrictions)
in theLineTypeID longint Linetype ID or a linetype ID constant
in theLineColor longint Color or a color constant
out theNewObjID longint Object ID of the new object
out function result OSErr Error result code, also see Error handling

Related methods
CADAddPolyLine, CADGetLine, CADSetLine, CADObjLine, CADPointOnLine, CADLineAndLine, CADLineAndRect, CADLineAndArc.


Next: , Previous: CADAddLine, Up: CAD areas and methods

6.19 CADAddPolyLine

CADAddPolyLine adds a Polyline to a drawing or a block.

IO Parameter Type Description
in theCADArea longint Area ID
in theBlockID longint A Block ID or kCADRootBlockID for the root drawing
in theLayerOrSubLayerID longint Layer ID or Sublayer ID
in thePolyIsClosedFlag integer A boolean constant (see Polyline)
in theVerticesX array of real Each array element is an X-coordinate of a Polyline vertex
in theVerticesY array of real Each array element is an Y-coordinate of a Polyline vertex
in theLineWidth real Linewidth (also see Linewidth and linetype restrictions)
in theLineTypeID longint Linetype ID or a linetype ID constant
in theLineColor longint Color or a color constant
in theFillStyle integer A fill style constant, see Fill
in theFillColor longint Color or a color constant
in theHatchID longint A Hatch ID or hatch ID constant
out theNewObjID longint Object ID of the new object
out function result OSErr Error result code, also see Error handling

Remarks
An open polyline must have at least two vertices. A closed polyline must have at least three vertices. An open polyline can not have a hatch or a fill. The surface area of an open polyline is 0. A polyline doesn’t have a rotation. If you need a rotation field for programming purposes, call CADSetPolyAngle to maintain that field yourself.

Important
Don’t close the polyline by duplicating the first vertex as the last vertex (as in 4D Draw). Instead, set the thePolyIsClosedFlag to kCADTrue.

Related methods
CADObjLine, CADObjPolyLine, CADGetPolyLine, CADSetPolyLine, CADGetPolyAngle, CADSetPolyAngle, CADPolyBounds, CADPolyUndouble, CADPolyCalc, CADSplitPoly, CADSplitPolyXY, CADPointInPoly, CADCheckPoly, CADPolyAndPoly.


Next: , Previous: CADAddPolyLine, Up: CAD areas and methods

6.20 CADAddRectangle

CADAddRectangle adds a Rectangle to a drawing or a block.

IO Parameter Type Description
in theCADArea longint Area ID
in theBlockID longint A Block ID or kCADRootBlockID for the root drawing
in theLayerOrSubLayerID longint Layer ID or Sublayer ID
in theX1 real Left side X-coordinate of the unrotated rectangle
in theY1 real Bottom Y-coordinate of the unrotated rectangle
in theX2 real Right side X-coordinate of the unrotated rectangle
in theY2 real Top Y-coordinate of the unrotated rectangle
in theRotation real Angle of rotation around the rectangle’s center
in theLineWidth real Linewidth (also see Linewidth and linetype restrictions)
in theLineTypeID longint Linetype ID or a linetype ID constant
in theLineColor longint Color or a color constant
in theFillStyle integer A fill style constant, see Fill
in theFillColor longint Color or a color constant
in theHatchID longint A Hatch ID or hatch ID constant
out theNewObjID longint Object ID of the new object
out function result OSErr Error result code, also see Error handling

Related methods
CADAddSquare, CADObjRectangle, CADGetRectangle, CADSetRectangle, CADPointInRect, CADRectAndRect, CADLineAndRect.


Next: , Previous: CADAddRectangle, Up: CAD areas and methods

6.21 CADAddScope

CADAddScope adds an empty programmer Scope of objects to a drawing or a block.

IO Parameter Type Description
in theCADArea longint Area ID
in theBlockID longint A Block ID or kCADRootBlockID for the root drawing
out theScopeID longint The new Scope ID
out function result OSErr Error result code, also see Error handling

Remarks
If you are done with the scope, call CADRemoveScope to remove the scope (this doesn’t remove any objects, just the set that describes a specific selection of objects).

Important
Scopes are not stored permanently in a drawing (except for kCADScopeSelectedObjects). If you need to store programmer scopes with a drawing, call CADGetObjIDsArray and store theObjIDs array with CADAddArray.

Related methods
CADCount, CADGetObjIDsArray, CADOneObjID, CADGetObjID, CADTypeOfScope, CADRemoveScope, CADEmptyScope, CADGetScopeIDs, CADCopyScope, CADToScope, CADFromScope, CADInScope, CADScopeLogic.


Next: , Previous: CADAddScope, Up: CAD areas and methods

6.22 CADAddSquare

CADAddSquare adds a Square to a drawing or a block.

IO Parameter Type Description
in theCADArea longint Area ID
in theBlockID longint A Block ID or kCADRootBlockID for the root drawing
in theLayerOrSubLayerID longint Layer ID or Sublayer ID
in theX1 real Left side X-coordinate of the unrotated square
in theY1 real Bottom Y-coordinate of the unrotated square
in theX2 real Right side X-coordinate of the unrotated square
in theY2 real Top Y-coordinate of the unrotated square
in theRotation real Angle of rotation around the square’s center
in theLineWidth real Linewidth (also see Linewidth and linetype restrictions)
in theLineTypeID longint Linetype ID or a linetype ID constant
in theLineColor longint Color or a color constant
in theFillStyle integer A fill style constant, see Fill
in theFillColor longint Color or a color constant
in theHatchID longint A Hatch ID or hatch ID constant
out theNewObjID longint Object ID of the new object
out function result OSErr Error result code, also see Error handling

Remarks
If the coordinates don’t describe a square, error kCADNotSquare is returned.

Related methods
CADAddRectangle, CADObjSquare, CADGetSquare, CADSetSquare, CADPointInRect, CADRectAndRect, CADLineAndRect.


Next: , Previous: CADAddSquare, Up: CAD areas and methods

6.23 CADAddString

CADAddString adds a single- or multi-line String object to a drawing or a block.

IO Parameter Type Description
in theCADArea longint Area ID
in theBlockID longint A Block ID or kCADRootBlockID for the root drawing
in theLayerOrSubLayerID longint Layer ID or Sublayer ID
in theText text The string or text
in theBaseX real The X-coordinate of the insertion point
in theBaseY real The Y-coordinate of the unrotated base line
in theRotation real The rotation Angle of the string
in theMacFontStr Str255 A Font string, to be used on Macintosh
in theDosFontStr Str255 A Font string, to be used on Windows
in theFontSize real A fontsize, expressed in 4D CAD Units (not in points)
in theFontStyle integer A mask of font style constants
in theJustificationH integer A string horizontal justification constant
in theJustificationV integer A string vertical justification constant or 0 for single-line strings
in theTextColor longint Color or a color constant
in theTextMaxLength longint A string maximum length constant or any maximum-length value up to kCADMaxStringLengthText4D
in theMultiLineFlag integer A boolean constant that specifies whether the string can have multiple lines, either by hard breaks through CR and/or LF characters, or by automatic wrapping to a specified width
in theOptionalBoxWidth real Optional wrapping-width of a multi-line string-box, otherwise 0.0.
in theOptionalBoxHeight real Optional clipping-height of a multi-line string-box, otherwise 0.0. Must be 0.0 if theOptionalBoxWidth is 0.0
in theOptionalLineHeight real Optional line-height of multi-line strings, expressed in 4D CAD Units (not in points). If 0.0, then the line-height is calculated from the default spacing of the font
out theNewObjID longint Object ID of the new object
out function result OSErr Error result code, also see Error handling

Remarks
If theMultiLineFlag is kCADFalse but theText contains a LineFeed (LF) or Carriage Return (CR) character, then error kCADFoundCRorLFInString is returned.

Related methods
CADObjString, CADGetString, CADSetString, CADGetStringXY, CADSetStringXY, CADGetFont, CADSetFont, CADStringBounds.


Next: , Previous: CADAddString, Up: CAD areas and methods

6.24 CADAddSubLayer

CADAddSubLayer adds an empty Sublayer to a Layer in a drawing.

IO Parameter Type Description
in theCADArea longint Area ID
in theLayerID longint Layer ID
in theSubLayerName Str255 Name of the new sublayer, up to 255 characters long (need not be unique)
out theNewSubLayerID longint Sublayer ID of the new sublayer
out function result OSErr Error result code, also see Error handling

Remarks
The mode of the new sublayer is kCADLayerModeEditable (but sublayers are restricted by both the layer mode and the sublayer mode).
Unlike layers, sublayers aren’t ruled by a drawing order.

Related methods
CADAddLayer, CADRemoveLayer, CADGetLayers, CADGetSubLayers, CADGetLayerAttributes, CADSetLayerAttributes, CADGetLayerKey, CADSetLayerKey, CADGetLayerOrder, CADSetLayerOrder, CADGetCurrentLayer, CADSetCurrentLayer.


Next: , Previous: CADAddSubLayer, Up: CAD areas and methods

6.25 CADAlign

CADAlign aligns a number of objects horizontally and/or vertically.

IO Parameter Type Description
in theCADArea longint Area ID
in theLocking integer kCADLockingIgnoreLock or kCADLockingSkipLock
in theBlockID longint A Block ID or kCADRootBlockID for the root drawing
in theObjScope longint kCADScopeSelectedObjects, kCADScopeAllObjects, kCADScopeObjOnEditableLayers, a Layer ID, a Sublayer ID, a programmer scope ID or an Object ID
in theTypeOfBoundsToAlignOn integer The type of bounds determines what object-edges to align on. See Bounds and bounds type constants
in theLeftRightAlign integer A alignment constant
in theTopBottomAlign integer A alignment constant
in theFlipStringJustificationFlag integer A boolean constant that determines whether to change the horizontal justification of String objects (see string horizontal justification constants) with the value o theLeftRightAlign parameter (see alignment constants)
out function result OSErr Error result code, also see Error handling

Remarks
CADAlign first calculates the common bounds of the speficied objects. The exact metrics will depend on the value of theTypeOfBoundsToAlignOn parameter. Next, the horizontal and vertical alignment point to use for the alignment, will be either an edge or the center of the bounds.

Important
It is not an error if the object scope contains 0 or 1 objects.

Related methods
CADBounds, CADStringBounds, CADGetFont, CADSetFont, CADTranslate and CADAlignToGrid.


Next: , Previous: CADAlign, Up: CAD areas and methods

6.26 CADAlignToGrid

CADAlignToGrid aligns a number of objects horizontally and/or vertically to the grid. Each object is aligned independently.

IO Parameter Type Description
in theCADArea longint Area ID
in theLocking integer kCADLockingIgnoreLock or kCADLockingSkipLock
in theObjScope longint kCADScopeSelectedObjects, kCADScopeAllObjects, kCADScopeObjOnEditableLayers, a Layer ID, a Sublayer ID, a programmer scope ID or an Object ID
in theLeftRightAlign integer A alignment constant
in theTopBottomAlign integer A alignment constant
out function result OSErr Error result code, also see Error handling

Related methods
CADBounds, CADStringBounds, CADGetFont, CADSetFont, CADTranslate and CADAlign.


Next: , Previous: CADAlignToGrid, Up: CAD areas and methods

6.27 CADArcAndArc

CADArcAndArc calculates the crossing points of two arcs, where both arcs can be either a Circle, a Circle arc, an Ellipse or an Ellipse arc.

IO Parameter Type Description
in theArc1CenterX real X-coordinate of the center of the first arc
in theArc1CenterY real Y-coordinate of the center of the first arc
in theArc1RadiusX real Radius of the first Circle or Circle arc, x-radius of the first Ellipse or Ellipse arc
in theArc1RadiusY real Radius of the first Circle or Circle arc, y-radius of the first Ellipse or Ellipse arc
in theArc1Rotation real Rotation Angle of the first arc
in theOptionalArc1StartAngle real Start angle of the first Circle arc or Ellipse arc, 0 for the first Circle or Ellipse
in theOptionalArc1EndAngle real End angle of the first Circle arc or Ellipse arc, 0 for the first Circle or Ellipse
in theArc2CenterX real X-coordinate of the center of the second arc
in theArc2CenterY real Y-coordinate of the center of the second arc
in theArc2RadiusX real Radius of the second Circle or Circle arc, x-radius of the second Ellipse or Ellipse arc
in theArc2RadiusY real Radius of the second Circle or Circle arc, y-radius of the second Ellipse or Ellipse arc
in theArc2Rotation real Rotation Angle of the second arc
in theOptionalArc2StartAngle real Start angle of the second Circle arc or Ellipse arc, 0 for the second Circle or Ellipse
in theOptionalArc2EndAngle real End angle of the second Circle arc or Ellipse arc, 0 for the second Circle or Ellipse
out theIntersectCount integer The number of crossing points found (or 0)
out theIntersectX1 real X-coordinate of the first crossing point (or 0)
out theIntersectY1 real Y-coordinate of the first crossing point (or 0)
out theIntersectX2 real X-coordinate of the second crossing point (or 0)
out theIntersectY2 real Y-coordinate of the second crossing point (or 0)
out theIntersectX3 real X-coordinate of the third crossing point (or 0)
out theIntersectY3 real Y-coordinate of the third crossing point (or 0)
out theIntersectX4 real X-coordinate of the fourth crossing point (or 0)
out theIntersectY4 real Y-coordinate of the fourth crossing point (or 0)
out function result OSErr Error result code, also see Error handling

Important
It is an error if any radius is less than or equal to 0.
It is not an error if no crossing points are found.

Related methods
CADLineAndLine, CADLineAndRect, CADRectAndRect, CADLineAndArc, CADPolyAndPoly, CADCheckPoly, CADFindCrossings.


Next: , Previous: CADArcAndArc, Up: CAD areas and methods

6.28 CADArcCos

IO Parameter Type Description
in theCos real
out function result real


Next: , Previous: CADArcCos, Up: CAD areas and methods

6.29 CADArcSin

IO Parameter Type Description
in theSin real
out function result real


Next: , Previous: CADArcSin, Up: CAD areas and methods

6.30 CADArcTan2

IO Parameter Type Description
in theY real
in theX real
out function result real


Next: , Previous: CADArcTan2, Up: CAD areas and methods

6.31 CADAutoZoom

IO Parameter Type Description
in theCADArea longint Area ID
in theOptionalView integer A view constant or 0
in theZoomAlignH integer A zoom alignment constant
in theZoomAlignV integer A zoom alignment constant
in theZoomMethod integer A zoom method constant
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADAutoZoom, Up: CAD areas and methods

6.32 CADBlend

IO Parameter Type Description
in theCADArea longint Area ID
in theLocking integer kCADLockingIgnoreLock
in theBlockID longint A Block ID or kCADRootBlockID for the root drawing
in theObjScope longint kCADScopeSelectedObjects, kCADScopeAllObjects, kCADScopeObjOnEditableLayers, a Layer ID, a Sublayer ID, a programmer scope ID or an Object ID
in theSaturateFactor real
in theMixToBackgroundFactor real
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADBlend, Up: CAD areas and methods

6.33 CADBlendColor

IO Parameter Type Description
in theColor longint Color or a color constant
in theBackgroundColor longint
in theSaturateFactor real
in theMixToBackgroundFactor real
out theResultColor longint Color or a color constant
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADBlobToFile, Up: CAD areas and methods

6.34 CADBounds

IO Parameter Type Description
in theCADArea longint Area ID
in theBlockID longint A Block ID or kCADRootBlockID for the root drawing
in theObjScope longint kCADScopeSelectedObjects, kCADScopeAllObjects, kCADScopeObjOnEditableLayers, a Layer ID, a Sublayer ID, a programmer scope ID or an Object ID
in theBoundsToGet integer A bounds type constant
out theBoundsX1 real
out theBoundsY1 real
out theBoundsX2 real
out theBoundsY2 real
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADBounds, Up: CAD areas and methods

6.35 CADCalcImageMatrix

IO Parameter Type Description
in theCADArea longint Area ID
in theOldMatrixParam1 real
in theOldMatrixParam2 real
in theOldMatrixParam3 real
in theOldMatrixParam4 real
in thePrintResolutionH real
in thePrintResolutionV real
out theMatrixParam1 real Parameter 1 of a Linear transformation matrix
out theMatrixParam2 real Parameter 2 of a Linear transformation matrix
out theMatrixParam3 real Parameter 3 of a Linear transformation matrix
out theMatrixParam4 real Parameter 4 of a Linear transformation matrix
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADCalcImageMatrix, Up: CAD areas and methods

6.36 CADCalcImageResolution

IO Parameter Type Description
in theCADArea longint Area ID
in theMatrixParam1 real Parameter 1 of a Linear transformation matrix
in theMatrixParam2 real Parameter 2 of a Linear transformation matrix
in theMatrixParam3 real Parameter 3 of a Linear transformation matrix
in theMatrixParam4 real Parameter 4 of a Linear transformation matrix
out thePrintResolutionH real
out thePrintResolutionV real
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADCalcImageResolution, Up: CAD areas and methods

6.37 CADCalcMatrix

IO Parameter Type Description
in theAx1 real
in theAy1 real
in theBx1 real
in theBy1 real
in theDx1 real
in theDy1 real
in theAx2 real
in theAy2 real
in theBx2 real
in theBy2 real
in theDx2 real
in theDy2 real
out theMatrixParam1 real Parameter 1 of a Linear transformation matrix
out theMatrixParam2 real Parameter 2 of a Linear transformation matrix
out theMatrixParam3 real Parameter 3 of a Linear transformation matrix
out theMatrixParam4 real Parameter 4 of a Linear transformation matrix
out theMatrixParam5 real Parameter 5 of a Linear transformation matrix
out theMatrixParam6 real Parameter 6 of a Linear transformation matrix
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADCalcMatrix, Up: CAD areas and methods

6.38 CADCancelDXF

CADCancelDXF cancels the pending results of a previous call to CADImportDXF.

IO Parameter Type Description
in theCADArea longint Area ID
out function result OSErr Error result code, also see Error handling

Important
You must call CADAcceptDXF or CADCancelDXF after a successful call to CADImportDXF.

Related methods
CADGetDXFFile, CADImportDXF, CADAcceptDXF.


Next: , Previous: CADCancelDXF, Up: CAD areas and methods

6.39 CADCheckPoly

IO Parameter Type Description
in theDoCheckFlag integer A boolean constant
out theVarPolyPx array of real
out theVarPolyPy array of real
out thePolyChangedFlag integer A boolean constant
out thePolyCheckResult integer A polyline check constant
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADCheckPoly, Up: CAD areas and methods

6.40 CADClear

IO Parameter Type Description
in theCADArea longint Area ID
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADClear, Up: CAD areas and methods

6.41 CADColorToDXF

IO Parameter Type Description
in theColor longint Color or a color constant
out theDXFBestColorIndex integer
out theDXFColorIdenticalFlag integer A boolean constant
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADColorToDXF, Up: CAD areas and methods

6.42 CADColorToIndex

IO Parameter Type Description
in theColor longint Color or a color constant
out theColorBestPaletteIndex integer
out theColorIdenticalFlag integer A boolean constant
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADColorToIndex, Up: CAD areas and methods

6.43 CADColorToRGB

IO Parameter Type Description
in theColor longint Color or a color constant
out theRed integer
out theGreen integer
out theBlue integer
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADColorToRGB, Up: CAD areas and methods

6.44 CADCommand

IO Parameter Type Description
in theCADArea longint Area ID
in theCommand longint A command constant or menu command constant
in theUndoTrigger integer An undo trigger constant
in theModifiers longint A mask of modifier key constants for menu commands (not the menu keyboard-equivalent)
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADCommand, Up: CAD areas and methods

6.45 CADCompareBlock

IO Parameter Type Description
in theSourceArea longint
in theSourceBlockID longint
in theTargetArea longint
in theTargetBlockID longint
in theCompareLayersFlag integer A boolean constant
out theIdenticalFlag integer A boolean constant
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADCompareBlock, Up: CAD areas and methods

6.46 CADCompareObj

IO Parameter Type Description
in theSourceArea longint
in theSourceBlockID longint
in theSourceScope longint kCADScopeSelectedObjects, kCADScopeAllObjects, kCADScopeObjOnEditableLayers, a Layer ID, a Sublayer ID, a programmer scope ID or an Object ID
in theTargetArea longint
in theTargetBlockID longint
in theTargetScope longint kCADScopeSelectedObjects, kCADScopeAllObjects, kCADScopeObjOnEditableLayers, a Layer ID, a Sublayer ID, a programmer scope ID or an Object ID
in theCompareLayersFlag integer A boolean constant
out theIdenticalFlag integer A boolean constant
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADCompareObj, Up: CAD areas and methods

6.47 CADCopyArea

IO Parameter Type Description
in theSourceArea longint
in theTargetArea longint
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADCopyArea, Up: CAD areas and methods

6.48 CADCopyArrays

IO Parameter Type Description
in theSourceArea longint
in theTargetArea longint
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADCopyArrays, Up: CAD areas and methods

6.49 CADCopyAttributes

IO Parameter Type Description
in theSourceArea longint
in theTargetArea longint
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADCopyAttributes, Up: CAD areas and methods

6.50 CADCopyBlocks

IO Parameter Type Description
in theSourceArea longint
in theTargetArea longint
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADCopyBlocks, Up: CAD areas and methods

6.51 CADCopyByMatrix

IO Parameter Type Description
in theSourceArea longint
in theSourceBlockID longint
in theSourceObjScope longint kCADScopeSelectedObjects, kCADScopeAllObjects, kCADScopeObjOnEditableLayers, a Layer ID, a Sublayer ID, a programmer scope ID or an Object ID
in theTargetArea longint
in theTargetBlockID longint
in theMatrixParam1 real Parameter 1 of a Linear transformation matrix
in theMatrixParam2 real Parameter 2 of a Linear transformation matrix
in theMatrixParam3 real Parameter 3 of a Linear transformation matrix
in theMatrixParam4 real Parameter 4 of a Linear transformation matrix
in theMatrixParam5 real Parameter 5 of a Linear transformation matrix
in theMatrixParam6 real Parameter 6 of a Linear transformation matrix
in theOptionalTargetObjScope longint 0 or kCADScopeSelectedObjects or a programmer scope ID
in theOptionalTargetLayerID longint
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADCopyByMatrix, Up: CAD areas and methods

6.52 CADCopyLayers

IO Parameter Type Description
in theSourceArea longint
in theTargetArea longint
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADCopyLayers, Up: CAD areas and methods

6.53 CADCopyObjByMatrix

IO Parameter Type Description
in theSourceArea longint
in theSourceBlockID longint
in theSourceObjID longint
in theTargetArea longint
in theTargetBlockID longint
in theMatrixParam1 real Parameter 1 of a Linear transformation matrix
in theMatrixParam2 real Parameter 2 of a Linear transformation matrix
in theMatrixParam3 real Parameter 3 of a Linear transformation matrix
in theMatrixParam4 real Parameter 4 of a Linear transformation matrix
in theMatrixParam5 real Parameter 5 of a Linear transformation matrix
in theMatrixParam6 real Parameter 6 of a Linear transformation matrix
out theResultObjID longint
in theOptionalTargetLayerID longint
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADCopyObjByMatrix, Up: CAD areas and methods

6.54 CADCopyObjTo

IO Parameter Type Description
in theSourceArea longint
in theSourceBlockID longint
in theSourceObjID longint
in theTargetArea longint
in theTargetBlockID longint
out theResultObjID longint
in theOptionalTargetLayerID longint
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADCopyObjTo, Up: CAD areas and methods

6.55 CADCopyPageSetup

IO Parameter Type Description
in theSourceArea longint
in theTargetArea longint
out function result OSErr Error result code, also see Error handling


Next: , Previous: CADCopyPageSetup, Up: