<< Click to Display Table of Contents >> Navigation: Macros > Macro commands and parameters > Macro network commands > Macro command StoreNetwork |
Purpose:
To temporarily store the network in the computer’s memory so that it may be retrieved for further use in the context of the same macro.
Only the network itself is stored. 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.
A temporarily saved network cannot be retrieved after a macro has finished running.
General notation:
StoreNetwork( StoredNetworkIndex )
The current macro network is copied in the memory to 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.q. 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:
Store the network data at memory index 3:
StoreNetwork( 3 )
Store the network data during an N-1 contingency analysis:
Set( Index, 0 )
ForSelection( Branch( 'MV-network' ), failingbranch )
Set( failingbranch.FirstSwitch, open )
Loadflow( 0, , true )
If( Index, < , 10 )
StoreNetwork( Index )
Add( Index, 1 )
End
Set( failingbranch.FirstSwitch, closed )
End
See also:
Back to network commands.