Loadwave filename problem
noxidxela
-Thanks.
P.S. The names were originally changed because the filename was too long for some functions (e.g. loadwave), if there is a way around this, that would also be useful.
<br />
static function loadCELIVwave()<br />
DFREF anlyzFolder=GetAnalyzeFolder() <br />
SVAR fileName = anlyzFolder:fileName<br />
SVAR filepath = anlyzFolder:filepath<br />
<br />
getFileFolderInfo/Q<br />
filepath = S_path<br />
filename = ParseFilePath(3, filePath,":",0,0)<br />
loadwave /A=$filename/H/T/O filepath<br />
wave analyzeWave<br />
duplicate /O $filename, analyzeWave // gives "expected wave name" error because the loaded wave is listed with it's original name instead of $filename <br />
fromFilename(filename)<br />
fromWave(analyzeWave)<br />
end<br />
static function loadCELIVwave()<br />
DFREF anlyzFolder=GetAnalyzeFolder() <br />
SVAR fileName = anlyzFolder:fileName<br />
SVAR filepath = anlyzFolder:filepath<br />
<br />
getFileFolderInfo/Q<br />
filepath = S_path<br />
filename = ParseFilePath(3, filePath,":",0,0)<br />
loadwave /A=$filename/H/T/O filepath<br />
wave analyzeWave<br />
duplicate /O $filename, analyzeWave // gives "expected wave name" error because the loaded wave is listed with it's original name instead of $filename <br />
fromFilename(filename)<br />
fromWave(analyzeWave)<br />
end<br />
To learn about the Igor Text file format execute:
As of Igor Pro 6 file names can be up to 255 characters long but wave names are still limited to 31 characters. In an Igor Text file the file name has no bearing on the wave names which are specified in the file.
April 25, 2013 at 07:48 pm - Permalink