problems with movewave
purozongo
function mueve_conchetumare()
setdatafolder root:
DFREF saveDFR=getdatafolderDFR()
make/O moviendo
newdatafolder/O/S destino
movewave root:moviendo, destino
setdatafolder saveDFR
end
setdatafolder root:
DFREF saveDFR=getdatafolderDFR()
make/O moviendo
newdatafolder/O/S destino
movewave root:moviendo, destino
setdatafolder saveDFR
end
the wave "moviendo" it´s renamed to "destino"
setdatafolder root:
DFREF saveDFR=getdatafolderDFR()
make/O moviendo
newdatafolder/O/S destino
// movewave root:moviendo, destino
movewave root:moviendo, :
setdatafolder saveDFR
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 :):
SetDataFolder root:
Make/O moviendo
NewDataFolder/O destino
MoveWave root:moviendo, :destino:
End
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