CwImportProject

Syntax:

call CwImportProject sProjectFile

        sProjectFile    (String) Path to a .GDO file.  Must be an explicit path
                        or the name of a file in the current directory
                        ("\tspectra\work" by default.)

Description:

This procedure loads a new project, erase the current project. It does not prompt for confirmation so care must be taken to make sure nothing irreplaceable is lost. If the specified project file is not found, an error is raised.

Example:

/* 1.  Import the project 'car.gdo' from the current directory. */
projfile='car.gdo'
call CwImportProject projfile
say 'Loaded new project' projfile
exit


/* 2. Procedure to load a project, returning a boolean to indicate success. */

loadFile:procedure
parse arg projectFile

signal on syntax name cantload
call CwImportProject projectFile
signal off syntax
return 1

cantload:
signal off syntax
return 0

Remarks:

This routine can fail due to external circumstances (for example, the path being invalid). Under such circumstances, the normal behaviour of a script is to raise a syntax error. If your script needs to be robust, you must trap the syntax error using SIGNAL as is done in example #2.

Functions by NAME

Index

Functions by PURPOSE