OpenUtilities Substation Help

Output File Name Macros

Output File Name macros provide a convenient way to format the output file name based on information about the script entry. When the script entry is executed, the macro definitions are replaced with corresponding properties of the script entry. The following table shows the macros that are available. These macros may be keyed-in manually, or selected from a right-click menu in for the Output File name field.

Macro Expanded value
%d DGN file name
%m Model name
%v Named view, or view group name
%n View number
%r Render mode
%s Render setup name
%e Script entry number
%a Auto-increment number
%l Light setup name

A length modifier can be specified by inserting a number after the percent sign in the macro, with the following results:

  • If the macro evaluates to a string, the length modifier specifies the maximum length of the string inserted into the output file name. For example, %6d would be replaced by the first six characters from the DGN file name.
  • If the macro evaluates to a number, the length modifier specifies the minimum length of the resultant string. If the number of digits in the number is less than the length modifier, the string is padded with zeros. For example, %3e in the first script entry would be replaced by 001. Using numeric length modifiers allows the resulting file names to be sorted in numeric order.

Typical examples illustrating the use of output file name macros are shown in the following table. All examples below refer to the third entry of a script, using DGN file kitchen.dgn, view number 4, with a render mode of Luxology.

Output File String Output File Name
%d-%n.jpg kitchen-4.jpg
My %d [%r].jpg My kitchen [Luxology].jpg
%5d [%3r].jpg kitch [Lux].jpg
%d (%e).jpg kitchen (3).jpg
%d (%3e).jpg kitchen (003).jpg