CabMasterPro User Guide
In This Topic
    An Example Script
    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]".

    Example Script

    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