LoadData

Hello,

I frequently use LoadData in functions for transferring data between Igor experiments. In most cases I specify a folder from which waves are to be loaded into the current experiment using the /S parameter. Usually that works fine, but there may be cases in which the experiment to be read does not contain the specified folder. Then the function terminates with an error message.

Is there a possibility to test the existence of the datafolder in the "remote" pxp file prior to using LoadData?
Basically I am looking for a Datafolderexists() command for testing not the current the pxp file but the one from which I want to read data. The second possibilty I could think of was somthing like LoadData/Z which tells data not to complain in case of an error.

Any help on this would be greatly appreciated


I think calling GetRTError(1) should clear the error:
LoadData . . .
Variable err = GetRTError(1)
if (err != 0)
    Print "Error"
    return -1
endif
. . .

Dear hrdostein,

thanks for the reply. Using GetRTError() solved the problem and I realised that part of my problem arised from having "debug on error" enabled.

however, a datafolderexists() command for the remote experiment would have been much more to my taste. Maybe there's a possibility to have that in upcoming versions of IGOR.

kangaroo
Quote:
however, a datafolderexists() command for the remote experiment would have been much more to my taste. Maybe there's a possibility to have that in upcoming versions of IGOR.


I'll keep it in mind.
I also would appreciate a LoadData /Z flag (report no error) or the DataFolderExistsInFile function
HJ