Exporting many macro graphs in tiff automatically
viralvector
I have generated many graph macros in default procedure window. I would like to export these graphs in emf or tiff.
The comment line "SavePICT/E=-7" can do the job but I have to open individual graph macro manually. It is tedious to open individually since I have over 100 macro graphs.
How do I make this comment line to scan the library from my graph macros in "Procedure" window or other procedure windows with other name.
Please advise and thank you!
String graphs = MacroList("*", ";", "KIND:4,SUBTYPE:Graph")
Variable numwindows = ItemsInList(graphs)
Variable i
for (i = 0; i < numwindows; i += 1)
Execute StringFromList(i, graphs)+"()"
String gname = WinName(0,1)
SavePICT/E=-7 /WIN=$gname
KillWindow $gname
endfor
end
By "mostly" I mean that the call to SavePICT lacks the "as" keyword and a filename, so it puts up a dialog for every saved file. You need to add code to add a path plus constructed filename so that won't happen.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
June 26, 2014 at 11:29 am - Permalink
Thank you very much. I added a "New Path" named Thesis and it works flawlessly.
String graphs = MacroList("*", ";", "KIND:4,SUBTYPE:Graph")
Variable numwindows = ItemsInList(graphs)
Variable i
for (i = 0; i < numwindows; i += 1)
Execute StringFromList(i, graphs)+"()"
String gname = WinName(0,1)
SavePICT/E=-7 /O /P=Thesis
KillWindow $gname
endfor
end
June 26, 2014 at 02:07 pm - Permalink