LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Saving for the Desired Version of LabVIEW

Place the attached VI in all of your  ...\LabVIEW 20??\project\  folders.

(it's a good idea to compile each one in the corresponding version of LV; or just mass compile the folder).

Now when you run LabVIEW, you will have menu item: Tools -> Save - Retain LV Version...

When you select that menu item, it will save the current VI for whichever version of LabVIEW it was last saved for.

Message 1 of 26
(391 Views)

@paul_a_cardinale wrote:

Place the attached VI in all of your  ...\LabVIEW 20??\project\  folders.

(it's a good idea to compile each one in the corresponding version of LV; or just mass compile the folder).

Now when you run LabVIEW, you will have menu item: Tools -> Save - Retain LV Version...

When you select that menu item, it will save the current VI for whichever version of LabVIEW it was last saved for.


I will really appreciate if you will be able to implement the same for LabVIEW Snippets (I mean Edit->Create VI Snippet from Selection - Retain LV Version)...

0 Kudos
Message 2 of 26
(342 Views)

@Andrey_Dmitriev wrote:

@paul_a_cardinale wrote:

Place the attached VI in all of your  ...\LabVIEW 20??\project\  folders.

(it's a good idea to compile each one in the corresponding version of LV; or just mass compile the folder).

Now when you run LabVIEW, you will have menu item: Tools -> Save - Retain LV Version...

When you select that menu item, it will save the current VI for whichever version of LabVIEW it was last saved for.


I will really appreciate if you will be able to implement the same for LabVIEW Snippets (I mean Edit->Create VI Snippet from Selection - Retain LV Version)...


As far as I can tell, there is no way to programmatically create a Snippet.

0 Kudos
Message 3 of 26
(327 Views)

@paul_a_cardinale wrote:

@Andrey_Dmitriev wrote:

@paul_a_cardinale wrote:

Place the attached VI in all of your  ...\LabVIEW 20??\project\  folders.

(it's a good idea to compile each one in the corresponding version of LV; or just mass compile the folder).

Now when you run LabVIEW, you will have menu item: Tools -> Save - Retain LV Version...

When you select that menu item, it will save the current VI for whichever version of LabVIEW it was last saved for.


I will really appreciate if you will be able to implement the same for LabVIEW Snippets (I mean Edit->Create VI Snippet from Selection - Retain LV Version)...


As far as I can tell, there is no way to programmatically create a Snippet.


I will carefully say: "impossible is nothing", the snippet is just regular PNG with VI placed into custom data private chunk, but yes, at least not trivial.

0 Kudos
Message 4 of 26
(321 Views)

@paul_a_cardinale wrote:

@Andrey_Dmitriev wrote:


I will really appreciate if you will be able to implement the same for LabVIEW Snippets (I mean Edit->Create VI Snippet from Selection - Retain LV Version)...


As far as I can tell, there is no way to programmatically create a Snippet.


There is the 'Code Capture Tool' which can create snippets. Not a 'one node' solution, but a starting point.

 

https://lavag.org/files/file/63-code-capture-tool/ 

https://www.vipm.io/package/lava_lib_code_capture_tool/?utm_source=vipm_desktop 

 

0 Kudos
Message 5 of 26
(311 Views)

I downloaded and attempted to open "Save - Retain LV Version.vi" in LabVIEW 2019.  It appeared to "lock" LabVIEW -- the screen flickered briefly, a LabVIEW icon appeared on the Task Bar, but I couldn't open anything, couldn't get LabVIEW to respond, and had to resort to killing LabVIEW.exe.

 

I'm assuming that this is not "protected" code, and isn't supposed to simply hang LabVIEW if opened.  I'll note that I didn't exactly follow your instructions -- I had not put it inside an existing LabVIEW Project, but just tried to open it as though it was a stand-alone VI (still residing in my "Downloads" folder).  I also assumed that since you mentioned "LabVIEW 20??", it should have worked if I opened it with LabVIEW 2019.

 

I look forward to your comments.

 

Bob Schor

0 Kudos
Message 6 of 26
(294 Views)

@Bob_Schor wrote:

I downloaded and attempted to open "Save - Retain LV Version.vi" in LabVIEW 2019.  It appeared to "lock" LabVIEW -- the screen flickered briefly, a LabVIEW icon appeared on the Task Bar, but I couldn't open anything, couldn't get LabVIEW to respond, and had to resort to killing LabVIEW.exe.

 

I'm assuming that this is not "protected" code, and isn't supposed to simply hang LabVIEW if opened.  I'll note that I didn't exactly follow your instructions -- I had not put it inside an existing LabVIEW Project, but just tried to open it as though it was a stand-alone VI (still residing in my "Downloads" folder).  I also assumed that since you mentioned "LabVIEW 20??", it should have worked if I opened it with LabVIEW 2019.

 

I look forward to your comments.

 

Bob Schor


When you open it directly it's supposed to do nothing.  And it doesn't really do anything; but it leaves its FP open and hidden (which seems to be hard to recover from if nothing else is open).

You don't need to put it in a Project, you need to put it in the folder ...\National Instruments\LabVIEW 201xx\project\

Note that 'Run When Opened' has to be set for it to work as a menu item.

Attached is a version that closes its FP even if it's run incorrectly.

It should work in any LV version from 2018 onward.

0 Kudos
Message 7 of 26
(280 Views)

@Andrey_Dmitriev wrote:


I will really appreciate if you will be able to implement the same for LabVIEW Snippets (I mean Edit->Create VI Snippet from Selection - Retain LV Version)...


While the CCT, linked to by UliB, doesn't have this specific option, it does have the option of selecting the version to save the snippet to.

 

I don't remember offhand the details of what happens if you select a version which doesn't support features which exist in the code you're capturing. A quick test shows that the image appears correctly and that LV tries to do the standard mutation. I haven't checked what happens when there is no mutation path.

 

In theory, it shouldn't be difficult to add a checkbox to default to the save version of the VI.

 

Also, it might be useful to have the snippet option available when no selection has been made (and then you need to select the entire BD). That change is probably a bit more complex.


___________________
Try to take over the world!
0 Kudos
Message 8 of 26
(254 Views)

@tst wrote:

@Andrey_Dmitriev wrote:


I will really appreciate if you will be able to implement the same for LabVIEW Snippets (I mean Edit->Create VI Snippet from Selection - Retain LV Version)...


While the CCT, linked to by UliB, doesn't have this specific option, it does have the option of selecting the version to save the snippet to.

 

I don't remember offhand the details of what happens if you select a version which doesn't support features which exist in the code you're capturing. A quick test shows that the image appears correctly and that LV tries to do the standard mutation. I haven't checked what happens when there is no mutation path.

 

In theory, it shouldn't be difficult to add a checkbox to default to the save version of the VI.

 

Also, it might be useful to have the snippet option available when no selection has been made (and then you need to select the entire BD). That change is probably a bit more complex.


I looked at the Code Capture S/W.  I'm not willing to search for, and dig out, the part that saves a snippet.

0 Kudos
Message 9 of 26
(244 Views)

OK, I think I get it.  I didn't realize this was plunked into a location within C:\Program Files (x86)\National Instruments\project, where it apparently is incorporated into how LabVIEW behaves during (Project, I assume) development.

 

I'm sure there is a lot of cool and interesting stuff inside this little VI.  If it is not "protected", is there a "safe" way to open it and look at (and try to understand) what it is doing?  It is always useful to extend one's knowledge ...

 

Bob Schor

0 Kudos
Message 10 of 26
(228 Views)