Modify graphs in the editor

A script is executed from the command line in Ge by setting a '@' before the filename, for
example

ge> @my_script

The command line is opened from Functions/Command (Ctrl+B).

Example
This example shows how to change a subgraph in several graphs. A subgraph is normally intern,
and a modification does not take effect until you have performed the procedure to

- set the subgraph extern
- save the graph
- read the graph, now with the modified subgraph
- set the subgraph intern again
- save the graph

If you often modify you subgraphs you can with advantage write a script that replaces a subgraph
in all graphs of the project.

!
! Replace a subgraph
!
function int process(string graph)
   int sts;
   printf( "Processing graph %s\n", graph);
   open 'graph'
   sts = SetExtern("my_subgraph");
   if ( sts)
     printf( "Changing my_subgraph\n");
     save
     open 'graph'
     SetIntern( "my_subgraph");
     save
   endif
endfunction

main()
   process( "nu4_alla_platar");
   process( "nu4_status_trp");
   process( "nu4_trp_hy1");
   process( "nu4_trp_rb_ut");
   process( "nu4_buffhog");
   process( "nu4_status_ugn");
   process( "nu4_trp_lu1");
   process( "nu4_trp_start");
   process( "nu4_inlagg");
   process( "nu4_trend");
   process( "nu4_trp_rb1");
   process( "nu4_ugn_start");
endmain