Objects of the ExtFileName type can be used independently of other CADRaster implemented objects. They can be used to collect in one object the following information about a document: file name, format name and compression mode name.

FileName

Document file name.

Syntax:

Name = File.FileName

Name

STRING value receiving the name of the file associated with the current file object

File

An object expression that evaluates to a CADRaster file object

FormatName

Document file format name.

Syntax:

Format = File.FormatName

Format

STRING value receiving the format name of the file associated with the current file object

File

An object expression that evaluates to a CADRaster file object

SubformatName

Document file compression mode name.

Syntax:

Name = File.SubformatName

Name

Name STRING value receiving the subformat name of the file associated with the current file object

File

An object expression that evaluates to a CADRaster file object

DetectFormat

Sets the FormatName and SubformatName properties based on the FileName property value. When format detection is successful returns 0, otherwise returns -1.

Syntax:

Ret = File.DetectFormat ()

Ret

SHORT value, set to 0 on success, -1 otherwise

File

An object expression that evaluates to a CADRaster file object

IsRasterFile

Returns TRUE, if the FileName property is the name of a raster drawing file with an extension supported by CADRaster, otherwise returns FALSE.

Syntax:

Raster = File.IsRasterFile()

Raster

BOOLEAN value set to TRUE if the file associated with the current file object is a raster file

File

An object expression that evaluates to a CADRaster file object

IsVectorFile

Returns TRUE, if the FileName property is the name of a vector drawing file with an extension supported by CADRaster, otherwise returns FALSE.

Syntax:

Vector = File.IsVectorFile()

Vector

BOOLEAN value set to TRUE if the file associated with the current file object is a vector file

File

An object expression that evaluates to a CADRaster file object

OpenFileDialog

Launches the File - Open dialog box, which allows to select existing files in one of the file formats supported by CADRaster. If a file is selected, its parameters are saved to the specific ExtFileName object properties and the OpenFileDialog method returns 0. If the file has not been selected, the method returns -1.

Syntax:

Ret = File.OpenFileDialog (Caption)

Ret

SHORT value, receiving the selection state in the dialog

Caption

STRING value, that is to be put as the title of the dialog

File

An object expression that evaluates to a CADRaster file object

SaveFileDialog

Launches the Save As dialog box, which allows to select a destination file for the document. If a file is selected, its parameters are saved to the specific ExtFileName object properties and the SaveFileDialog method returns 0. If no file has been selected, the method returns -1. The property values can be retrieved or the entire ExtFileName object can be passed to the SaveAs method of the Document object as a parameter. Parameters nColors and nPages specify the number of colors and pages in the destination drawing.

Syntax:

Ret = File.SaveFileDialog (Caption, nColors, nPages)

Caption

STRING value, that is to be put as the title of the dialog

nColors

SHORT value, containing the number of colors in the destination drawing

nPages

SHORT value, containing the number of pages in the destination drawing

Ret

SHORT value, receiving the selection state in the dialog

File

An object expression that evaluates to a CADRaster file object

loading table of contents...