DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

DIATxObj.dll error when loading .TDR

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")

 

TDRLoadErrors.png

 

 

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.

0 Kudos
Message 1 of 9
(732 Views)

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?

Andy F.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 9
(696 Views)

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.

0 Kudos
Message 3 of 9
(694 Views)

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?

Andy F.
Applications Engineering
National Instruments
0 Kudos
Message 4 of 9
(685 Views)

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...

0 Kudos
Message 5 of 9
(681 Views)

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.

Andy F.
Applications Engineering
National Instruments
0 Kudos
Message 6 of 9
(667 Views)

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...

 

 

0 Kudos
Message 7 of 9
(630 Views)

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!

 

 

Andy F.
Applications Engineering
National Instruments
0 Kudos
Message 8 of 9
(621 Views)

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.

181204 DIA2018 accessViolationError.png

 

181204_Tag90CheckerCodeSnippet.PNG

 

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.

 

0 Kudos
Message 9 of 9
(409 Views)