Including Scripts
You can include one script within another using the following command:
#include "<scriptfilename>"
Where scriptfilename is the full path name to a file that contains script text, or is the name of a script in the project library or script library (listed in the project window under the Definitions/Scripts directory).
The command works for VBScript, JScript, and for the following:
- Scripts in the project library that are run by right-clicking the script icon in the project window and choosing Run Script
- Scripts in files that are external are run by choosing Tools> Run Script
- Scripts that are specified as callbacks in the Property dialog box
- Scripts that are run to draw parameterized footprints in layout
An include command can be placed anywhere in a script, but for readability it is recommended that commands be placed at the beginning of a file. The same script can be included multiple times without error, and circular inclusions will be ignored.