01-05-2021 02:56 PM
I've been stuck using DIAdem 2017 until we had time to update all of our scripts to the new object oriented VBS scripting format. This was not deemed high priority at first and now I feel like I'm stuck between a rock and a hard place. When making the updates I found LV 32bit and Diadem 2020 don't work together anymore.
So in order to use the DIAdem connectivity VI’s LabVIEW 64-Bit must be used? The LabVIEW download page states “Unless you require the additional memory provided by the 64-bit option, NI recommends that you download the 32-bit version.” My team has been using LV and DIAdem/Datafinder to generate reports for over 10 years. We have been attempting to upgrade to Diadem 2020 for quite some time now but every step of the way we have run into caveats preventing us from successfully making the upgrade.
Issues we have run into making this relatively simple upgrade:
Is there any plan or other solution moving forward to use LV 32-Bit to generate reports with DIAdem? If not, all of my applications would need to be updated to LV 64-Bit and I’m sure there would be issues on the LV side with the conversion as they are fairly large applications. Should I be looking for a different solution for our reports?
01-11-2021 03:31 AM
Hi Siriusly,
can you please try to a DIAdem script to create a PDF report and check whether this is working in general.
In case it does, can you try to use the "DIAdem Run Script.vi" to generate the PDF export?
I've tried using "DIAdem Run Script.vi" from LabVIEW 32bit in combination with DIAdem 64bit and it worked on my end.
Greetings from wintery-white Belgium
Stefan
01-11-2021 07:19 AM
StefanR,
Yes the "DIAdem Run Script" function works fine but I need to pass the filepath from LabVIEW to DIAdem after the script completes. For this I've been using the "Run Automation Command.vi" along with the "PicPDFExport" command which was deprecated and replaced with "Report.Sheets.ExportToPDF". At first, I couldn't figure out how to get this new command to work with the Run Automation Command and kept receiving errors in DIAdem stating unknown command even though it worked in a script. After contacting NI support I found that the command now has to be contained in a script statement as shown below.
ScriptStatement('Call Report.Sheets.ExportToPDF("C:\Users\MySheets", FALSE )')
Response form NI Support regarding the LV Diadem Connectivity:
Regarding the Diadem 2020 compatibility with LabVIEW 32-bits, the best practice would be to use a 32bit LabVIEW to call a 32bit DIAdem and to use a 64bit LabVIEW to call a 64bit DIAdem. These two scenarios should always work. The hybrid cases might sometimes work but our R&D department doesn't know why in some cases it works in others doesn't.
Did you do anything special to get it to work? I have tried several methods of separately running each program as an administrator but keep receiving errors with the LV connectivity VI's.
01-11-2021 03:02 PM
Hi Group,
Just my 2 cents, As far as passing a parameter between DIAdem and LabVIEW. Seems from a outsider, that you could save a json or xml file to %temp% or somewhere where always have write permission.
That would be very easy to implement. I have used this with great effect, and can pack quite a bit into a json file, and then just have the path known to both sides of the transfer.
Paul
ps. I also have used an in memory datastore that I can access from DIAdem LabVIEW, but this is a more advanced topic that is out of scope for this post.
01-12-2021 07:09 AM
Since wrapping the PDF export call in a ScriptStatement() my original issue stands, using the DIAdem Connectivity VI's that come with LabVIEW 2020 32-Bit don't work with DIAdem 2020. All our applications must be updated to LabVIEW 2020 to utilize DIAdem 2020.
After investigating I found the the ActiveX Classes don't show up in the references of the DIAdem Open Connection VI.
01-14-2021 04:24 PM
Hi Siriusly,
As you can imagine, I have a LOT of DIAdem versions installed on my laptop. I have fewer LabVIEW versions, with the latest currently being 2019, unfortunately. I rebooted my laptop, then manually launched DIAdem 2020. I created a quick VI using 3 LabVIEW DIAdem Connectivity VIs in LabVIEW 2019 32bit that ran the command you listed to create a PDF file. When I pointed the path to "C:\Temp.pdf", I got nothing. When I pointed it instead to a folder off my desktop, I was able to create a PDF file, BUT the brief ActiveX DIAdem icon that showed in my system tray was orange, not green, and the report I got in that PDF file did not look like what was in the REPORT panel of DIAdem 2020. I suspect that the 32bit ActiveX call launched one of my 32bit DIAdem versions on the sly without telling me. In fact, when I add in a "DIAdem Get Version.vi" prior to the "DIAdem Run Automation Command.vi", it tells me clearly that it has launched a DIAdem 2017 version. I have both DIAdem 2017 32bit and DIAdem 2017 64bit installed, but DIAdem 2015 and DIAdem 2017 32bit are the only 2 DIAdem versions I have installed that are 32bit, so that's suggestive. What's clear is that the ActiveX interface, when called from LabVIEW 2019 32bit, is not using the already launched DIAdem 2020, like was guaranteed back when all we had were 32bit applications.
I have heard conflicting accounts from different people regarding whether ActiveX will work or work properly between a 32bit and 64 application, and I don't know what is true. I'm curious if Stefan R. can check if he really had DIAdem 2020 obeying the LabVIEW 32bit ActiveX commands. My current tests indicate that he probably didn't. But I could swear that I've seen 32bit-64bit ActiveX working some of the time.
Sorry I don't have more to offer,
Brad Turpin
Principal Technical Support Engineer
NI
01-14-2021 04:48 PM
One more thing,
I closed LabVIEW 2019 32bit and launched LabVIEW 2019 64bit, then ran the same VI, though now auto-compiled to 64bit, and it successfully found the already launched DIAdem 2020 and created a PDF with that 2020 REPORT panel's contents.
It definitely seems to be the case that a 32bit-32bit communication and a 64bit-64bit communication work as expected. I've heard some people claim that a 32bit-64bit ActiveX attempt is doomed to fail. I don't know how right they are or how complete the failure is in that case.
Brad Turpin
Principal Technical Support Engineer
NI