Custom bulk arithmetic macro has SetVariable error after recent update
While recently working up some data, I tried to use a function that someone in my group wrote a while ago and after a recent Igor Pro update, it has stopped working to its fullest extent. This function does what its name implies; it allows you to do arithmetic on a large number of waves all at once. One key feature that has stopped working allows you to use a specific wave for the arithmetic. This is useful for baseline subtracting multiple waves at once from a single wave. However, now when the function is executed, this error pops up
"While executing SetVariable, the following error occurred: format string is invalid"
After staring at the script for this function and checking the update log for Igor Pro, I can't find the bug or why this has only started to occur now. Any thoughts or help on this issue would be greatly appreciated.
String/G blankWaveName=""
String/G ywavesStr = WaveList("*y",";","")
String/G selWaveStrList=""
Variable/G ynum
Variable/G numVal =0
ynum= ItemsInList(ywavesStr,";")
Make/O/T/N=(ynum) ywaves = StringFromList(p,ywavesStr,";")
//Make another wave of all 0 with same dimensions for use with ListBox
Make/O/B/N=(ynum) lb1selWave=0
//Create a new panel to contain GUI components
NewPanel /K=1/W=(300,100,900,500) as "Bulk Arithmetic Window"
DoWindow/C FractionalSubtraction
TitleBox ywavesTitle,title="Y Waves:",pos={30,25},frame=0,fsize=14
ListBox lb1,pos={30,50},size={200,300},listWave=ywaves,selWave=lb1selWave,mode= 4
CheckBox showAllY,pos={30,360},title="Show all waves in data folder for Y",fsize=10,proc=showAllYProc
SetVariable blankWaveField,bodyWidth=200,fsize=10,format="%S",limits={-inf,inf,0},value=blankWaveName,pos={500,50},title="Wave Name:"
SetVariable numValField,bodyWidth=80,fsize=10,format="%G",limits={-inf,inf,0},value=numVal,pos={380,80},title="Number Value:"
Button doSubButton, pos={365,140},proc=doArithmetic,size={120,20}, title="Do Subtraction(s)"
Button doAddButton, pos={365,170},proc=doArithmetic,size={120,20}, title="Do Addition(s)"
Button doMultButton, pos={365,200},proc=doArithmetic,size={120,20}, title="Do Multiplication(s)"
Button doDivButton, pos={365,230},proc=doArithmetic,size={120,20}, title="Do Division(s)"
End
Forum
Support
Gallery
Igor Pro 9
Learn More
Igor XOP Toolkit
Learn More
Igor NIDAQ Tools MX
Learn More
%S is not a documented to be accepted.
Previous versions of Igor ignored invalid format characters (you want %s, the lower-case s), but later versions are stricter to help catch mistakes like this.
June 5, 2019 at 05:58 pm - Permalink