Using Macro Variables
Macro variables are used in the Macro dialog, and are replaced with actual values when the macro is executed. They are coded in ${variable name} format in the argument part of the CLUI syntax. This is shown in the following example, which saves the currently-open design as "Sample3.pdes", in the same directory:
saveAs filepath:"${dsgnDirPath}\\Sample3.pdes"
Macro variables
The following macro variables can be used.
Variable | Description |
---|---|
binDirPath |
|
env: Environment variable name |
|
infoFilePath |
|
warningFilePath |
|
errorFilePath |
|
dsgnPath (not available in eCADSTAR Schematic Editor) |
|
dsgnDirPath (not available in eCADSTAR Schematic Editor) |
|
cursorPointX
(not available in eCADSTAR Schematic Editor) |
|
cursorPointY
(not available in eCADSTAR Schematic Editor) |
|
numberOfCondLayers
(not available in eCADSTAR Schematic Editor) |
|
Note
- All macro variables are replaced before running the macro. Condition changes that occur when the macros is running are not reflected. For example, even if the file is closed using the Close command in the macro, the macro variable dsgnPath is not affected. In this case, dsgnPath is replaced with the path to the design data file that was edited just before the macro was executed.
- The value after replacement may include space characters. If it is used in combination with the system command, it must be placed between double quotation marks (") to be correctly interpreted by the command processor (in the above example, double quotation marks are not shown).
- For the contents of information files, warning files and error files, the character codes must be text data for the system locale, to enable the Message Log to display the details of these files.