CompElem objects are elements of CompDoc objects. Each CompElem object is associated with one parent CompDoc object. Each CompElem object can have one CompDoc or one SimpleDoc child object associated with it. CompElem object defines what part of its child document will be visible in what part of its parent document world. Two important terms are used to define it: a window and a viewport. Viewport is the area defined in parent document coordinates that is occupied by the window area of a child document. Window is the area defined in the child document coordinates, which is visible in the parent document viewport.

AdaptiveScalingMaxDim, AdaptiveScalingMinDim

Sets maximal and minimal width of the world window, when the element is displayed (if the adaptive scaling mode is enabled).

Syntax:

max = Elem. AdaptiveScalingMaxDim
min = Elem. AdaptiveScalingMinDim

max

DOUBLE value, maximal window width

min

DOUBLE value, minimal window width

Elem

An object expression that evaluates to an Element object

ElementDocConnectionType

Read-only value. In the current CADRaster version it is set to zero. It means that child document is in separate disk file.

Syntax:

Con = Elem. ElementDocConnectionType

Con

SHORT value – constant 0.

Elem

An object expression that evaluates to an Element object

ElementName

The name of the given element.

Syntax:

Name = Elem.ElementName

Name

STRING receiving the name of the element

Elem

An object expression that evaluates to an Element object

ElementOrient

Contains the element’s orientation.

Syntax:

State = Elem.ElementOrient

State

SHORT value - Contains the element’s orientation described by numbers:

0 – orientation unknown,

1 – orientation Top-Left,

2 – orientation Top-Right,

3 – orientation Bottom-Right,

4 – orientation Bottom-Left,

5 – orientation Left-Top,

6 – orientation Right-Top,

7 – orientation Right-Bottom,

8 – orientation Left-Bottom.

Elem

An object expression that evaluates to an Element object

GetViewportXmin, GetViewportYmin, GetViewportXmax and GetViewportYmax

Element viewport expressed in inches. The area defined in parent document coordinates, which is occupied by the window area of the child document. These four properties are read-only.

Syntax:

Xmin = Elem. GetViewportXmin
Ymin = Elem. GetViewportYmin
Xmax = Elem. GetViewportXmax
Ymax = Elem. GetViewportYmax

Xmin

DOUBLE value, containing the x-coordinate of the left border of element’s viewport

Ymin

DOUBLE value, containing the y-coordinate of the bottom border of element’s viewport

Xmax

DOUBLE value, containing the x-coordinate of the right border of element’s viewport

Ymax

DOUBLE value, containing the y-coordinate of the top border of element’s viewport

Elem

An object expression that evaluates to an Element object

GetWindowXmin, GetWindowYmin, GetWindowXmax and GetWindowYmax

The element’s window expressed in inches. The area defined in child document coordinates, which is visible in the parent document viewport. These four properties are read-only.

Syntax:

Xmin = Elem. GetWindowXmin
Ymin = Elem. GetWindowYmin
Xmax = Elem. GetWindowXmax
Ymax = Elem. GetWindowYmax

Xmin

DOUBLE value, containing the x-coordinate of the left border of element’s window

Ymin

DOUBLE value, containing the y-coordinate of the bottom border of element’s window

Xmax

DOUBLE value, containing the x-coordinate of the right border of element’s window

Ymax

DOUBLE value, containing the y-coordinate of the top border of element’s window

Elem

An object expression that evaluates to an Element object

HasDocument

Read-only value. Non-zero means the element has a child document associated with it, zero means element does not have any child documents associated with it yet.

Syntax:

Has = Elem. HasDocument

Has

SHORT value – nonzero, if element has a child document

Elem

An object expression that evaluates to an Element object

IsAdaptiveScalingEnabled

Contains element’s adaptive scaling mode.

Syntax:

Enab = Elem. IsAdaptiveScalingEnabled

Enab

IsAdaptiveScalingEnabled

Elem

An object expression that evaluates to an Element object

IsDocumentSimple

Read-only value. If the given element has a child document and this child document is simple, then this property is non-zero. Otherwise it is zero.

Syntax:

Simp = Elem. IsDocumentSimple

Simp

SHORT value – nonzero, if element has a simple child document

Elem

An object expression that evaluates to an Element object

IsEnabled

Non-zero means the element is enabled (visible), zero means the element is not enabled.

Syntax:

Enab = Elem. IsEnabled

Enab

SHORT value – nonzero, if element enabled

Elem

An object expression that evaluates to an Element object

IsSelected

Non-zero means the element is selected, zero means the element is not selected.

Syntax:

Sel = Elem. IsSelected

Sel

SHORT value – nonzero, if element selected

Elem

An object expression that evaluates to an Element object

TransparencyEnabled

Non-zero if transparency mode enabled, 0 otherwise.

Syntax:

Enab = Elem. TransparencyEnabled

Enab

SHORT value set to nonzero, if transparency mode is enabled

Elem

An object expression that evaluates to an Element object

TransparentColor

Contains the actual transparent color.

Syntax:

Color = Elem. TransparentColor

Color

LONG value indicating the active transparent color

Elem

An object expression that evaluates to an Element object

GetElementDoc

Returns the interface to the child document object. It can be a SimpleDoc or CompDoc object. By reading the IsSimple property of an object obtained with this method it is possible to find out its type.

Syntax:

Set Doc = Elem. GetElementDoc()

Doc

An OBJECT receiving the dispatch to the document

Elem

An object expression that evaluates to an Element object

MoveElement

Elements belonging to each CompDoc object are ordered. This order affects the sequence in which their child documents are painted. By changing this order it is possible to control the way in which drawings overlap one another.

Syntax:

Ret = Elem. MoveElement (MoveType)

MoveType

SHORT value – one of the following:

0 - move the given element to the top;

1 - move the given element one step up;

2 - move the given element one step down;

3 - move the given element to the bottom.

Ret

SHORT value: non-zero on success

Elem

An object expression that evaluates to an Element object

ResetViewport

Resets the viewport connected with the given composite document element.

Syntax:

Ret = Elem. ResetViewport (Mode)

Mode

SHORT value;

Ret

SHORT value: non-zero on success

Elem

An object expression that evaluates to an Element object

SetElementDoc

Creates a child document and attaches it to the given CompElem object. If the FileName parameter is a name of raster or vector drawing file, a SimpleDoc object is created as a child document. If the FileName parameter is a name of a composite document file, a CompDoc object is created as a child document. In the current version of CADRaster the ConnectionType and Mode parameters should be always set to zero.

Syntax:

Set Doc = Elem. SetElementDoc(ConnectionType, FileName, Mode)

ConnectionType

SHORT value, always 0

FileName

STRING value, containing the name of the document to be set

STRING value, containing the name of the document to be set

SHORT value, always 0

Doc

An OBJECT receiving the dispatch to the document

Elem

An object expression that evaluates to an Element object

SetElementViewport

Sets the viewport area of the given composite document element. The composite document element viewport is the area defined in the parent document’s coordinates, which is occupied by the window area of the element child document.

Syntax:

Ret = Elem. SetElementViewport (Xmin,Ymin,Xmax,Ymax)

Xmin

DOUBLE value, indicating the x-coordinate of the left border of element’s viewport

Ymin

DOUBLE value, indicating the y-coordinate of the bottom border of element’s viewport

Xmax

DOUBLE value, indicating the x-coordinate of the right border of element’s viewport

Ymax

DOUBLE value, indicating the y-coordinate of the top border of element’s viewport

Ret

SHORT value: non-zero on success

Elem

An object expression that evaluates to an Element object

SetElementWindow

Sets the window area of the given composite document element. The composite document element’s window is the area defined in the child document’s coordinates, which is visible in the parent document’s viewport.

Syntax:

Ret = Elem. SetElementWindow (Xmin,Ymin,Xmax,Ymax)

Xmin

DOUBLE value, indicating the x-coordinate of the left border of element’s window

Ymin

DOUBLE value, indicating the y-coordinate of the bottom border of element’s window

Xmax

DOUBLE value, indicating the x-coordinate of the right border of element’s window

Ymax

DOUBLE value, indicating the y-coordinate of the top border of element’s window

Ret

SHORT value: non-zero on success

Elem

An object expression that evaluates to an Element object

loading table of contents...