Jump to content
News about the LabVIEW Wiki! Read more... ×
pawhan11

Load lvlbp from different locations on disk

Recommended Posts

Cross post from NI forums:

http://forums.ni.com/t5/LabVIEW/Load-lvlbp-from-different-locations-on-disk/td-p/3634295

 

I have project file that includes lvlibp library, functions from inside are called from many places inside application.

Now this library resides in directory A, I want to do disk cleaning and load the same PPL but from another place on disk. 

I have played with it and I can not do this... When I remove currently used ppl it goes to dependencies. When I add to project library from new path there is hundreds of confilcts that can not be resolved. 

 

Untitled.png

 

 

Is there a simple catch that I am missing? 

 

demo.zip

Share this post


Link to post
Share on other sites

I dont think so there is simple way because of PPL . just load funtion from new PPL location

Share this post


Link to post
Share on other sites

Expect the VI is referencing something in two PPL files. Removing the one PPL and looking for what is broken should fix it.

Share this post


Link to post
Share on other sites

That is the problem, when I remove PPL from project and from disk and point to new one I get this conflicts.

Share this post


Link to post
Share on other sites

In this case, I think, there is still some dependency that why it shows conflicts

Share this post


Link to post
Share on other sites
On 5/29/2017 at 0:05 PM, Gab said:

In this case, I think, there is still some dependency that why it shows conflicts

Doesn't need to. The LabVIEW project is only one of several places which stores the location of the PPL. Each VI using a function from a PPL stores its entire path too and will then see a conflict when the VI is loaded inside a project, while the project has this same PPL name in another location present. There is no other trivial way to fix that, than to go through the resolve conflict dialog and confirm for each conflict from where the VI should be loaded from now on.

Old LabVIEW versions (way before PPLs even existed) did not do such path restrictive loading and if a VI with the wanted name already was loaded, did happily relink to that VI, which could get you easily into very nasty cross linking issues, with little or no indication that this had happened. The result was often a completely messed up application if you accidentally confirmed the save dialog when you closed the VI. The solution was to only link to a subVI if it was found at the same location that it was when that VI was saved. With PPLs this got more complicated and they choose to select the most restrictive modus for relinking, in order to prevent inadvertently cross linking your VI libraries. The alternative would be that if you have two libraries with the same name on different locations you could end up with loading some VIs from one of them and others from the other library, creating potentially a total mess.

 

Edited by rolfk

Share this post


Link to post
Share on other sites

I have tried resolve in conflict window but for some reason I can not choose correct new path. In fact nothing can be chosen :) 

I was thinking about writing script that will go through all vis in proj and replace this ppl content so they have new path, but that seems way to extreme...

 

Untitled.png

Share this post


Link to post
Share on other sites

You usually need to scroll down in the list until you find issues that have at least one valid resolution option. Higher level conflicts that depend on lower level conflicts can't be resolved before their lower level conflicts are resolved.

Share this post


Link to post
Share on other sites

Makes sense but the problem is that in this case there are no items that can be resolved from resolve conflicts window :)  (For all items in resolve conflicts Use selected item id disabled)

I have also tried to move ppl from files view but this can not be done.

 

Untitled.png

Share this post


Link to post
Share on other sites
19 hours ago, pawhan11 said:

Makes sense but the problem is that in this case there are no items that can be resolved from resolve conflicts window :)  (For all items in resolve conflicts Use selected item id disabled)

I have also tried to move ppl from files view but this can not be done.

 

Untitled.png

I have had situations like this and the only option was to look at the XML. In there you may find absolute paths (c:\myapp\myprogram) mixed with relative paths (..\myprogram). Change all the absolute paths to relative ones and it may resolve this.

Share this post


Link to post
Share on other sites

I cen edit that in proj because that is simple xml, problem is to change this in all subvis in simple way.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

By using this site, you agree to our Terms of Use.