LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PDF loaded using ActiveX will not load when the executable is used on another computer

Hello,

 

I am fairly new to Labveiw and have created a CAN diagnostic tool which uses an ActiveX control to display the CAN Spec PDF on the front panel. This works absolutely fine and still works fine when I create and use an executable on the same computer. However, I need to use the application on multiple computers that do not have Labview installed, and therefore require the executable. I have tried placing a copy of the PDF in the "Volume" folder and recreating the .exe with that path, then placing it in the same location on another computer, but no luck. I am fairly certain it has to do with the static file path, set in the Main VI, since it refers to a static location that does not necessarily exist on the next computer. I need some way to get around this though, so that I can easily transfer the application from one computer to another. The code I am using is very simple; I just open Adobe Reader and the file during initialization then close the reference path (see attached picture). Any Ideas?

 

Thank you for your assistance!

 

-Mike

 

 

0 Kudos
Message 1 of 5
(3,435 Views)

Is Adobe Acrobat Reader installed on the other computer?

0 Kudos
Message 2 of 5
(3,432 Views)

Yes, Adobe Reader is installed on the other computer. 

0 Kudos
Message 3 of 5
(3,401 Views)

Hello All,

 

I believe I have discovered the problem - both problems to be exact. First, the computer I use to create the .exe was using Adobe Reader XI while the target computer was using Adobe Reader X. Number two was the file path: because I was placing the PDF on the desktop, the user account was included in the file path, which was different on the next computer. By putting the PDF directly on the C drive, I was able to fix that. Since the installer creates a National Instruments folder in Program Files (x86), I can use that path in the Main VI diagram and manually place the PDFs in that folder after installation of different computers, but does anyone know if/how the installer could be set up to do this automatically and how to make the path constant use that path?

 

Thanks again for your assistance!

 

-Mike 

0 Kudos
Message 4 of 5
(3,385 Views)

A solution that I have found to work well is to use the Project Directory node as a root path. In the development environment this node will always return the path to the directory containing the project that is calling it. In an executable, it returns the path to where the executable is located. 

 

With that known starting point, I can put files like that pdf in either the same directory as the project/executable or a subdirectory of that location and I can always find it.

 

When creating a build spec you can include non-LV files and specify destinations for them. Likewise, the installer will then put these files where they belong during the installation.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 5
(3,371 Views)