08-02-2016 02:37 AM
Hi everybody,
I have made a script which loads a certain TDM file and uses it as a database.
The script modifies the TDM and then saves the TDM file again by using DataFileSave.
Since the filename and path are the same, Diadem asks in a pop-up window if it can
overwrite this data. Is there a way to give the command to Diadam to automatically
overwrite the original file without this annoying pop-up?
With kind regards,
Darthy
08-02-2016 08:28 AM
In the meantime I have found a solution to my problem.
It might not be the most elegant one but it works.
When you put "CmdNoWarningDisp=True" before the DataFileSave command, the warning pop-up message doesn't appear anymore and the file is overwritten without any input from the user.
Please do not forget to put "CmdNoWarningDisp=False" after the line where you save the data. Otherwise Diadem won't show you any other warning message.
05-23-2021 02:52 PM
I ran into this problem using DIAdem 2020. My solution was similar to yours, but I needed both CmdNoWarningDisp and CmdNoMsgDisp to eliminate all warnings.
Dim bCmdNoWarningDisp, bCmdNoMsgDisp
'Record the existing state of CmdNoWarningDisp and CmdNoMsgDisp
bCmdNoWarningDisp = CmdNoWarningDisp: bCmdNoMsgDisp = CmdNoMsgDisp
CmdNoWarningDisp = True: CmdNoMsgDisp = True
Call DataFileSave(sFilePath, uCase(NameSplit(sFilePath,"E")), True)
'Return CmdNoWarningDisp and CmdNoMsgDisp back to prior values.
CmdNoWarningDisp = bCmdNoWarningDisp: CmdNoMsgDisp = bCmdNoMsgDisp