Application
object represents an instance of the CADRaster application.
- AdaptiveScaling
Enable adaptive scaling display mode.
Syntax:
Value = Application. AdaptiveScaling
Value
Boolean value
Application
An object expression that evaluates to a CADRaster application object.
- AskForEditingConfirmation
Ask for confirmation before executing editing command. Configuration option from RCFG/Edit dialog tab.
Syntax:
Value = Application. AskForEditingConfirmation
Value
Boolean value
Application
An object expression that evaluates to a CADRaster application object.
- AutoSelectSingleFile
On open auto select single file documents. Configuration option from RCFG/Open dialog tab.
Syntax:
Value = Application. AutoSelectSingleFile
Value
Boolean value
Application
An object expression that evaluates to a CADRaster application object.
- ConvertToOneFile
Convert To One File when converting multiple image file. Configuration option from RCFG/Save dialog tab.
Syntax:
Value = Application. ConvertToOneFile
Value
Boolean value
Application
An object expression that evaluates to a CADRaster application object.
- CopySubDocWhileSavingAsTCD
Copy SubDoc While SavingAs... TCD file to other directory. Configuration option from RCFG/Save dialog tab.
Syntax:
Value = Application. CopySubDocWhileSavingAsTCD
Value
Boolean value
Application
An object expression that evaluates to a CADRaster application object.
- DecimalPrecision
Number of digits displayed after decimal separator in CADRaster dialogs.
Syntax:
Value = Application. DecimalPrecision
Value
SHORT - value
Application
An object expression that evaluates to a CADRaster application object.
- DefaultRasterUnits
Default units for Raster document without units. Configuration option from RCFG/Edit dialog tab.
Syntax:
Value = Application. DefaultRasterUnits
Value
UNITS_TYPE - value
Application
An object expression that evaluates to a CADRaster application object.
- DefaultTCDUnits
Default units for new TCD document. Configuration option from RCFG/Edit dialog tab.
Syntax:
Value = Application. DefaultTCDUnits
Value
UNITS_TYPE - value
Application
An object expression that evaluates to a CADRaster application object.
- DefaultVectorUnits
Default units for Vector document without units. Configuration option from RCFG/Edit dialog tab.
Syntax:
Value = Application. DefaultVectorUnits
Value
UNITS_TYPE - value
Application
An object expression that evaluates to a CADRaster application object.
- DitherMode
Use dithered colors (active when display driver is working in 256 or less color mode). Configuration option from RCFG/View dialog tab.
Syntax:
Value = Application. DitherMode
Value
Boolean value
Application
An object expression that evaluates to a CADRaster application object.
- DrawSoftRasterImages
Enable draw soft raster images mode. Configuration option from RCFG/View dialog tab.
Syntax:
Value = Application. DrawSoftRasterImages
Value
Boolean value
Application
An object expression that evaluates to a CADRaster application object.
- FillColor
Color used to fill image file when clearing color images.
Syntax:
Value = Application. FillColor
Value
long - value
Application
An object expression that evaluates to a CADRaster application object.
- ForceImagePalette
Force Image Palette (active when display driver is working in 256 or less color mode). Configuration option from RCFG/View dialog tab
Syntax:
Value = Application. ForceImagePalette
Value
Boolean value
Application
An object expression that evaluates to a CADRaster application object.
- ImageTransparency
Enable image transparency. Configuration option from RCFG/View dialog tab.
Syntax:
Value = Application. ImageTransparency
Value
Boolean value
Application
An object expression that evaluates to a CADRaster application object.
- ImportAllAutoCADImages
Import All AutoCAD images to CADRaster without showing RImport dialog.
Syntax:
Value = Application. ImportAllAutoCADImages
Value
Boolean value
Application
An object expression that evaluates to a CADRaster application object.
- IniFileName
Returns the name of configuration file used by CADRaster.
Syntax:
Value = Application. IniFileName
Value
STRING – value indicating success or failure
Application
An object expression that evaluates to a CADRaster application object.
Ostrzeżenie
This is read only property.
- MaxUndoSteps
Maximal number of Undo/Redo operations. Configuration option from RCFG/Save dialog tab.
Syntax:
Value = Application. MaxUndoSteps
Value
SHORT - value
Application
An object expression that evaluates to a CADRaster application object.
- MergePrintoutColors
Merge Printout Colors. Configuration option from RCFG/View dialog tab.
Syntax:
Value = Application. MergePrintoutColors
Value
Boolean value
Application
An object expression that evaluates to a CADRaster application object.
- OpenForegroundDrawing
Open foreground vector drawing when specified in TCD file. Configuration option from RCFG/Open dialog tab.
Syntax:
Value = Application. OpenForegroundDrawing
Value
Boolean value
Application
An object expression that evaluates to a CADRaster application object.
- PrefferedBmpExt
Preffered extension for new BMP file. Configuration option from RCFG/Save dialog tab.
Syntax:
Value = Application. PrefferedBmpExt
Value
STRING - value
Application
An object expression that evaluates to a CADRaster application object.
- PrefferedCalsExt
Preffered extension for new CALS file. Configuration option from RCFG/Save dialog tab.
Syntax:
Value = Application. PrefferedCalsExt
Value
STRING - value
Application
An object expression that evaluates to a CADRaster application object.
- PrefferedTiffExt
Preffered extension for new Vidar file. Configuration option from RCFG/Save dialog tab.
Syntax:
Value = Application. PrefferedTiffExt
Value
STRING - value
Application
An object expression that evaluates to a CADRaster application object.
- PrefferedVidarExt
Preffered extension for new Vidar file. Configuration option from RCFG/Save dialog tab.
Syntax:
Value = Application. PrefferedVidarExt
Value
STRING - value
Application
An object expression that evaluates to a CADRaster application object.
- PrintingInBlackWhiteMode
Print color and monochromatic document always in Black and White colors. Configuration option from RCFG/View dialog tab.
Syntax:
Value = Application. PrintingInBlackWhiteMode
Value
Boolean value
Application
An object expression that evaluates to a CADRaster application object.
- RasterizerDevice
Name of device used during rasterization process. Configuration option from RCFG/Other tab. Option valid for CADRaster working with AutoCAD R.13 and R.14.
Syntax:
Value = Application. RasterizerDevice
Value
STRING – value
Application
An object expression that evaluates to a CADRaster application object.
- RasterizeStyleTable
Name of style table file name used during rasterization process. More info available in AutoCAD help file.
Syntax:
Value = Application. RasterizeStyleTable
Value
STRING – value
Application
An object expression that evaluates to a CADRaster application object.
- RasterizeWithLineweights
Use line weights during rasterization process. More info available in AutoCAD help file.
Syntax:
Value = Application. RasterizeWithLineweights
Value
Boolean – value
Application
An object expression that evaluates to a CADRaster application object.
- SaveAsAutoCADImage_Mode
Save raster reference as AutoCAD Image object. Configuration option from RCFG/Save dialog tab.
Syntax:
Value = Application. SaveAsAutoCADImage_Mode
Value
SAVE_ACAD_IMAGE_MODE - value:
When =
0
, Don't save CADRaster object as AutoCAD imagesWhen =
1
, Save all CADRaster images as AutoCAD imagesWhen =
2
, Save selected only CADRaster images as AutoCAD imagesApplication
An object expression that evaluates to a CADRaster application object.
- SaveImageWithPreview
Save as AutoCAD Image With Preview. Configuration option from RCFG/Save dialog tab.
Syntax:
Value = Application. SaveImageWithPreview
Value
Boolean – value
Application
An object expression that evaluates to a CADRaster application object.
- SaveUNCReference
Save in DWG file reference to CADRaster document encoded using UNC convention.
Syntax:
Value = Application. SaveUNCReference
Value
Boolean value
Application
An object expression that evaluates to a CADRaster application object.
- SendImageToBackOnOpen
Use 'Display Order / Send To Back' command on open new document. Configuration option from RCFG/Open dialog tab.
Syntax:
Value = Application. SendImageToBackOnOpen
Value
Boolean value
Application
An object expression that evaluates to a CADRaster application object.
- ShowRImportDialog
Show RImport dialog when a DWG file containing raster images is opened. Configuration option from RCFG/Open dialog tab.
Syntax:
Value = Application. ShowRImportDialog
Value
Boolean value
Application
An object expression that evaluates to a CADRaster application object.
- ShowTwainInterface
Show Twain interface during scanning process. Configuration option from RCFG/Other dialog tab.
Syntax:
Value = Application. ShowTwainInterface
Value
Boolean value
Application
An object expression that evaluates to a CADRaster application object.
- SingleImageMode
Enable Support for Single Image Mode. Configuration option from RCFG/Edit dialog tab.
Syntax:
Value = Application. SingleImageMode
Value
Boolean value
Application
An object expression that evaluates to a CADRaster application object.
- TemporaryDirectoryName
Directory for temporary files. When not specified then system default will be used. Configuration option from RCFG/Edit dialog tab.
Syntax:
Value = Application. TemporaryDirectoryName
Value
Boolean value
Application
An object expression that evaluates to a CADRaster application object.
- UseEnhMetaFile
Use EnhMetaFile file format during rasterization process.
Syntax:
Value = Application. UseEnhMetaFile
Value
Boolean value
Application
An object expression that evaluates to a CADRaster application object.
- Version
Returns the current version number of the CADRaster application.
Syntax:
Value = Application. Version
Value
STRING
Application
An object expression that evaluates to a CADRaster application object.
Ostrzeżenie
This is read only property.
- Visible
Hide / Show CADRaster document.
Syntax:
Value = Application. Visible
Value
Boolean – value indicating success or failure
Application
An object expression that evaluates to a CADRaster application object.
- ZoomToDefaultView
On open zoom to default document view. When default view not specified then perform zoom to whole document. Configuration option from RCFG/Open dialog tab.
Syntax:
Value = Application. ZoomToDefaultView
Value
Boolean value
Application
An object expression that evaluates to a CADRaster application object.
- CalibrateDocument
Runs the calibration process using given parameters. eModel = value indicating the calibration model. Function returns TRUE when calibration was successfully completed. Eventual error message is assigned to the ErrMsg parameter.
Syntax:
bError = Application. CalibrateDocument (VectorsFile, ModelID, ReportFile, ErrMsg)
VectorsFile
STRING value containing the path to a file with calibration vectors
ModelID
CALIBRATION_MODEL - value indicating the calibration model:
0 – Helmert model
1 – Affine model
2 – Bilinear model
3 – Biquadratic model
4 – Bicubic model
ReportFile
SHORT value – nonzero on error
bError
SHORT value – nonzero on error
ErrMsg
STRING – returns string with detailed information about error
Application
An object expression that evaluates to a CADRaster application object.
- ClearDrawOrderTable
Clear DrawOrder Table (Sortens table) to correct AutoCAD R14 bug
Syntax:
Application. ClearDrawOrderTable ()
Application
An object expression that evaluates to a CADRaster application object.
- ClearPolygons
Clears nPolys polygons. The polygons are ordered so that each polygon’s number of points is specified in the exact place in the PolySizesArr array. PointsX and PointsY arrays contain x and y coordinates of polygons’ points in the way that at the beginning of the arrays the 1st polygons’ points are defined, than the 2nd’s and so on.
Syntax:
bError = Application.ClearPolygons(nPolys, PolySizesArr ,PointsX, PointsY, ErrMessage)
NPolys
LONG value, indicating the number of polygons
PolySizesArr
ARRAY with the polygons’ sizes
PointsX
ARRAY with the values of the polygons’ points’ x-coordinates; polygons and their points in the appropriate order
PointsY
ARRAY with the values of the polygon’s points’ y-coordinates; polygons and their points in the appropriate order
ErrMessage
STRING – set by this method on error. Contains detailed info about error situation.
bError
Boolean value – nonzero on error
Application
An object expression that evaluates to a CADRaster application object.
- CloseDocument
Closes a document currently opened in CADRaster.
Syntax:
Application.CloseDocument ()
Application
An object expression that evaluates to a CADRaster application object.
- ConvertFile
Convert image file to other graphics format. This method has possibility to convert to one destination file or to split file with many images to one page only files. When SourceFile is an image file document with only one raster image then ToOneFile parameter is ignored. Otherwise when ToOneFile parameter is FALSE then this method creates in destination directory specified by Output parameter 'N' one page only image files. ‘N” is a number of images in source files.
Syntax:
bError = Application. ConvertFile (SourceFile, Output, FormatName, SubformatName, ToOneFile)
SourceFile
STRING containing the name of the source raster file
Output
STRING containing the name of the newly created raster file or directory name
FormatName
STRING specifying the format name of the created raster
FubformatName
STRING specifying the subformat name of the created raster
ToOneFile
BOOLEAN specifying if convert multipage image file to one file or to many
bError
SHORT value – nonzero on error
Application
An object expression that evaluates to a CADRaster application object.
Ostrzeżenie
In current version only TIFF and DCX file format support more than one image in one file.
Dim retVal ’ townmapX_4.tif file contains 4 raster pages in one file ’ convert townmapX_4.tif to x4.tif file retVal = Cadr.ConvertFile ("C:\TSL\DOC\townmapX_4.tif", "C:\New Folder\x4.tif", "TIFF", "CCITT Group 4", True) ’ convert townmapX_4.tif to four one page only image files in C:\New Folder subdirectory retVal = Cadr.ConvertFile ("C:\TSL\DOC\townmapX_4.tif", "C:\New Folder\", "TIFF", "CCITT Group 4", False)
- ConvertFiles
Convert many image files to other graphics format. This method also has possibility to put all source images in one destination file. If
ToOneFile
parameter is TRUE andSourceFiles
contains more than 1 image file then this method creates one multipage document file. Otherwise it convert image files specified bySourceFiles
parameter and place them in Output destination directory.Syntax:
bError = Application. ConvertFiles (SourceFiles, Output, FormatName, SubformatName, ToOneFile)
SourceFiles
Array of string with containing the names of the source raster files
Output
STRING containing the name of the newly created raster file or directory name
FormatName
STRING specifying the format name of the created raster
FubformatName
STRING specifying the subformat name of the created raster
ToOneFile
BOOLEAN specifying if convert source image files to one file or to many
bError
SHORT value – nonzero on error
Application
An object expression that evaluates to a CADRaster application object.
Ostrzeżenie
In current version only TIFF and DCX file format support more than one image in one file.
Dim retVal Dim FileArray(4) FileArray(0) = "C:\TSL\DOC\townmap1.tif" FileArray(1) = "C:\TSL\DOC\townmap2.tif" FileArray(2) = "C:\TSL\DOC\townmap3.tif" FileArray(3) = "C:\TSL\DOC\townmap4.tif" ’ convert images and store in separate files in C:\New Folder directory retVal = Cadr.ConvertFiles (FileArray, "C:\New Folder", "TIFF", "CCITT Group 4", False) ’ convert images and store in one file in townmapMP4.tif file retVal = Cadr.ConvertFiles (FileArray, "C:\New Folder\townmapMP4.tif", "TIFF", "CCITT Group 4", True)
- Create
Creates a raster from the world rectangle (MinX, MinY, MaxX and MaxY) and writes it to file. The new drawing will have given color type, resolution, scale and units. Units parameter can have values as in the list of unit codes for TAF files. So is with the parameters
FormatName
andSubformatName
(which specify the exact file type). TheColorType
parameter indicates the color-palette of the newly created raster.Syntax:
Application.Create FileName, FormatName, SubformatName, ColorType, MinX, MinY, MaxX, MaxY, Units, Scale, ResolutionX, ResolutionY
FileName
STRING containing the name of the newly created raster
FormatName
STRING specifying the format name of the created raster
FubformatName
STRING specifying the subformat name of the created raster
ColorType
SHORT parameter; it can be one of the following:
0 : TRUE-color,
2 : Mono,
16 : 16 colors,
256 : 256 colors,
-16 : 16 shades of grey,
-256 : 256 shades of grey.
MinX
DOUBLE value, indicating the x-coordinate position of the left border of the rectangle
MinY
DOUBLE value, indicating the y-coordinate position of the bottom border of the rectangle
MaxX
DOUBLE value, indicating the x-coordinate position of the right border of the rectangle
MaxY
DOUBLE value, indicating the y-coordinate position of the top border of the rectangle
Units
SHORT value, indicating the code of the units that are to be active in the new raster
Scale
DOUBLE value, containing the scale the specified rectangle is to be transformed with to the new raster
ResolutionX
DOUBLE value, containing the resolution of the new raster in the x-direction
ResolutionY
DOUBLE value, containing the resolution of the new raster in the y-direction
Application
An object expression that evaluates to a CADRaster application object.
- Export
Export to DWG document information about selected in CADRaster image files.
Syntax:
Application. Export(bCloseDoc)
bCloseDoc
BOOLEAN parameter indicating if close document in CADRaster after export operation
Application
An object expression that evaluates to a CADRaster application object.
- GetDocument
Returns the IDispatch interface of the actually opened TslCompDoc object.
Syntax:
Set Doc = Application. GetDocument ()
Doc
An object receiving the dispatch to the active document
Application
An object expression that evaluates to a CADRaster application object.
- GetToolbarPos
Gets the left upper corner of CADRaster's toolbar.
Syntax:
Application. Import(SourceFiles)
SourceFile
ARRAY containing image file names to import from AutoCAD DWG document to CADRaster TCD file
Application
An object expression that evaluates to a CADRaster application object.
- Insert
Inserts the view of AutoCAD drawing into the world rectangle (MinX, MinY, MaxX, MaxY) of the active document.
Syntax:
Application.Insert MinX, MinY, MaxX, MaxY
FileName
STRING containing the name of the inserted document
MinX
DOUBLE value, indicating the x-coordinate position of the left border of the rectangle
MinY
DOUBLE value, indicating the y-coordinate position of the bottom border of the rectangle
MaxX
DOUBLE value, indicating the x-coordinate position of the right border of the rectangle
MaxY
DOUBLE value, indicating the y-coordinate position of the top border of the rectangle
Application
An object expression that evaluates to a CADRaster application object.
- NewDocument
Opens a new, empty composite document in CADRaster. When successful, returns the IDispatch interface of the newly created TslCompDoc object.
Syntax:
Set Doc = Application. NewDocument()
Doc
An object receiving the dispatch to the newly created document
Application
An object expression that evaluates to a CADRaster application object.
Ostrzeżenie
In current version we support having only one document open.
- OpenDocument
Opens in CADRaster a document which name was given as a parameter to the call of this method, and returns the IDispatch interface of the TslCompDoc object created by CADRaster for this document. The name of the document should be a name of existing file in the TCD composite document format or in one of raster or vector formats, supported by CADRaster.
Syntax:
Set Doc = Application. OpenDocument(FileName)
FileName
A string containing the name of file with document to open
Doc
An object receiving the dispatch to the newly opened document
Application
An object expression that evaluates to a CADRaster application object.
Ostrzeżenie
In current version we support having only one document open.
- OpenDocumentWithNotification
Opens in CADRaster a document which name was given as a parameter to the call of this method, and returns the IDispatch interface of the TslCompDoc object created by CADRaster for this document. The name of the document should be a name of existing file in the TCD composite document format or in one of raster or vector formats, supported by CADRaster. Second parameter is the IDispatch interface of the NotificationObj object. This object is used to acknowledge external application when the document is closed. When CADRaster closes document opened with OpenDocumentWithNotification function, the Notification method of the NotificationObj object is set to 1.
Syntax:
Set Doc = Application. OpenDocumentWithNotification (FileName, NotificationObj)
FileName
A string containing the name of file with document to open
NotificationObj
An object containing the file notification
Doc
An object receiving the dispatch to the newly opened document
Application
An object expression that evaluates to a CADRaster application object.
- Redo
Redo last operations on CADRaster document.
Syntax:
fSuccess = Application. Redo ()
fSuccess
Boolean – value indicating success or failure
Application
An object expression that evaluates to a CADRaster application object.
- Regen
Forces the full resolution redraw without using the stored view.
Syntax:
Application. Regen
Application
An object expression that evaluates to a CADRaster application object.
- Rotate90
Rotates the current document in a way specified by Angle.
Syntax:
bError = Application.Rotatate90(Angle, ErrMessage)
Angle
LONG value, indicating the way of rotation:
– rotate left with 90,
2 – rotate left with 180,
3 – rotate right with 90,
4 – vertical mirror,
5 – vertical mirror + rotate right with 90 deg,
6 – horizontal mirror,
7 – horizontal mirror + rotate right with 90 deg.
ErrMessage
STRING – set by this method when error situation occured
bError
SHORT value – nonzero on error
Application
An object expression that evaluates to a CADRaster application object.
- SaveDocument
Saves the changes made to the current composite document in the same file from which the document has been loaded (opened). At the same time changes made to all subdocuments are also saved, i.e. written to their respective files.
Syntax:
Application. SaveDocument
Application
An object expression that evaluates to a CADRaster application object.
- SaveDocumentAs
Saves the document in a new file.
Syntax:
Application. SaveDocumentAs (FileName)
fileName
STRING – name of new document file
Application
An object expression that evaluates to a CADRaster application object.
- Scan
Creates a new document and performs scanning to it from the current source. When successful, returns the IDispatch interface of the newly created TslCompDoc object. If the PageNum parameter equals 1, a single page document is scanned, otherwise multi-page scanning is performed.
Syntax:
Set Doc = Application. Scan(PageNum)
PageNum
SHORT parameter indicating the number of pages to scan
Doc
An object receiving the dispatch to the newly created document
Application
An object expression that evaluates to a CADRaster application object.
- ScanEx
Creates a new document and performs scanning to it from the current source. When successful, returns the IDispatch interface of the newly created TslCompDoc object. If the PageNum parameter equals 1, a single page document is scanned, otherwise multi-page scanning is performed. New document will be saved to specified file name.
Syntax:
Set Doc = Application. ScanEx(PageNum, FileName, FormatName, SubformatName)
PageNum
SHORT parameter indicating the number of pages to scan
FileName
STRING containing the name of the newly created raster
FormatName
STRING specifying the format name of the created raster
SubformatName
STRING specifying the subformat name of the created raster
Doc
An object receiving the dispatch to the newly created document
Application
An object expression that evaluates to a CADRaster application object.
- ScanParams
Set default parameters for next scan.
Syntax:
Application. ScanParams ()
Application
An object expression that evaluates to a CADRaster application object.
- ScanSource
Select scaner to use for scan operations.
Syntax:
Application. ScanSource (SourceId)
SourceId
Short – value indicating scaner number
Application
An object expression that evaluates to a CADRaster application object.
- SetForegroundFile
Associate vector document with TCD file.
Syntax:
Application. SetForegroundFile (sDwgFileName)
sDwgFileName
STRING containing the name of the DWG file
Application
An object expression that evaluates to a CADRaster application object.
- SetToolbarPos
Sets the left upper corner of CADRaster's toolbar to the position given as parameters. Values of Xpos and Ypos parameters shouldn't exceed display resolution range.
Syntax:
Application. SetToolbarPos (XPos, YPos)
XPos
LONG parameter indicating toolbar horizontal position
YPos
LONG parameter indicating toolbar vertical position
Application
An object expression that evaluates to a CADRaster application object.
- Undo
Undo last operations on CADRaster document.
Syntax:
fSuccess = Application. Undo ()
fSuccess
Boolean – value indicating success or failure
Application
An object expression that evaluates to a CADRaster application object.
- Zoom
Displays the view of the whole current TCD document so it fills up possibly largest part of the AutoCAD's window.
Syntax:
Application. Zoom
Application
An object expression that evaluates to a CADRaster application object.