SyntaxTo check a file out of an object, you must first have Checkout privileges. If you do, you can check out the files by using the Checkout Businessobject command. Otherwise, 3DSpace prevents you from checking out the file.
For example, assume you have written procedures for assembling and disassembling a telephone. After checking them in, you allow users to edit the procedures to correct errors or ambiguities. To do this, they might write a command similar to:
After this command is processed, a copy of the named file will appear in the directory specified. If the directory is not specified, the files are copied to the current system directory. If you have checked out an earlier version of a file to edit, be careful not to overwrite the external file with the new checked out file. If the same file name already exists in the target directory, no error message appears in MQL. The new file will overwrite the existing file without further warning. When you check out a file, the checkout operation triggers multi-site file sync, if needed, and writes to the history file. The read/write operation has to complete before you can use a file. Lock Clause In the Checkout command, it is
assumed that the file being checked out is unlocked to allow other users to edit the
file’s contents. To prevent other users from checking files in, lock it by including
the keyword For example, the following command locks and checks out a file:
Using the lock to prevent editing is useful when you are making extensive changes to an external file. While those changes are being made, you do not want to worry about any other users modifying the original file without your knowledge. When you have completed your changes, you can check the file in and remove the lock at the same time. A locked object can be unlocked by a user with unlock access. For example, a manager might need to unlock an object locked by an employee who is out sick. If locking is enforced in the object’s policy the object MUST be locked within the checkout command if the updated file is to be checked back in. Server and Client Clauses The
By default, the
while the following would look for it on the server:
The client clause can be specified to force the default location. For example:
yields the same results as:
Format ClauseIn addition to checking out all files of the default format from the object, you can check out only specific formats of the file. Files can be checked in using multiple formats. For example, a text file can be checked in using two formats that represent two different versions of a word processing program. You can check out only the file associated with the specific format by using the Format clause. The Format clause of the Checkout Businessobject command specifies the format of the files to check out. If no format is specified, the default format is assumed. For example, the following command checks out all files associated with the 1998 word processing program.
Opening FilesFiles that have been checked in to a business object using the Checkin command can be opened for either viewing or editing. To open files and launch the appropriate application for viewing, use the following command:
To open files and launch the appropriate application for editing, use the following command:
For more information, see Modify Business Object. |