i have a problem with a command. i don´t know if it´s due to the update to mavericks or just a code problem. the issue is that, when i use the move wave command the wave does move from one folder to another and it´s renamed with the destination folder name. check the example.
function mueve_conchetumare()setdatafolder root:
DFREF saveDFR=getdatafolderDFR()make/O moviendo
newdatafolder/O/S destino
movewave root:moviendo, destino
setdatafolder saveDFR
end
According to the documentation, MoveWave expects a source wave reference, a destination path, and optionally, a destination wave name.
You are giving it a source wave reference and a destination wave name because your second parameter, destino, is a name, not a path.
I would have expected Igor to flag this as an error but instead it is treating the missing path as : (current data folder) and destino as the optional wave name.
Here is how I would do it. Note that I removed the /S flag from NewDataFolder and that the second parameter is a path (starts with :):
Function Test()SetDataFolder root:
Make/O moviendo
NewDataFolder/O destino
MoveWave root:moviendo, :destino:
End
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
October 23, 2013 at 04:55 pm - Permalink
You are giving it a source wave reference and a destination wave name because your second parameter, destino, is a name, not a path.
I would have expected Igor to flag this as an error but instead it is treating the missing path as : (current data folder) and destino as the optional wave name.
Here is how I would do it. Note that I removed the /S flag from NewDataFolder and that the second parameter is a path (starts with :):
October 23, 2013 at 05:58 pm - Permalink
Another question, can I use a DFref or a string as a reference to destination folder in a procedure?
Greetings
October 23, 2013 at 09:56 pm - Permalink
You can use either but I recommend a DFREF.
October 24, 2013 at 08:14 am - Permalink
October 24, 2013 at 01:59 pm - Permalink