Macro command Loop ... End

<< Click to Display Table of Contents >>

Navigation:  Macros > Macro commands and parameters > Macro loop commands >

Macro command Loop ... End

Purpose:

Executes a part of the macro for a variable, stepping from a start value to an end value. The end value is also executed.

 

The Loop command is always used together with an End. Between Loop and End are the repeatedly executable commands. General notation:

Loop( variable, start, end, step )

End

 

Example:

Next macro presents the losses of a cable connection in a period of 30 years.

 Loop( year, 0, 30, 1 )

         Loadflow( year, , true )

         Text'Year: ', year, ' Losses: ', Cable('MyCable:FromNode-ToNode').Ploss, ' kW' ) 

 End