Is there a way to make different graphs the top graph in a function so that subsequent commands can act on this new top graph?
I have tried DoWindow /F
both as is and using Execute.
Neither seem to work. Perhaps there is something that I don't understand about DoWindow?
I have tried DoWindow /F ...
You need to supply the name of the graph that you want to bring forward. In many cases, you can also direct commands to work on a given graph without bringing it forward. See the help for each specific command that you are trying to apply. Those commands typically have a /W=winname flag that directs the command.
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
Right after you call DoWindow/F you can check the variable V_flag. If you got the window name wrong, it will be 0. If it found a window with that name, it will be 1:
if (V_flag == 0)
print "Bad window name"
Possibly you are passing the name of a string variable without using $:
String graphName = "Graph0"
DoWindow /F graphName // Wrong - There is no graph named graphName
DoWindow/F $graphName // Right - Activates Graph0
For details execute:
DisplayHelpTopic "String Substitution Using $" // Talks about waves but applies to any name including window names
Back to top