From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Create a link to PPL (Packed Project Library) in Application dynamically

Hi All,

 

I have an application that uses PPL (Packed project library). During the build process of my application LabVIEW copies the PPL to build/My App Folder/data. I can run the application afterwards. If the PPL is deleted or moved later from this ../data/ directory I no longer can run the app.

 

Is there a way to dynamically link and load PPL from another location?  I've tried using viSearchPath but unfortunately it doesn't work.

 

Thanks,

Nikita.

Nikita Prorekhin
CLA
0 Kudos
Message 1 of 5
(4,150 Views)
Pretty sure the answer is no. Why are you deleting/moving it? It's a dependency of the application (since you are calling it statically within the application) so if you move/remove it, it won't work (as would happen in any other application...)

You can load PPLs dynamically - here are a few resources:
http://forums.ni.com/t5/CLUG-Cambridge-LabVIEW-User/Revealing-the-secrets-of-Packed-Project-Librarie...
https://forums.ni.com/t5/Phoenix-LabVIEW-User-Group-PLUG/Plug-in-Architecture-using-Classes-and-Pack...
http://forums.ni.com/t5/LabVIEW-Development-Best/Plug-in-Architecture-using-Packed-Project-Libraries...

LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 5
(4,053 Views)

Hi Sam_Sharp,

 

The idea was to have a set of user applications, and each app refers to only one set of (static) PPLs. I was wondering if I can get the same behavior with PPLs as with DLLs and if I can store all Shared PPLs in one place. 

 

By default each application build process copies all static PPLs to app/data folder. So you have many copies of the same PPLs spread across application folders.

 

There is a workaround though. You can configure all your build specifications in such a way that they build the app files to:

builds/My Program 1/..

builds/My Program 2/..

 

and during the build process each build job puts and links all dependent PPLs to

builds/Shared/

 

Now you have only one set of PPLs stored in Shared folder to where all your applications statically refer. 

 

Nikita Prorekhin
CLA
0 Kudos
Message 3 of 5
(4,037 Views)

You can make a Hard link (mklink -d) of the Data folder and have it placed somewhere else, though it'll probably introduce some other issues.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 4 of 5
(4,030 Views)

Hi Yamaeda,

 

Yes, I came to the same solution at the end.  Just one correction to your message :

mklink -d creates a directory symbolic link, not the hardlink.

 

Nikita. 

 

Nikita Prorekhin
CLA
0 Kudos
Message 5 of 5
(4,013 Views)