DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

PicPDFExport not working when script called by LabVIEW - working otherwise?

Solved!
Go to solution

Morning all,

 

We've got a DIAdem script that we're calling from LabVIEW using the "DIAdem Run Script.vi". The script executes beautifully, except for the very last step - exporting the report to PDF.

 

When the script is run manually inside DIAdem, it works. When the script is called from LabVIEW, it does everything fine up until that point, and then just... doesn't do it. No error messages or anything, just no PDF appears.

 

Call PicPDFExport(datareadpath & data.Root.Name & ".pdf",0)

Any guesses? 

 

We're using LabVIEW 2016 and DIAdem 2015.

0 Kudos
Message 1 of 4
(3,046 Views)

It looks like the problem is with DataReadPath - when called from Diadem this is returning the address of the TDMS we're processing. When called from LabVIEW, it's reporting the default data directory - it IS making those PDFs, it was just putting them somewhere we didn't expect.

 

This changes the problem a bit, but it's still a problem! Any insight from anyone?

0 Kudos
Message 2 of 4
(3,028 Views)
Solution
Accepted by topic author AGriffiths

Solved: Using the "Diadem Set User Directory" vi to change the default directory each time the script is run. DataReadPath now reads whichever directory we tell it is the default, so it works now.

 

Cheers all, hopefully this is handy to someone else down the line.

Message 3 of 4
(3,018 Views)

Thank you for the thread, I am currently having the same issue with DIAdem not printing the report when called by LabVIEW. My data and script files are located on a network storage unit. Was the fix you mentioned ("Diadem Set User Directory") a VI on LabVIEW in which you called prior to running the VBS script? Or did you call this in the DIAdem script itself? 

 

Thank you in advance!

0 Kudos
Message 4 of 4
(1,505 Views)