Measure=Loop Creates a looping counter between two values.
The measure will be the value of
StartValue for one update, will increment based on the value of
Increment on each subsequent update, and will be the value of
EndValue for one update. If
LoopCount is other than
1, the loop will then repeat.
On each loop, if the value of
Increment is such that the final increment would cause the value to overrun the value of
EndValue, the final increment will be reduced to the remainder required to have the loop end at
The measure will have a range that is the difference between
EndValue for use by meters requiring a percentage. There cannot be a negative percentage, so the range will always be lowest value to highest value.
Any dynamic change to any of the four measure options, or dynamically changing InvertMeasure on the measure, will cause the loop to be reset and start over with the new values.
Note: All options must be positive or negative whole numbers, or formulas that resolve to whole numbers. Fractional values will be truncated.
- General measure options
All general measure options except
MaxValueare automatically set based on
EndValue, and may not be manually set or changed.
The starting value for the loop. This may be any positive or negative whole number.
The ending value for the loop. This may be any positive or negative whole number.
A positive or negative whole number by which the counter will be incremented on each update.
The number of times the loop will be executed. The default of
0will endlessly repeat. When LoopCount is reached, the measure will stop at and maintain the value of the
Commands that can be sent to a Loop measure using the !CommandMeasure bang.
This will cause the measure to reset the loop and restart using the current values for all options.
[!CommandMeasure MeasureName "Reset"]
Note: Any dynamic change to any of the four measure options, or dynamically changing InvertMeasure on the measure, will automatically perform a reset of the loop. This command would not be required.
If InvertMeasure is set to
1, the opposite of the value generated by the loop will be returned. This can have the effect of reversing the direction of the loop. Toggling
InvertMeasure with !SetOption can create a "ping-pong" effect with the measure.