<< Click to Display Table of Contents >> Navigation: Components and parameters > Other > Text |
Text can be used to place extra information anywhere in the network. A text field may contain text or the result from a macro. A combination of text and macro language is not allowed.
PARAMETERS
Text
Parameter |
Default |
Unit |
Description |
Text |
|
|
Text |
MACRO
Input data and calculated results can be shown on the network diagram. Also arithmetic operations on results can be shown. In order to do this, a macro language has been defined. For a more extensive description of the macro, see: Macros.
Only operations on variables are allowed in text field macros. It is not possible to alter input data from the text field. The macro commands which are available in a text field are:
•operation commands
oset
oadd
•conditional command
•loop commands
•reporting command
otext
Using the Text command a user defined text between single quotes or a variable can be printed.
If a macro is defined before a calculation is carried out, a message is printed on screen:
'Attribute value not available at execution of line .......'
Therefore it is recommended to insert an if-statement to check whether loadflow results are available.
Example:
if(network.result,=,'LF')
set(mytext,'The voltage on node Station 4 is:')
add(mytext,Node('Station 4').Upu)
add(mytext,' pu and ')
add(mytext,Node('Station 4').U)
add(mytext,' kV')
text(mytext)
set(mytext,'And the load on that node is:')
add(mytext,Transformerload(':Station 4').PL)
add(mytext,' MW as input and ')
add(mytext,Transformerload(':Station 4').P)
add(mytext,' MW calculated.')
text(mytext)
set(myp,0)
set(mytext,'Total load in selection MV-network is:')
forselection(load('MV-network'),myload)
add(myp,myload.p)
end
add(mytext,myp)
add(mytext,' MW')
text(mytext)
end
Yields:
The voltage on node Station 4 is: 1.042 pu and 156.3 kV
And the load on that node is: 0.255 MW as input 0.277 MW calculated.
Total load in selection MV-network is: 10.308 MW
Text colour of text boxes in Result mode
If the text in the diagram is a macro generated text, its colour can be set using the command: TextResultColor(i), where i is an integer value between 0 and 14, representing the colours: black, grey, light grey, navy, blue, aqua, purple, fuchsia, green, lime, teal, maroon, red, yellow and white.