I have been using the "PicPDFExport" command remotely using LabVIEW and the DIAdem connectivity toolkit to create PDFs from LabVIEW after running a script using the DIAdem Run Automation Command.vi.
After upgrading from DIAdem 2017 to 2020 I found the command has been deprecated but the recommended replacement "Call Report.Sheets.ExportToPDF" doesn't work either as I get this error:
Undefined command "Report.Sheets.ExportToPDF("C:\Users\xxx\Desktop\MySheets.pdf",FALSE)"
The issue is that the two ActiveX interfaces in DIAdem were created before VBScript was the automation language, so they still use the old Autosequence syntax.
This was not a big problem back when you could call the old PicPDFExport() command, but now that object methods are required to automate the REPORT panel, you have to wrap the object method as an argument in either the ScriptEvaluate() function or the ScriptStatement() command.
The syntax that you need to use in the string connected to the command in the DIAdem Run Automation Command.vi is the following:
ScriptStatement('Call Report.Sheets.ExportToPDF("d:\MySheets", FALSE )')
Make sure that the bitness of LabVIEW matches the bitness of DIAdem to avoid the error 1555: Unknown System Error in DIAdem Run Automation Command.vi or error 2147312566.
Note: DIAdem 2018 and later only comes in 64 bit.
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.