A SimpleDoc object represents a simple, one-drawing document in the composite document’s structure. The interface of an existing SimpleDoc object can be obtained from the GetElementDoc method of a CompElem object. A SimpleDoc object can be created using the SetElementDoc method of a CompElem object or using the CRMAddFile method of a CompDoc object.
- CurrentPage
The current page in the drawing file.
Syntax:
Page = SimpDoc. CurrentPage
Page
SHORT value, indicating the current page in the drawing file
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- Description
Contains information about the document.
Syntax:
Descr = SimpDoc. Description
Descr
STRING value, receiving the document’s description
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- Dirty
Contains information if document has been modified since the last “save” operation.
Syntax:
Ret = SimpDoc. Dirty
Ret
SHORT value: non-zero if document has been modified
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- DocName
The name of the simple document.
Syntax:
Name = SimpDoc. DocName
Name
STRING value, indicating the document’s name
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- DrawingFileName
Read-only value. The name of the file, on which the simple document drawing has been open.
Syntax:
Name = SimpDoc. DrawingFileName
Name
STRING value, indicating the file name
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- ExtXmin, ExtYmin, ExtXmax and ExtYmax
The simple document’s extents expressed in inches. These four properties are read-only.
Syntax:
Xmin = SimpDoc. ExtXmin
Ymin = SimpDoc. ExtYmin
Xmax = SimpDoc. ExtXmax
Ymax = SimpDoc. ExtYmax
Xmin
DOUBLE value, indicating the x-coordinate of the left border of the document’s world rectangle
Ymin
DOUBLE value, indicating the y-coordinate of the bottom border of the document’s world rectangle
Xmax
DOUBLE value, indicating the x-coordinate of the right border of the document’s world rectangle
Ymax
DOUBLE value, indicating the y-coordinate of the top border of the document’s world rectangle
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- IsOnStorage
Read-only value. If the given simple document drawing has been opened on file, then returns 0. If the given simple document has been opened on storage, then returns non-zero.
Syntax:
Ret = SimpDoc. IsOnStorage
Ret
SHORT value: non-zero if document has been opened on storage
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- IsSimple
Read-only value. Determines whether the document is simple.
Syntax:
Ret = SimpDoc. IsSimple
Ret
SHORT value: non-zero if document is simple (always non-zero)
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- LibID
Read-only value: 1 for raster drawings, 2 for vector drawings.
Syntax:
id = SimpDoc. LibID
id
SHORT value, receiving the identifier of the library the document is associated with
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- NumOfColors
Read-only value. The number of colors in the drawing file. Equal to 2 to the power of number of bits per pixel (for raster files) or 256 (for vector files).
Syntax:
Num = SimpDoc. NumOfColors
Num
LONG value, indicating the number colors
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- Orient
The code number of the simple document orientation. This property can have values as in the of orientation codes for TAF files (see Appendix C for details).
Syntax:
Code = SimpDoc. Orient
Code
SHORT value, indicating the code number of document’s orientation
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- RasterHeight
Read-only value defined only for raster drawings. The number of raster lines in the drawing file.
Syntax:
Num = SimpDoc. RasterHeight
Num
LONG value, indicating the number of pixels
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- RasterWidth
Read-only value defined only for raster drawings. The number of pixels per one raster line of the drawing file.
Syntax:
Num = SimpDoc. RasterWidth
Num
LONG value, indicating the number of pixels
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- ResolutionX and ResolutionY
Resolution of the raster file in directions X and Y.
Syntax:
ResX = SimpDoc. ResolutionX
ResY = SimpDoc. ResolutionY
ResX
DOUBLE value, indicating the document’s resolution in the x-direction
ResY
DOUBLE value, indicating the document’s resolution in the y-direction
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- Scale
The scale of the raster file.
Syntax:
scale = SimpDoc. Scale
scale
DOUBLE value, indicating the document’s scale
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- ScaleXY
The scale of the raster file. Identical to Scale method but should be used because of bug in Microsoft Visual Basic.
Syntax:
scale = SimpDoc. ScaleXY
scale
DOUBLE value, indicating the document’s scale
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- TotalPages
Read-only value. The total number of pages in the drawing file.
Syntax:
Num = SimpDoc. TotalPages
Num
SHORT value, indicating the number of pages in the drawing file
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- Units
The code number of the simple document units. This property can have values as in the list of unit codes for TAF files (see Appendix C for details).
Syntax:
Code = SimpDoc. Units
Code
SHORT value, indicating the code number of document’s units
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- Xins, Yins
Read-only values. The coordinates of the lower left drawing’s corner (the insertion point).
Syntax:
iX = SimpDoc. Xins
iY = SimpDoc. Yins
iX
DOUBLE value, indicating the x-coordinate of the document’s insertion point
iY
DOUBLE value, indicating the y-coordinate of the document’s insertion point
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- CopyToFile
Copies the given simple document to the specified file. Returns 0 on success and non-zero otherwise.
Syntax:
Ret = SimpDoc. CopyToFile (FileName)
FileName
STRING value, containing the name of the file
Ret
SHORT value, set to 0 on success
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- GetDocAttribute
Returns custom attribute for the document.
Syntax:
Attr = SimpDoc. GetDocAttribute (AttrName)
AttrName
STRING value, containing attribute’s name
Attr
STRING value, receiving the attribute’s value
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- GetLayerCount
Returns number of layer's in vector file.
Syntax:
Ret = SimpDoc. GetLayerCount ()
Ret
SHORT value, number of layer's in vector file
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- GetLayerParams
Returns parameters of required layer.
Syntax:
Attr = SimpDoc. GetLayerParams (LayerNum, name, flags, color, linetype)
LayerNum
Short value, containing index of required layer
Name
STRING *value, receiving the layer name
Flags
SHORT value, receiving the color attribute of required layer
Color
SHORT value, receiving the color of required layer
Linetype
SHORT value, receiving the linetype of required layer
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- SetDocAttribute
Sets custom attribute for the document. Returns 0 on success and non-zero otherwise.
Syntax:
Ret = SimpDoc. SetDocAttribute (AttrName, AttrValue)
AttrName
STRING value, containing attribute’s name
AttrValue
STRING value, containing the attribute’s value
Ret
SHORT value, set to 0 on success
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- SetInsPnt
Sets the insertion point (the lower left corner) of the raster drawing. Returns 0 on success or non-zero otherwise.
Syntax:
Ret = SimpDoc. SetInsPnt (Xins, Yins)
Xins
DOUBLE value, indicating the x-coordinate of the document’s insertion point
Yins
DOUBLE value, indicating the y-coordinate of the document’s insertion point
Ret
SHORT value, set to 0 on success
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- SetLayerParams
Set parameters of required layer.
Syntax:
Attr = SimpDoc. SetLayerParams (LayerNum, name, flags, color, linetype)
LayerNum
Short value, containing index of required layer
Name
STRING value, new layer name
Flags
SHORT value, new layer flags attribute
Color
SHORT value, new layer color
Linetype
SHORT value, new linetype of layer
SimpDoc
An object expression that evaluates to a CADRaster simple document object
- SetResolution
Sets the resolution of the raster drawing. Returns 0 on success or non-zero otherwise.
Syntax:
Ret = SimpDoc. (ResolutionX, ResolutionY)
ResolutionX
DOUBLE value, indicating the document’s resolution in the x-direction
ResolutionX
DOUBLE value, indicating the document’s resolution in the y-direction
Ret
SHORT value, set to 0 on success
SimpDoc
An object expression that evaluates to a CADRaster simple document object