Macro command RestoreNetwork

<< Click to Display Table of Contents >>

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

Macro command RestoreNetwork

Purpose:

To retrieve a temporarily stored network from the computer’s memory so that it may be put to further use in the context of the same macro.

 

Only the network itself is retrieved. If the results of calculations performed on the network are required, the calculations will have to be performed again once the network has been retrieved.

 

General notation:

RestoreNetwork( StoredNetworkIndex )

 

The current macro network is stored in the memory at a location indicated by the index StoredNetworkIndex. This has to be an integer value between 0 and 9.

 

If this command is used in a loop (e.g a For … End loop), in the course of which the index is automatically increased each time, the programmer needs to be confident that the counter will not rise above 9.

 

Examples:

Recollect the network data that were stored at memory index 3:

 RestoreNetwork( 3 )

 

Recollect the network data after a previous set of commands, where the network was stored 5 times:

 Set( Index, 1 )

 Repeat

         RestoreNetwork( Index )

         Loadflow( 0, , true )

         Write( 1, 1, Index, Transformer( 'MyTransformer' ).Load )

         Add( Index, 1 )

 Until( Index, >= , 5 )

 

See also:

SaveNetwork

StoreNetwork

 

Back to network commands.