CT SAVE DOCUMENT

4D - Documentation   Français   English   German   4D Chart, Command Theme List   4D Chart, Command Alphabetical List   Back   Previous   Next

version 1


CT SAVE DOCUMENT (area; document; type{; scope})

ParameterTypeDescription
areaLongint4D Chart area
documentTextName of document, with path
typeStringType of document
scopeLongintScope of the command
0 = All objects
1 = Selected objects

Description

The CT SAVE DOCUMENT command saves the contents of area in document.

If document is an empty string, CT SAVE DOCUMENT displays the standard save-file dialog box, enabling the user to specify the document name, type, and scope. If document is not an empty string, CT SAVE DOCUMENT saves document with the type type.

If document does not exist, CT SAVE DOCUMENT creates it. If document exists, CT SAVE DOCUMENT overwrites it.

If type is an empty string, a standard 4D Chart document is created. To save the document as a PICT, type should be "PICT".

The optional scope parameter controls what is saved in document. Use scope only when document is not an empty string and when saving a document as a PICT.

By default, document is saved in the directory that contains the database structure. If you want to save a document outside of this directory, specify a complete pathname. See the 4th Dimension Language Reference manual for a brief description of pathnames.

Example

This example saves a 4D Chart document in a document with the same name as the company, followed by the year.

            `Request the year number
   $Year := Request ("For what year?")
            `If the request is validated
   If (OK=1)
            `Concatenate the document name
         $SaveName := [Company]Name+" " + $Year
             `Save the document   
      CT SAVE DOCUMENT (Area;$SaveName;"") 
   End if

See Also

CT OPEN DOCUMENT.


4D - Documentation   Français   English   German   4D Chart, Command Theme List   4D Chart, Command Alphabetical List   Back   Previous   Next