LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving LabVIEW api stored in <labview>\vi.lib\addons directory for a previous version

Solved!
Go to solution

I have created a LabVIEW api in a library, which I developed in the <labview>\vi.lib\addons directory. I want to save it for a previous version of LabVIEW but am having problems doing so.

 

Here's what I've tried:

  1. If in the project I select "Save for previous version", it responds with "Cannot save item from <labview>\vi.lib folder to a previous version.
  2. If I copy the api folder to a separate location on disk and try the same, then I can see the project still points to files in the <labview>\vi.lib\addons api folder, and it only saves the project file as a previous version.
  3. If I delete the api folder from the <labview>\vi.lib\addons directory, the project in the new directory can no longer find the library files even though that are in the same directory as the project.
  4. If I remove the files from the new directory project library then add them back from the new directory, now all the original files appear under project vi.lib dependencies, which it can't locate, and indeed I can see the VIs I added back are still trying to call VIs in the <labview>\vi.lib\addons api directory.

I guess the next thing I'd try would be to go through all VIs and make their subVIs point to the files in the new directory rather than the original <labview>\vi.lib\addons api directory, but that seems quite a lot of effort, so think there must surely be a better solution. I did see a "Resolve Conflicts" option under the project menu, which I thought might be useful, but it is disabled.

 

Can anyone please enlighten me how to best solve this problem?

0 Kudos
Message 1 of 6
(405 Views)
Solution
Accepted by topic author banksey255

Check out these resources:
https://www.youtube.com/watch?v=pb9SeYZAbVs (see ~17:20)

which is also referenced in this previous forum post:
https://forums.ni.com/t5/LabVIEW/LabVIEW-LVAddons-Help-LabVIEW-Reuse-Shared-Between-Versions/td-p/43...

summary:
LabVIEW let's you save your addon VIs in LVAddons. Also, you can configure your LabVIEW to think that your source control repository is an LVAddons additional location.

Doug
Enthusiast for LabVIEW, DAQmx, and Sound and Vibration
0 Kudos
Message 2 of 6
(343 Views)

Thanks, Doug.

 

So, it seems that there is no save for previous version solution when it's stored in <labview>\vi.lib.

 

In future, I'll use either the <labview>\instr.lib directory or <labview>\user.lib directory, or, if I have LabVIEW 2022 or later, the LVAddons directory.

 

For my current api, I've moved it to <labview>\user.lib and updated all paths (I'm using LabVIEW 2019, so using the LVAddons directory isn't possible), which allowed the save for previous version to succeed.

0 Kudos
Message 3 of 6
(310 Views)

To be fair, you shouldn't be doing any development in any of the LV folders. You should be developing them in a dev folder and do distributions.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 6
(216 Views)

Yeah, sage advice, Bill. I wasn't developing in the LV folders originally but then moved the project there when I wanted to create the LabVIEW palette, then continued development in the LV folder location.

 

Once I managed to Save for Previous Version, a further problem I experienced was that all the previous version file paths updated to the previous version save location, and when I then copied the previous version project folder into the user.lib folder of another version of LabVIEW, it was able to automatically fix all paths except for the dir.mnu palette file, which was the library's default palette. Is there a solution for that so that the previous version of LabVIEW isn't required to fix the paths?

 

I played around a bit, but didn't make any progress, and because of time constraints ended up just installing the older version of LabVIEW and fixing up the path to the dir.mnu file using it.

0 Kudos
Message 5 of 6
(159 Views)

Try these VIs when needing to make bulk edits to palette files:

dsbNI_0-1760535353983.png

 

Doug
Enthusiast for LabVIEW, DAQmx, and Sound and Vibration
0 Kudos
Message 6 of 6
(143 Views)