08-21-2014 03:08 PM
I'm attempting to edit a program that someone else wrote, on another computer. The project has a Trigger lib.lvlib, which is supposed to contain Berkeley Nucleonics 500 Series.lvlib, and under Dependencies the project has 9 VIs that are inside that library. On the previous computer, that library was inside the Labview instr.lib. On my current computer it is inside the project directory. I can't figure out how to tell Labview the new location of the library. I've tried opening the library (so it's in memory) and then opening the project, assuming it will fail to find the one it wants and then find the one in memory, but that didn't work. Right clicking on the BNC 500 library in the project, "Replace with" is greyed out.
08-21-2014 06:08 PM
Just add the Berkeley lvlib to your project and see what happens. Otherwise, you could try opening the "missing" project and when it does its search, point it to the right one.
08-21-2014 06:15 PM
08-26-2014 02:54 PM
I'm probably missing something here, but why is instr.lib the best place for it? My rationale for wanting it in the project folder is that then when I want to move this program from one computer to another, I can just copy the project folder and all my libraries will be included. I don't have to hunt down everything that its using and mirror it onto the new computer.
08-26-2014 02:59 PM
@crossrulz wrote:
Just add the Berkeley lvlib to your project and see what happens. Otherwise, you could try opening the "missing" project and when it does its search, point it to the right one.
When I try to add it, it tells me "LabVIEW: Adding this item would cause a conflict with another item." When I try opening the missing library by double-clicking it, nothing happens. When I try to load it, I get a "file not found" error. When I try to do most other things, it says its locked. When I ask why its locked, it says its locked because it can't be loaded. I basically can't figure out how to get it to prompt me for the "new" location.
08-26-2014 04:31 PM
@Entropy42 wrote:
I'm probably missing something here, but why is instr.lib the best place for it? My rationale for wanting it in the project folder is that then when I want to move this program from one computer to another, I can just copy the project folder and all my libraries will be included. I don't have to hunt down everything that its using and mirror it onto the new computer.
But the drivers were written to be in the instr.lib. That is where instrument drivers go.
If you make a source distribution, I wonder where the instr.lib files would go? That might be something to experiment with.
08-26-2014 05:11 PM
@crossrulz wrote:
@Entropy42 wrote:
I'm probably missing something here, but why is instr.lib the best place for it? My rationale for wanting it in the project folder is that then when I want to move this program from one computer to another, I can just copy the project folder and all my libraries will be included. I don't have to hunt down everything that its using and mirror it onto the new computer.
But the drivers were written to be in the instr.lib. That is where instrument drivers go.
If you make a source distribution, I wonder where the instr.lib files would go? That might be something to experiment with.
But why is it important that they go there? I don't understand how they are written to be in the instr.lib folder, vs any other folder. From what I've seen, they only refer to things inside their own library, so they could be anywhere. Maybe, as you alluded to, I shouldn't be just copying the folder when I want to move the program, but should be using source distribution? From the little I know of Labview, it seems worse to have the drivers in instr.lib.
For reference, when I try to make a source distribution, I get the error "The build is missing one or more source files or items the source files reference on disk."
08-26-2014 06:32 PM
08-26-2014 08:18 PM
Entropy42 wrote: But why is it important that they go there?
Because instr.lib is one of those special folders for LabVIEW. All of the files in the library are referenced relative to the instr.lib folder, not each other. This is because the special folders (like vi.lib and user.lib) are used first over relative paths (like all other folders).
inst.lib was made specifically for instrument drivers.
As Dennis said, just use source control on your instr.lib folder and your projects. That will save you a lot of hassel.
08-27-2014 10:08 AM
I appreciate the effor you guys have put into explaining this to me. I guess part of my insistence on trying to move the lvlib to my project directory is that if I were coding something in C# and referencing a dll, I would just move that dll and update my project in seconds. This seems like a natural, basic thing to me, and I assumed that LabVIEW would let me do the same, but I just didn't know how.
For now, I've conceded and moved the BNC500 lvlib to the instr.lib folder. I opened its project from there and resaved it because I read somewhere that you need to do that. I then re-opened my project that includes it (that project is called PPC). I still see the BNC500 lvlib as "Not Loaded". When I hit "load", it just opens the BNC500 library. Selecting Save All or Save All (this project) does not do anything. When I select "Find items incorrectly claimed by library" it lists every single file in the library, as shown in the attached screenshot.