From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to backsave for 2015 AND separate compiled code

I am working on a plugin that has 89 items in the LLB. I have successfully set all items to "Separate compiled code", but when I build the LLB and then back-save to LV2015, the "separate compiled code" check mark on every VI  becomes unchecked . I have tried doing these two operations at the LLB and project level in various combinations and permutations, but I can't get it to work. 

 

I can go through the LLB and set each file manually after converting to 2015, but this seems less than optimal if I'm having to release bug fixes and the like.

 

Any ideas?

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 1 of 10
(2,253 Views)

If you're familiar with VI scripting, you could look into Programmatically saving your VIs for previous version. And you can set the separate compiled code setting programmatically, too, if it isn't persistent for that operation. 




DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (The Future of Team-Based LabVIEW Development)


0 Kudos
Message 2 of 10
(2,286 Views)

It could be related to options in LabVIEW, for instance the default options for compiled code separation. If it's on in your current version, and of in 15, it might adapt the 15 settings. That's where I'd look.

 

AFAIK, if you add the llb in a project, the project can set that property for a hierarchy of VIs (in a directory or presumably in an llb). You can dispose the project afterwards, it's just a means to an end.

 

I'm no expert; keeping compiled code in my VIs never bothered me enough to turn separation on (and run into the numerous apparently related bugs, esp. with .vims, inlining and cRIO targets). I can't really see a strong reason for a shortcut menu plug in to have compiled code separated. But that's OT, of course.

0 Kudos
Message 3 of 10
(2,280 Views)
I just tried this... saving VIs for previous from 2019 to 2015... the source-only checkbox is not modified. I tried both loose VIs and LLBs. I made a few different attempts to replicate this and could not.
0 Kudos
Message 4 of 10
(2,258 Views)

Thank you. I'll have another go at it. 

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 5 of 10
(2,226 Views)

Hi there, thank you for your help. Please note the reason I'm doing this is because it is specifically recommended for rt-click plugins:

 

MAKE SURE YOUR VIs ARE ALL SAVED WITH "SOURCE ONLY" ENABLED.

  • To do this... open the VI Properties dialog, go to the "General" page, and enable "Separate compiled code from source file". Do this for all VIs in your .llb file. This will make the same file usable with multiple versions of LabVIEW simultaneously. Without this, users who run multiple versions of LV will have to recompile every time they launch a different version of LV from the one you used to save your VIs.

https://forums.ni.com/t5/LabVIEW-Shortcut-Menu-Plug-Ins/Template-For-Uploading-Plug-In-llb/ta-p/3521...

 

I have written a script that changes this property, but I will also look at your interesting suggestion of using a temporary project.

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 6 of 10
(2,220 Views)

I've worked for hours trying to get my llb into LV2015 and with compiled code separate, and jsut found that it is a known bug that the separate from compiled code status is not mainteained during Save for Previous.:

 

http://www.ni.com/product-documentation/55106/en/#655865_by_Date

 

However, it does sometimes work. I had to make sure I had no strict type defs (or disconnect type defs when building the LLB), as save for previous does not work with strict type defs.

 

I've attached my llb to see if anyone else can make it work. I can get most of the way there, but for some reason my controls can't be saved for previous using the LV code I've written. I get Error 7 on all controls. I can do those manually, however.

 

I'm very anxious to get my plugin published, but the thought of having to update it for future releases is unpleasant.

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 7 of 10
(2,182 Views)

I looks like no one has posted a large or complex plugin, so perhaps I'm the first to have this issue, but I now see that it is impossible to simultaneously backsave an llb and retain the separate compiled code status of the VIs within. In fact there's a nice Catch 22 here. The only reasonable solution I can find is to build the LLB from LV2015, which is my next step.

 

It is also worth noting that in my tests you cannot back save controls that are inside LLBs. You must first copy them out of the LLB and then save for previous from some temporary file location. (So many reasons to dislike LLBs!) This partially explains my inability to convert my LLB to 2015.

 

In the end, this is going to be worth it. my plugin is *awesome*.

_____________
Creator of the BundleMagic plugin for LabVIEW!
0 Kudos
Message 8 of 10
(2,180 Views)

Hi littlesphaeroid, AQ,

 

I'm getting to reproduce this issue (the "separate compiled code" check mark on every VI  becomes unchecked), when I tried back-saving the Rearrange Cases LLB from LV 2016 to 2015.

 

 

BackSave LLB.png

 

 

I tried the below code, but it is not working as expected! I don'd know why... 🤔

 

AQ, any idea... ??

 

BackSave LLB - Separate Compiled Code property not working.png

 

- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 9 of 10
(2,111 Views)

@littlesphaeroid wrote:

 

It is also worth noting that in my tests you cannot back save controls that are inside LLBs. You must first copy them out of the LLB and then save for previous from some temporary file location. (So many reasons to dislike LLBs!) This partially explains my inability to convert my LLB to 2015.


I don't think so!

 

The Rearrange Cases CTL inside the Rearrange Cases LLB automatically got back-saved to LV 2015 from 2016 without any issue. I verified this by opening it & clicking the List Unsaved Changes option while trying to close it.

 

"The control, last saved with LabVIEW 15.0, has been converted to version 16.0. After a control has been saved with LabVIEW 16.0 it can only be loaded by LabVIEW 16.0 or later. Use Save for Previous Version... to save VIs for older versions of LabVIEW."

 

- Partha ( CLD until Oct 2024 🙂 )
0 Kudos
Message 10 of 10
(2,108 Views)