Exporting many macro graphs in tiff automatically

Hi

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!
This function does it mostly:
Function ExportGraphs()

    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
johnweeks wrote:
This function does it mostly:
Function ExportGraphs()

    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



Thank you very much. I added a "New Path" named Thesis and it works flawlessly.

Function ExportGraphs()
      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