Skip to content

TagLoop

lukas edited this page May 19, 2017 · 1 revision

Table of Contents

tag loop

attribute role description
var required variable that will be changed in the different loop iterations
start optional start value of the loop, interpreted as an integer
stop optional end value of the loop, interpreted as an integer
list optional comma-separated list of values to be assigned to var during the loop iterations

description

A loop is created that iterates over a number of values for var. The loop values can be either passed by giving numeric start and stop values and / or a list of specific values that don't need to be numeric.

examples

The following example illustrates the setup of a loop, here for automated device placement. In this example the loop variable i indicates the index of the device and therefore loops over all (number of ndevc) devices. In the loop body this variable is used to compute the position (here z-coordinate) of the current device.

<var ndevc="20" dz="zmax / ndevcs" />
<loop var="i" start="0" stop="ndevc"> 
  <var z="zmin + dz*i" />
  [...]
</loop>

Note: the device definition is not included here, this is just a loop example.

Clone this wiki locally