Save Method

Saves the Document to disk. When called off the Documents Collection, this method saves all open documents in the iFIX WorkSpace. This is equivalent to selecting SaveAll from the File menu. When used with the Document object, this method saves the Document object with the optionally specified file name.

NOTE: The Save method is not available in WorkSpace run mode.

DocumentsCollection Object Syntax

object.Save [Prompt]

Properties

The Save method syntax has these parts:

Part

Description

object

An object expression that evaluates to an object in the Applies To list.

Prompt

Boolean. (Optional) If True, prompt the user to save changes. If False, do not prompt the user. (default)

Remarks

Note that if the Save method for the Documents Collection is called for newly created pictures, the user is prompted to save changes regardless of the value specified in bPrompt. This is because pictures cannot be saved as their default name (e.g. “Untitled#”).

Document Object Syntax

object.Save [Filename], [PromptToSave]

Properties

The Save method syntax has these parts:

Part

Description

object

An object expression that evaluates to an object in the Applies To list.

FileName

String. (Optional) The file name.

PromptToSave

Boolean. (Optional) If True, prompt the user before saving. (default)

Remarks

If the Save method for the Document object is called for newly created pictures, the user is prompted to save changes regardless of the value specified in PromptToSave. This is because pictures cannot be saved as their default name (e.g. “Untitled#”). The user must also specify the appropriate extension for the document type in the filename. The following table contains the extensions and their document types.

Extension

Document Type

.fxg

Fix Picture

.fds

Fix Dynamo Set

.evs

Fix Schedule

.doc

Microsoft Word Document

.xls

Microsoft Excel Worksheet

.xls

Microsoft Excel Chart

If the Save method for the Document object is called for an existing file, the file is overwritten. You may want to check for file existence before calling the Save method.

Note that if the Save method is called using the Save [Filename] syntax, a Save As operation is performed.

 

Example

Applies To