Print multiple layouts in an experiment at one time
aclight
//**
// 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")
endif
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)
continue
endif
PrintLayout $(currentLayoutName)
Sleep/S 5 // Might not be necessary
EndFor
End
// 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")
endif
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)
continue
endif
PrintLayout $(currentLayoutName)
Sleep/S 5 // Might not be necessary
EndFor
End
To print all layouts, just copy the function above into a procedure window in your experiment and execute the following at the command line:
PrintMultipleLayouts()
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 http://www.igorexchange.com/node/512#comment-136 for more information.
Forum
Support
Gallery
Igor Pro 9
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More