LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LVlib tangles project file

I tried to add an lvlib (downloaded from the web) to my project to use the .vi files within it. I didn't know what I was doing and taught the project file some bad paths. Now I'm trying to set things straight, and the conflicts refuse to resolve. No matter how I organize the file structure within my project folder, nothing goes right.

Here's the structure, using auto-populating folders.  Power Requests.lvlib is the "holder" of Power Create Request.vi and others:

lvlib 4.jpg

If I try to open one of the Power .vi files, I get this but for the .vi:lvlib 1.jpg

And if I tell it to open the one that really exists, I get this:

lvlib 2.jpg

If I try to resolve conflicts on one of those files, I get this – and by no manner of means can I

get it to accept ANY path for the .lvlib file. Only the selected path actually exists.

lvlib 3.jpg

What is the correct file structure or method for including an imported .lvlib into a project to use it? And how can I get it to FORGET everything it thinks it knows about paths to that library, to start afresh?

 

0 Kudos
Message 1 of 2
(2,042 Views)

Well, start by getting back from your Version Control System (you do use one, don't you) the Project just before you added the .lvlib.  Much better to start with a clean system.

 

Ummm, if the above step doesn't work, stop fiddling!  Find the oldest, least-corrupt version you can and save it somewhere.  Now you can fiddle and not get further behind ...

 

This would be an excellent time to implement Version Control.  Subversion and Git are reasonably popular with LabVIEW Developer (I'm a Subversion user) -- you just need to find a Repository you can use.  Because you are going to try things that may or may not work, you will want to do something like the following:

  1. Commit your starting version.  Be sure to always label your commits (e.g. "Starting version").
  2. Try something, see how it works.  If it seems promising, but needs more work, Commit it (with comment!) and repeat this step.  If it fails, revert back to the last "reasonable" version (which may well be your Starting Version).

As you've discovered, there are "interesting" links between Projects and Files, between Projects and Libraries, and between Libraries and their Files.  I'm not an expert, but have been "bitten" by similar problems you are having.  Some things you might try (but only with proper backups!):

  • Try "Remove from Project" with the Library.  You should also move all of the files in the Library someplace where LabVIEW cannot find them (an external Thumb Drive, not plugged in, is an excellent choice).
  • When the Library removed, try to open the Project and check (and ignore) errors due to the missing VIs.  With luck, you won't see any reference to the Library.
  • Now, separately open the Library (with the Project not "visible").  Try to open the individual VIs and do a "Detach from Library".  What you are trying to do is to make all trace of the Library disappear, ending up with a folder containing all of the Library VIs, but with the individual VIs not having any internal identifiers saying "We belong to Library X".
  • If you get to this fortunate state, you can try to re-create the Library in your Project.  Add the folder containing the files that will become the Library into the Project.  You can now "Convert to Library" on this folder.  You should decide where you want this Library to live -- the few times I've done this, I've kept the Library and its files within the Folder that contained the Project (so everything was included in a single Top-Level Folder, with several sub-folders, including one for the Library).

Bob Schor

0 Kudos
Message 2 of 2
(2,010 Views)