%separator keyword (SDL script)
The %separator keyword is an optional keyword that can be used in a For loop. The %separator keyword specifies characters to delimit the text returned by each iteration of the For loop.
If you do not want a separator generated to the code with each iteration of the For loop, do not include this keyword.
For more information about For loops, see
For loop (SDL script).
Syntax
For a collection of items:
%for "<link type>" [%separator "<separator characters>"]
<set of statements>
[%exit]
%endfor
For a list:
%for %getlist "<list name>" [%separator "<separator characters>"]
<set of statements>
[%exit]
%endfor
The <link type> is the automation interface name of the link type that links the current item to other items. For more information about the automation interface names of link types, see Object Attributes and associations under the Automation Interface chapter of the PTC Modeler Help, and then click the required item type. The link types are listed in the Associations section.
This example works in the context of an Operation and uses the 'Parameter' automation interface association to process the Operation's Parameters. For each Parameter, it loads the Parameter.sdl template. The text that is returned by the Parameter.sdl template for each Parameter is delimited by the specified comma and space.
%for "Parameter" %separator ", "
%load "Parameter.sdl"
%endfor