07-21-2018 04:24 PM
For some reason loading this .TDR template sometimes, but not always, throws the bottom error on the command:
Call Report.LoadLayout("N:\TeamShares\Data\Software\DIAdem\DIAdem Scripts\NVH\Report Layouts\Twist_v180720_A.TDR")
Then throws the top error on the WndShow() command.
The report layout loads fine outside of the script. It also occasionally loads fine from within the script. I couldn't find much documentation in the way of what causes that particular error.
07-23-2018 03:05 PM
Hi Chris_P_SD,
It looks like you're loading the TDR file from an "N" drive. Is this a network drive? And are you trying to access this file from different computers or user accounts?
The error messages seem to be indicating an access violation, which may have something to do with user permissions. Is it possible to copy this file onto your local drive in a public directory to see if you are able to replicate the behavior that way?
07-23-2018 06:15 PM
Hi Andy,
Strangely, when I copy the exact line of code,
Call Report.LoadLayout("path")
from the main script to a new script and call it by itself, it loads the TDR template with no error.
So the computer must have access to that network path. As you suggested, it behaves like something earlier in the script, like some type of access privelege, prevents it up from loading the TDR, however this is the only section of the main script that has anything to do with the REPORT object.
07-24-2018 01:47 PM
Hi Chris_P_SD,
It sounds like you at least better understand the behavior you're seeing. Are you able to get your script up and running, or are you still having issues?
07-24-2018 08:42 PM
Hi Andy,
I'm getting the script to work by first loading the TDR, then running the script. I still get the DIATxObj.dll error when loading the report template from within the script. It's not just the one template either, so if I want to populate different templates, I have to split the script into two, manually load the second template, then run the second script. Unfortunately that error message doesn't give much information about what's really going on...
07-25-2018 02:25 PM
Hi Chris_P_SD,
I think that there may be an issue with Read/Write permissions on those files when accessed from a script. Could you try seeing if you can save changes to a file once it's loaded? If you can't, then there may be an issue with the application not being given write access to the TDR files on your network drive.
08-02-2018 12:38 PM
Hi Andy,
It does seem like it could be a symptom of file permissions, however the problem persists even when I copy the TDR to the local hard drive and load it from there...
08-03-2018 04:10 PM
Hi Chris_P_SD,
I'm not sure how the script loads the file, so even if the file or directory doesn't limit the access to read only, the script command may load the file with read only access. This is why I was asking if you could try saving changes to the file once it's loaded to make sure that the file is loaded with write access.
Feel free to post on the forum if you get the chance to test this!
12-04-2018 08:48 AM - edited 12-04-2018 09:08 AM
Just wanted to provide an update to this. I migrated to DIAdem 2018 on a new computer running Windows 10 x64. I am an "administrator" on this computer. This problem still persists and is more of an issue as I try to script more operations with TDR layouts.
This error occurs whether the TDR is on my local drive or a network drive. Could this have to do with the content of the TDR? It's odd that I didn't see this for several weeks after updating to DIAdem 2018, but now it happens about 50% of attemps at loading a TDR from a script. The result of this is that DIAdem has to be restarted.
06-12-2020 01:06 PM
All,
I'm getting the same error in DIAdem 2019 SP1 on Win 10 x64 1809.5, specifically with layouts that contain a eReportObjectRTFText Object, and only when "large" amounts of data are present. I am an Administrator on the computer.
I've received one or the other of these errors:
Almost always followed by this error (if DIAdem responds at all):
To test this, I specifically created a script to generate a comparably large dataset (and statistics), then create, save, and load the TDR. See attached script. It saves the layout to C:\Temp\ but the same issue applies if you save it to the Desktop, etc. I actually had an older computer (Win7) crash simply when adding the text object...
Thoughts?
-Josh