Use Report.Sheets.ExportToPDF instead of PicPDFExport in LabVIEW

Updated Jun 11, 2023

Reported In


  • DIAdem
  • LabVIEW

Issue Details

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

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 is the following:

ScriptStatement('Call Report.Sheets.ExportToPDF("d:\MySheets", FALSE )')

Additional Information

Make sure that the bitness of LabVIEW matches the bitness of DIAdem to avoid the error 1555: Unknown System Error in DIAdem Run Automation or error 2147312566.

Note: DIAdem 2018 and later only comes in 64 bit.