04-13-2022 03:05 PM
I have 2 programs that are currently sharing many user vi's. I want to save these vi's in separate folders so if I edit a vi in one folder, it doesn't affect the same vi in the other folder. I can't get these programs to load all the user vi's from different folders. How do I do that?
04-13-2022 03:15 PM - edited 04-13-2022 03:19 PM
@RHutchings wrote:
I have 2 programs that are currently sharing many user vi's. I want to save these vi's in separate folders so if I edit a vi in one folder, it doesn't affect the same vi in the other folder. I can't get these programs to load all the user vi's from different folders. How do I do that?
No, you don't want to do that.
What you may want to do is place related groups of user vis in well documented libraries (*.lvlib) and use them in multiple projects.
So, let's back up and ask what you hope to achieve (develop reuse code, create project template, prevent accidental editing of some vis, etc....) and let the community share how they solve the issue.
04-13-2022 03:21 PM
04-13-2022 09:27 PM
I'm guessing that you've been "learning LabVIEW" for a few months (or a year or so), like it, and are starting to do some small "Projects" that might be "Variations on a Theme".
An important Early Step you should take is to start keeping your LabVIEW Projects (note that "Project" has a special meaning in LabVIEW) in some form of Version Control System. Many of us (I'm among them) use Subversion, others (the number seems to be growing) use some form of Git.
You should be developing your "projects" (lower-case "p") in a LabVIEW Project (upper-case "P"). You probably should have a Repository for each Project, and should have only the current Working Copy on your computer (though you could also have a Branch or two).
If you have code that you use in more than one Project, it is a good candidate for being in your own "Reuse Library" (which the earlier Poster referred to). Make that a Learning Objective for Years 2-4.
Bob Schor
04-14-2022 01:50 AM
Open your project, in which you want to separate your vi from, open that VI and go to file - save as.
There select 'substitute copy for original' and select the new destination, can be on a network drive.
It will adapt the new path to that project.
Nevertheless you should understand what Bob and Jay trying to tell you, it will be usefull.
04-14-2022 07:47 AM
I've been using LabView for many years now, mostly this one project which is huge. I work at ON Semiconductor and use LV to evaluate new IC's using a specific set of meters, power supplies and scopes. We use SPI and now I2C to communicate to our IC's. We developed this program from the ground up with very little knowledge of LV and I got a lot of help from this community to get over the humps. That said, I have no real training and retirement isn't far away so I do expect to be taking any classes. There's my history and hopefully the next guy to take over this project will have some actual LV training.
That said, I really need to now how to tell the project where to grab the user vi's that reside on a network drive. No more. I went into the options tab and changed the path but it's still grabbing the user vi's from the old directory.
04-14-2022 08:23 AM - edited 04-14-2022 08:28 AM
Thanks for adding some details although, I have no idea what the attachment is demonstrating.
I do notice, from the vi title bar, that you are not using a LabVIEW Project. You really need one here! The .lvproj file contains the absolute paths to every subvi and dependency. Moreover, if a name conflict occurs and a subvi is loaded from a location higher on the search path list, you will get a warning and a tool to resolve conflicts.
You've shot yourself in the foot by avoiding lvproj files up to now. Consider the lvproj like a holster that holds all the project items safely. Use the project or keep shooting off toes....your choice!
04-14-2022 08:39 AM
04-14-2022 08:46 AM
04-14-2022 09:02 AM