In This Topic
This example combines several different types of action to show what a typical script structure looks like. It starts off with an OR block that says we only want to deal with export lines called "GapToLeft" or "dim[#]". The value on the second filter is actually "dim[[]#[]]", where the hash means "any digit" and is surrounded by square brackets (each bracket needs an extra set around it, see Like under
Comparison Operators). This will match values such as "dim[1]", "dim[2]" and "dim[3]".
The next action then takes any lines which have made it this far and sets their formula to be empty. Finally, it enters another OR block, this time with three branches. If the Value field is more than 150 (millimetres assumed) then it is set to "150mm". In other words, this branch caps all Values at 150mm. Or, if the Name of the line is "dim[3]" then set its Value to "0mm". Otherwise, if it has a Value more than 100 but less than 150 then set it to "90mm". The reason why this last one has to be less than 150mm is because anything over 150mm would have been picked up by the first branch.
Any of the export lines which made it all the way through the script, via any combination of the OR block branches, are then written to an output file. This file can then be merged back into the original library with CabMasterPro.
This script probably has limited usefulness in real situations, but it shows how the actions are set up and positioned to eventually give us the results.
Other Notes
- Export Editor allows you to save and load scripts from disk, to ".EES" (Export Editor Script) files.
- The editor can be keyboard driven for speed of use: Tab changes fields, and Enter adds new actions. When you select an action in the script, the up and down arrows change between actions, and the Delete key removes an action. Hold the Shift key while using the arrows to move an action up or down the script.
- You can load multiple export files one after another to be processed by the one script.
- If you click "Create Merge File" without having an export file loaded you will be prompted for one.
- The "Begin" and "End" actions on OR blocks are optional - if you omit them, there is assumed to be a "Begin" at the top of the script, and an "End" at the bottom. However, it is usually better to include them for readability. They are still required for OR blocks in the middle of the script.