CompDoc object can be obtained from CompositeDoc property of TslCompDoc object.
- AdaptiveScalingMode
Contains document’s adaptive scaling mode.
Syntax:
Mode = CompDoc. AdaptiveScalingMode
Mode
SHORT value receiving document’s adaptive scaling mode
CompDoc
An object expression that evaluates to a CADRaster composite document object
- Dirty
Contains information if document has been modified since the last “save” operation.
Syntax:
bDirty = CompDoc.Dirty
bDirty
BOOLEAN value set to TRUE, if document has been modified since the last save-operation
CompDoc
An object expression that evaluates to a CADRaster composite document object
- DocName
The given composite document’s name.
Syntax:
Name = CompDoc.DocName
Name
STRING receiving document’s name
CompDoc
An object expression that evaluates to a CADRaster composite document object
- ElementCount
Read-only value. Number of elements in the given composite document.
Syntax:
Cnt = CompDoc.ElementCount
Cnt
SHORT value indicating the number of elements in the composite document
CompDoc
An object expression that evaluates to a CADRaster composite document object
- ExtXmin, ExtYmin, ExtXmax and ExtYmax
These four properties are read-only. Composite document’s extents expressed in inches.
Syntax:
Xmin = CompDoc. ExtXmin
Xmin = CompDoc. ExtXmin
Xmax = CompDoc. ExtXmax
Ymax = CompDoc. ExtYmax
Xmin
DOUBLE value receiving the x-coordinate of the left document’s border (in inches)
Ymin
DOUBLE value receiving the y-coordinate of the bottom document’s border (in inches)
Xmax
DOUBLE value receiving the x-coordinate of the right document’s border (in inches)
Ymax
DOUBLE value receiving the y-coordinate of the top document’s border (in inches)
CompDoc
An object expression that evaluates to a CADRaster composite document object
- IsOnStorage
Read-only value. If given composite document has been opened on file, then returns FALSE. If given composite document has been opened on storage (e.g. when parent document is embedded), then returns TRUE.
Syntax:
bStorage = CompDoc.IsOnStorage
bStorage
BOOLEAN value set to TRUE, if document is open on storage
CompDoc
An object expression that evaluates to a CADRaster composite document object
- IsSimple
Read-only, constant zero value.
Syntax:
bSimple = CompDoc.IsSimple
bSimple
BOOLEAN value set to TRUE, if document is simple (zero for composite documents)
CompDoc
An object expression that evaluates to a CADRaster composite document object
- MinSelExtXmin, MinSelExtYmin, MinSelExtXmax and MinSelExtYmax
These four properties are read-only. Minimal rectangle covering all selected documents extents expressed in inches.
Syntax:
Xmin = CompDoc. MinSelExtXmin
Ymin = CompDoc. MinSelExtYmin
Xmax = CompDoc. MinSelExtXmax
Ymax = CompDoc. MinSelExtYmax
MinSelXmin
DOUBLE value receiving the x-coordinate of the left selected document’s (in inches)
MinSelYmin
DOUBLE value receiving the y-coordinate of the bottom selected document’s (in inches)
MinSelXmax
DOUBLE value receiving the x-coordinate of the right selected document’s (in inches)
MinSelYmax
DOUBLE value receiving the y-coordinate of the top selected document’s (in inches)
CompDoc
An object expression that evaluates to a CADRaster composite document object
- SelectedElementCount
Read-only value. Number of selected elements in the composite document.
Syntax:
Cnt = CompDoc.SelectedElementCount
Cnt
SHORT value indicating the number of selected elements in the composite document
CompDoc
An object expression that evaluates to a CADRaster composite document object
- Units
Code number of composite document’s units. This property can have values as the list of unit codes for TAF files (see Appendix C for details).
Syntax:
iUnit = CompDoc.Units
iUnit
SHORT value indicating the code number of the document’s current units.
CompDoc
An object expression that evaluates to a CADRaster composite document object
- AddElement
Creates a new CompElem object and adds it to composite document structure. Returns the interface to the created object.
Syntax:
Set Elem = CompDoc. AddElement(ElementName)
ElementName
STRING containing new element’s name
Elem
An OBJECT of the new created element
CompDoc
An object expression that evaluates to a CADRaster composite document object
- CopyToDirs
Copies the given composite document to the specified file. Subdocuments are copied to specified directory. Returns 0 on success and non-zero otherwise.
Syntax:
bError = CompDoc. CopyToFile(FileName, SubDocsDirName, CopyMode)
FileName
STRING containing file name
SubDocsDirName
STRING containing directory name
CopyMode
CDSM_SaveMode containing CopyMode (and add 128 bit mask to use relative path):
0 - Do not copy simple documents,
1 - Copy simple documents, always prompt,
2 - Copy simple documents, prompt when conflict.
bError
SHORT nonzero value on error, 0 otherwise
CompDoc
An object expression that evaluates to a CADRaster composite document object
- CopyToFile
Copies the given composite document to the specified file. Only composite document is copied. Returns 0 on success and non-zero otherwise.
Syntax:
bError = CompDoc. CopyToFile(FileName)
FileName
STRING containing file name
bError
SHORT nonzero value on error, 0 otherwise
CompDoc
An object expression that evaluates to a CADRaster composite document object
- CRMAddFile
Adds the given drawing file to the continuos raster map - positions this file it in the same world coordinate system as the given composite document. CRMAddFile method is a convenient way of doing several operations, that otherwise would have to be done separately:
creates a new CompElem object;
creates a new SimpleDoc object based on the given drawing file;
sets the just created SimpleDoc object as the child document of the just created CompElem object;
sets the viewport and window of the CompElem object to the same window as the SimpleDoc extents;
returns the interface to the CompElem object created at the beginning.
Syntax:
Set Elem = CompDoc. CRMAddFile (FileName, ElementName, ConnectionType)
FileName
STRING containing the file’s name
ElementName
STRING containing the element’s name
ConnectionType
SHORT value, in the current CADRaster version should be always set to zero.
Elem
An OBJECT receiving the notification to the created Element object
CompDoc
An object expression that evaluates to a CADRaster composite document object
- CRMAddFileEx
Extended version of the CRMAddFile method. - Additionally open mode can be specified.
Syntax:
Set
Elem = CompDoc. CRMAddFileEx (FileName, ElementName, ConnectionType, iOpenMode)
FileName
STRING containing the file’s name
ElementName
ElementName STRING containing the element’s name
ConnectionType
SHORT value, in the current CADRaster version should be always set to zero.
iOpenMode
SHORT value, specifying the open mode.
Elem
An OBJECT receiving the notification to the created Element object
CompDoc
An object expression that evaluates to a CADRaster composite document object
- DeleteElement
Deletes the CompElem object from the given composite document. Returns 0 on success and non-zero otherwise.
Syntax:
bError = CompDoc. DeleteElement(ElementName)
ElementName
STRING containing element’s name
bError
SHORT nonzero value on error, 0 otherwise
CompDoc
An object expression that evaluates to a CADRaster composite document object
- DeleteSelectedElements
Deletes selected CompElem objects from the given composite document. Returns 0 on success and non-zero otherwise.
Syntax:
bError = CompDoc. DeleteSelectedElements()
bError
SHORT nonzero value on error, 0 otherwise
CompDoc
An object expression that evaluates to a CADRaster composite document object
- EnableSelectedElements
Enable (Enable non-zero) or disable (Enable = 0) all selected elements within a document. Returns 0 on success and non-zero otherwise
Syntax:
bError = CompDoc. EnableSelectedElements(Enable)
Enable
SHORT value, nonzero if elements are to be enabled
bError
SHORT nonzero value on error, 0 otherwise
CompDoc
An object expression that evaluates to a CADRaster composite document object
- FindElement
Finds element with the given name in the given composite document. Returns the interface to the CompElem object found.
Syntax:
Set Elem = CompDoc. FindElement(ElementName)
ElementName
ElementName
Elem
An OBJECT of the found element
CompDoc
An object expression that evaluates to a CADRaster composite document object
- GetDocAttribute
Returns custom attribute for the document. Currently defined attribute is: PageNumber - number of the current page in multi-page drawing.
Syntax:
Attr = CompDoc. GetDocAttribute (AttrName)
AttrName
STRING containing attribute’s name
Attr
STRING receiving the specified attribute’s value
CompDoc
An object expression that evaluates to a CADRaster composite document object
- ManageDialog
Launches the Composite Document dialog, which allows editing the given composite document interactively. Returns 0 on success and non-zero otherwise.
Syntax:
bError = CompDoc. ManageDialog (ParentWindowHandle)
ParentWindowHandle
LONG value, handle to the parent window
bError
SHORT nonzero value on error, 0 otherwise
CompDoc
An object expression that evaluates to a CADRaster composite document object
- MoveSelectedElements
Moves all selected elements within the document’s hierarchy. The higher an element in the hierarchy is, the more likely it will be displayed at the other elements of the drawing (so will be completely visible). Returns 0 on success and non-zero otherwise.
Syntax:
bError = CompDoc. MoveSelectedElements(MoveType)
MoveType
SHORT parameter, specifies the way elements are to be moved:
0 – to the top,
1 – one step up,
2 – one step down,
3 – to the bottom.
bError
SHORT nonzero value on error, 0 otherwise
CompDoc
An object expression that evaluates to a CADRaster composite document object
- SelectElements
Selects/unselects elements within the given composite document. Parameters Xmin, Ymin, Xmax, Ymax define a window of selection.
Syntax:
bError = CompDoc. SelectElements(Xmin,Ymin,Xmax,Ymax,Mode,Oper)
Xmin
DOUBLE x-coordinate of left border of the document’s world rectangle
Ymin
DOUBLE y-coordinate of bottom border of the document’s world rectangle
Xmax
DOUBLE x-coordinate of right border of the document’s world rectangle
Ymax
DOUBLE y-coordinate of top border of the document’s world rectangle
Mode
SHORT parameter with meaning:
0 – select all (the value of parameter Oper has no affect),
1 – select only elements which world rectangles are entirely inside the defined window,
2, 4 – select the elements which world rectangles have common areas with the defined window,
3 – do only one select operation, on the 1st found element,
5 – unselect all (the value of parameter Oper has no affect),
6 – unselect only elements which world rectangles are entirely inside the defined window,
7, 9 – unselect the elements which world rectangles have common areas with the defined window,
8 – do only one unselect operation, on the 1st found element.
Oper
SHORT parameter:
0 – select (if Mode <= 4), unselect (if Mode >= 5)
1 – change selection (unselect selected, select unselected),
2, 5 – no affect,
3 – do if element is visible: select (if Mode <= 4), unselect (if Mode >= 5)
4 – change selection if visible.
bError
SHORT nonzero value on error, 0 otherwise
CompDoc
An object expression that evaluates to a CADRaster composite document object
- SetDocAttribute
Sets custom attribute for the document. Returns 0 on success and non-zero otherwise.
Syntax:
bError = CompDoc. SetDocAttribute (AttrName,AttrValue)
AttrName
STRING containing attribute’s name
AttrValue
STRING containing the specified attribute’s value
bError
SHORT nonzero value on error, 0 otherwise
CompDoc
An object expression that evaluates to a CADRaster composite document object
- SetExtents
Sets composite document’s extents. Units parameter can have values as in the list of unit codes for TAF files (see Appendix C for details). Returns 0 on success and non-zero otherwise.
Syntax:
bError = CompDoc. SetExtents(Xmin,Ymin,Xmax,Ymax,Units)
Xmin
DOUBLE x-coordinate of left border of the document’s world rectangle
Ymin
DOUBLE y-coordinate of bottom border of the document’s world rectangle
Xmax
DOUBLE x-coordinate of right border of the document’s world rectangle
Ymax
DOUBLE y-coordinate of top border of the document’s world rectangle
Units
SHORT code number of units to be set in the document
bError
SHORT nonzero value on error, 0 otherwise
CompDoc
An object expression that evaluates to a CADRaster composite document object
- StartEnumeration
Creates a new CompEnum object and returns the interface to it. Using such object it is possible to enumerate elements of composite documents.
Syntax:
SetEnum = CompDoc. StartEnumeration (Options)
StartEnumeration (Options)
SHORT parameter – it is a logical combination (OR) of some of the following values (flags):
1 - using this flag prevents descending into lower levels of the composite document’s tree structure;
2 - using this flag forces enumeration of only visible documents;
4 - using this flag forces enumeration of simple documents only;
8 - using this flag forces enumeration of only selected documents;
Enum
An enumeration-OBJECT created
CompDoc
An object expression that evaluates to a CADRaster composite document object