Is there a way to export multi graphs in one time?

Have more than 30 graphs in the macro, wondering if there is a way to export them batchly.
Peter
I think SavePICT in a loop should do the job. For details, please consult the manual.
HJ
Alternatively, you could try to print to a "pdf printer" the graphs graph0, graph1, graph0:

Printsettings getPrinterList
print s_value
  Printer XPS;Printer PDF;Printer PCL;Printer OneNote;Printer 666;

PrintSettings/W=graph0 setPrinter="Printer PDF"
PrintSettings/W=graph1 setPrinter="Printer PDF"
PrintGraphs/t Graph0, Graph1, graph0


best,
_sk
I wrote a pair of functions just recently, intended to save all graphs in an experiment. It tries to save to a folder called "graphs" that you can create by hand in advance or after the routine starts. To run it, execute SaveAllGraphs().

//Saves all graphs in experiment as PDF files in the
//same folder as the experiment or in subfolder called "graphs"
Function SaveAllGraphs()

    variable NGraphs, i
    string graphList, alertStr, currWindow
   
    GraphList = WinList("*", ";", "WIN:1")
    graphList = RemoveFromList("SnglMove", graphList)
    NGraphs = itemsInList(GraphList)

    string homePathStr, graphPathStr
    pathInfo home
    homePathStr = S_path
    graphPathStr = homePathStr + "graphs"
    newPath /O graphs, graphPathStr
    print "will save graphs for all runs in " + graphPathStr

    for (i = 0; i < NGraphs; i += 1)
        currWindow = stringFromList(i, graphList)
        doWindow /F $currWindow
        saveGraph()

    endFor

End //SaveAllGraphs

//Save top window graph using its window's name
//Top window must be a graph. Graph you want to save must be top window
//Graph is saved as pdf file in folder called "graphs" in the home path (folder
//of the current igor experiment), which you can create in advance or in response to the dialog
//box that appears if "graphs" does not exist.
//Filename is created from igor experiment name and graph window's title
Function saveGraph()

    string windowTitleStr, titleFirstWord
   
    //Obtain window's title's first word, to be used as part of the filename
    //e.g., if autonamed graph1:y vs x, then extract "graph1"
    getWindow kwTopWin, wtitle
    //(I am getting title because I don't know how to get the window's name)
    windowTitleStr = S_Value
    titleFirstWord = stringFromList(0, windowTitleStr, ":")

    string exptName, fName
    exptName = igorInfo(1)
    fName = titleFirstWord + "_" + exptName
    print "windowTitleStr", windowTitleStr
    print "titleFirstWord", titleFirstWord
    print "fName", fName

    string alertStr
    alertStr = "Will try to save graph with title " + windowTitleStr
    alertStr += " as a pdf file in same folder as present Igor"
    alertStr += " experiment, \nusing name " + fName
    doWindow /H /F
    print alertStr

    SavePICT /Z/O/P=graphs/E=-2/W=(0,0,0,0) as fName

    if (V_flag == 0)
        alertStr = "Graph saved successfully."
    else
        alertStr = "***An error occurred. Graph not saved"
    endIf
    print alertStr

End //saveGraph()
peterming wrote:
Have more than 30 graphs in the macro, wondering if there is a way to export them batchly.
Peter


Late question, but how do you want to export them... to an image file, printed, to the clipboard for pasting into document?