Print multiple layouts in an experiment at one time

The function below allows you to print all layouts in an experiment, or optionally all layouts in a list you provide as a parameter to the function.

// Prints multiple layouts.  By default this function will print
// all layouts in the experiment, however it is possible to also
// specify a list of layouts to be printed.
// @param layoutList
//  [OPTIONAL] A semi-colon separated list of layout window names
//  that should be printed.  Any names that are not layouts will
//  be ignored.
// NOTE:  The Sleep/S 5 line forces Igor to wait 5 seconds between
// printing subsequent layouts.  I don't know if this is necessary, but
// my concern was that the printer driver might need a few seconds to process
// one print request before another was sent.
Function PrintMultipleLayouts([layoutList])
    String layoutList
    if (ParamIsDefault(layoutList))
        layoutList = WinList("*", ";", "WIN:4")

    Variable n, numLayouts
    numLayouts = ItemsInList(layoutList, ";")
    String currentLayoutName
    For (n=0; n<numLayouts; n+=1)
        currentLayoutName = StringFromList(n, layoutList, ";")
        // Make sure this is actually a layout.
        if (WinType(currentLayoutName) != 3)
        PrintLayout $(currentLayoutName)
        Sleep/S 5       // Might not be necessary

To print all layouts, just copy the function above into a procedure window in your experiment and execute the following at the command line:

To print a list of specific layouts, copy the function into your experiment and execute the following at the command line:
PrintMultipleLayouts(layoutList = "Layout0;Layout1;Layout2;")

See the forum post at for more information.




Igor Pro 9

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More