*INSERT

<< Click to Display Table of Contents >>

Navigation:  Reference > Pre-processor >

*INSERT

The *INSERT command tells the Pre-processor to stop reading the current file and start reading another. At the end of the inserted file the Pre-processor returns to the original file and continues processing from the point immediately following the *INSERT command.

The same file can be inserted more than once.

The form of the command is:

[*INSERT filename]

The filename may contain any characters that are legal for a file name under the current operating system. Full path names are allowed. When looking for the file, the Pre-processor will automatically add the suffix STP to the file name if this is not included.

If the file specified is not found then CL will use the environment name QPSINS as an alternative directory for the file. For example, SET QPSINS = C:\INSERTS.

There is a maximum of 250 on the number of files that may be inserted in a CL script. There is no limit on the number of times each file is inserted.

*INSERT commands may be nested; that is, an inserted file may contain other *INSERT commands. The nesting may not, however, be recursive in any way.

*INSERT should never be the last command in a file; there should always be at least one line after the insert.

*INSERT commands may appear in loops.

Examples of valid *INSERT commands:

[*insert main.stp]

[*insert \files\p123.stp]

[*insert file[Loop]]

[*insert [1.Next]]

[*insert [Product.Loop][&Part].stp]

[*insert ..\common\formats]