11-27-2012 06:20 AM
Hello,
I need some help to make work this process with a TDMS file:
1) I choose a TDMS file with the function FileNameGet.
2) Use the DataFileLoad function, loading this TDMS file into my Data Portal
3) After some process, I save my data in another folder with another name as a TDMS File (DataFileSave)
4) Now, I want to remove the previous file from the initial folder, I tried to functions FileMove and DataFileDelete, all of them give me the following error
It's clear to me that DIAdem is holding some link with the initial file and it's blocking the operation of moving or delete it. I thought when I saved my Data Portal as another file, this would be realeased, but did not happen...
What variable should I clean to make this task with sucess.
Thanks
11-27-2012 08:40 AM
Hello,
I think you're using the loading option "Load bulk data on modification of channel data" (see NAVIGATOR Settings). By this, DIAdem opens these files exclusively as registered channels and the commands like FileMove or FileDelete will throw an error. Please have a look to the DIAdem help page "Loading Bulk Data - General".
Only when saving the portal data to the same file, the bulk data will be automatically reloaded.
Here are some options which probably will solve the problem:
1. Please change the loading option to "Always load bulk data" when using FileMove or FileDelete
Or
2. Before using FileMove or FileDelete, please clear the data portal.
Or
3. Instead of using FileMove or FileDelete please use DataFileMove or DataFileDelete
Greetings
11-27-2012 10:33 AM
Thanks, You lead me right to the problem... besides the mention on the DataFileMove help about Loading Bulk Data, I didn't think it was related... my bad...
It's working, as I pass this script to other users... instead of asking to all of them make changes in the NAVIGATOR Settings. I insert the command
BulkDataLoadingMode = 24210
This will set loading option "Always load bulk data" only during the execution of the script, won't it?
Best Regards
11-28-2012 03:05 AM
Hello,
yes you can use the commands BulkDataLoadingMode = 24210 or better BulkDataLoadingMode = eBulkDataLoadingImmediately to change the loading option. But this will set the loading option for the whole DIAdem session, not only for the execution of the script. Therefore you should set the option back to the original value like eBulkDataLoadingOnWriteAccess at the end of your script.
But in most cases the loading performance of big TDMS files will be better when using the loading option "Load bulk data on modification of channel data".
Perhaps also try the commands DataFileMove or DataFileDelete. These commands will also work in combination with the loading option "Load bulk data on modification of channel data" without throwing an error. The benefit is, that you need not change the loading option. If it won't work, please add the diadem version number to your answer.
Best Regards