<< Click to Display Table of Contents >> Navigation: Macros > Macro commands and parameters > Macro loop commands > Macro command Repeat ... Until |
Purpose:
Repeat a number of macro commands until a condition is met. Firstly, the macro commands are executed; secondly the condition is checked. Dependent on the condition the macro execution jumps back to the begin of the conditional macro commands.
The Repeat command is always used together with an Until command. The Repeat and Until lines enclose the part of the macro whose execution depends on fulfilment of the condition. General notation:
Repeat
Until ( value1 , collation character , value2 )
The collation character may be:
= (equals),
<> (does not equal),
< (less than),
<= (less than or equal to),
> (more than),
>= (more than or equal to).
Example:
The next macro commands are executed for a simultaneousness varying from 1 through 0.2:
Set( MySimultaneousness, 1 )
Repeat
SetSelection( Node( 'MV-network' ).Simultaneousness, MySimultaneousness )
Loadflow( 0, , true )
Subtract(MySimultaneousness, 0.1 )
Until(MySimultaneousness, <= , 0.1 )