From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
09-08-2017 12:26 AM
I'm also getting the "Cannot create storage target" error when using DataFileSave to overwrite a TDM file on a NAS. I verified that I have privileges to delete the file from the computer in question. Anyone else figure out a solution to this?
09-12-2017 05:50 PM
I was not able to work around the "Cannot create storage target error" within a reasonable amount of time, even after confirming that I am able to save the file manually from DIAdem. I also confirmed I was able to create/delete new files in the directory. I ended up scripting an unsatisfying workaround that opens a TDM file, changes a property for each group, saves the TDM file to a Temp directory, deletes the source file, then copies the temp file back to the source directory. This is the equivalent of opening a file, changing it as desired, and saving it...
09-13-2017 02:12 AM
Hello,
Unfortunately I can't reproduce the described behaviour on my computer.
Which DIAdem version do work with?
Please try this setting.
- Open the DIAdem Settings dialog, select NAVIGATOR, page "Loading Behavior"
- Change to "Always load bulk data" (Currently "Load bulk data on modification of channel data" might be set").
Please let me know if it helped.
Regards
09-13-2017 08:34 AM
Hi Thomas,
I changed the loading behavior as you suggested, but still no luck. The code I'm using is as follows:
Call DataFileLoad(sLine, "TDM", "Register")
IF GlobUsedChn > 0 THEN
Call RefreshPortal()
Msg = HdrMsg & "Saving TDM file..."
Call MsgBoxDisp(Msg, "MB_NOBUTTON", "MsgTypeNote", 0, 0, 1)
Call ChangePropVal(sPropChngName, sNewPropVal)
Call DataFileSave(sLine, "TDM")
The data is loaded and the desired property changed correctly, but cannot save back to the same file from the script. This is DIAdem 2017.
Chris
09-13-2017 10:42 AM
Hello Chris,
When loading a file with DataFileLoad() with using the import parameter "Register", the file will be opened with write protection. In this mode, saving to the same file is not possible. Changing channel properties is also not possible because they are write-protected. If you want to edit the channels or save the changes to the same file you have to expand the channels first.
The parameter "register" will be often used for large data sets in oder to get a quick view of the data.
In your case please try to use the DataFileLoad command without the register parameter.
Please also switch back to the previously set loading parameter in the DIAdem settings.
Please let me know if it helped
Regards
09-13-2017 10:58 AM
That did it! I just saw "Register" in an example without any explanation that it opens the file as "write-protected". Thank you for sorting this out Thomas.
-Chris
09-14-2017 02:04 AM
Thanks for the reply and Greetings
Thomas