How saving multi-graphs

Hello,
during my work with IgorPro, I work with a lot of data and so with a lot of graphs.
Every time I have to save graphs, with "SAVEPICT as __", according to you there is a command, or create a function, that allows me to save all open graphs simultaneously without making one at a time, manually?
I have not tested this function.

If you are not familiar with Igor symbolic paths, execute:
DisplayHelpTopic "Symbolic Paths"


Function SaveGraphList(pathName, list)
    String pathName         // Name of Igor symbolic path
    String list             // List of graph names
   
    // You may need to tweak these parameters
    Variable exportType = -5        // See /E for SavePICT
    String extension = ".png"
    Variable resolution = 576   // 8 x screen resolution
   
    Variable numGraphs = ItemsInList(list)
    Variable i
    for(i=0; i<numGraphs; i+=1)
        String name = StringFromList(i, list)
        String fileName = name + extension
        SavePICT/O/P=$pathName/E=(exportType)/B=(resolution)/WIN=$name as fileName
    endfor
End

...and you could use WinList("*", ";", "WIN:1") to create a list with all graphs.
Quote:
and you could use WinList("*", ";", "WIN:1") to create a list with all graphs


Yes. I meant to include this:

Function SaveAllGraphs(pathName)
    String pathName         // Name of Igor symbolic path

    String list = WinList("*", ";", "WIN:1")
    SaveGraphList(pathName, list)
End

thanks.

I write that procedure and I create a folder in C:\A, than I load 3 graph: Graph0, Graph1, Graph2 (wave0, wave1, wave2).
But when i run
SaveAllGraphs("C:\A")

This error appear: While executing SavePICT, the following error occurred: no symbolic path of that name

You need to learn about Igor symbolic paths. Execute:
DisplayHelpTopic "Symbolic Paths"

hrodstein wrote:
You need to learn about Igor symbolic paths. Execute:
DisplayHelpTopic "Symbolic Paths"


I just read the HelpTopic, and:

Function SaveAllGraphs(pathName)
    String pathName     // Name of Igor symbolic path
 
    String list = WinList("*", ";", "WIN:1")
    SaveGraphList(pathName, list)
End

Function SaveGraphList(pathName, list)
    String pathName         // Name of Igor symbolic path
    String list             // List of graph names
 
    // You may need to tweak these parameters
    Variable exportType = -8        // See /E for SavePICT
    String extension = ".pdf"
    Variable resolution = 576   // 8 x screen resolution
 
    Variable numGraphs = ItemsInList(list)
    Variable i
    for(i=0; i<numGraphs; i+=1)
        String name = StringFromList(i, list)
        String fileName = name + extension
        SavePICT/O/P=$pathName/E=(exportType)/B=(resolution)/WIN=$name as fileName
    endfor
End
<pre><code class="language-igor">

when I write in the command line SaveAllGraphs("C:\A:"), appear the error!!!
Carlo][quote=hrodstein wrote:
You need to learn about Igor symbolic paths. Execute:
DisplayHelpTopic "Symbolic Paths"


I just read the HelpTopic, and: when I write in the command line SaveAllGraphs("C:\A:"), appear the error!!!

Function SaveAllGraphs(pathName)
    String pathName     // Name of Igor symbolic path
 
    String list = WinList("*", ";", "WIN:1")
    SaveGraphList(pathName, list)
End

Function SaveGraphList(pathName, list)
    String pathName         // Name of Igor symbolic path
    String list             // List of graph names
 
    // You may need to tweak these parameters
    Variable exportType = -8        // See /E for SavePICT
    String extension = ".pdf"
    Variable resolution = 576   // 8 x screen resolution
 
    Variable numGraphs = ItemsInList(list)
    Variable i
    for(i=0; i<numGraphs; i+=1)
        String name = StringFromList(i, list)
        String fileName = name + extension
        SavePICT/O/P=$pathName/E=(exportType)/B=(resolution)/WIN=$name as fileName
    endfor
End
<pre><code class="language-igor">

[/quote]
"C:\A:" is not a symbolic path. The error message is correct.
It is neither a valid windows folder nor a macintosh path.
For how to get from folders to symbolic paths, please read the help file carefully.
HJ
HJDrescher wrote:
"C:\A:" is not a symbolic path. The error message is correct.
It is neither a valid windows folder nor a macintosh path.
For how to get from folders to symbolic paths, please read the help file carefully.
HJ

OK....so, I load my two wave( a general file txt), than display waves ad graph.
Than load that procedure:
saveAllgraphs("C\Users:\Carlo\Save")
hrodstein wrote:
"C\Users:\Carlo\Save" is not the name of an Igor symbolic path.


So I don't understand!
I now create a NewPath with this command
Ok Now it work!
I don't Understand why before not worked!

If i've load 3 graphs, it juts save 3 files with the same graph, not with 3 different files
Maybe you want to have a closer look at the description of the SavePict command (Help file).
HJ
Quote:
the procedure save only one graph 3 time


That's because of a mistake I made in the SaveGraphList function.

You need to add /WIN=$name to the SavePICT command.

I will fix the original post.
hrodstein wrote:
Quote:
the procedure save only one graph 3 time


That's because of a mistake I made in the SaveGraphList function.

You need to add /WIN=$name to the SavePICT command.

I will fix the original post.


Good! Now it work perfectly ! thanks