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 reset all Labview VI revisions

Solved!
Go to solution

Can the revision for all VIs in a labview llb or hierarchy be reset at one.  I want all revs to be 1 before I formally release the software at work. I know how to reset one at a time but it is a very slow process.  I did a "save as build new hierarchy/llb" on the top level vi thinking that might work, but now luck.  If someone turns the setting to view revision history, I want it to show 1 for all VIs.  Is there a way to reset the rev history on several VIs at once?

 

Thanks in advance.

Shannon F
0 Kudos
Message 1 of 6
(3,445 Views)

You can use the Clear History method to reset the history. All that you'd need to do is to open a reference to the VI, call the method, save the VI and then close the reference. This is all done with the VI Server. If you don't know about the VI Server you can read about it in the LabVIEW Help as well as look at some shipping examples. I'm not at a computer that has LabVIEW right now so I can't whip up a simple example.

 

Other comments:

  • Be aware that once you build an executable the revision information is stripped out since that information is save with the block diagram. It sounds to me like you need to use a real source code control system, like SVN.
  • You mentioned LLBs. Any particular reason you're using LLBs? If you want to use libraries you should use project libraries. LLBs should only be used to distribute code as a nice little package. LLBs have the nasty habit that if the LLB becomes corrupt, then everything in the LLB is GONE.
0 Kudos
Message 2 of 6
(3,438 Views)

Thanks for the info and sorry for the late reply.  For some reason I didn't get an email from NI (as usual) to inform me that somone (you) replied to my question.

 

I found some examples but it looks like I need put the clear method in each VIs to reset each one individually, which is the route I might take.  I have about 30 VIs, so unfortunately I have to add 30 times at this point.  I wish there was a way to reset multiple VIs automatically using a tool in labview.  Obviously there is on option from the drop downs (or cntrl y) to reset each VI individually.  Wonder why they don't have a global reset or why creating a new hierarchy (save as option doesn't work).  I may just have to bite the bullet and add what you sent to each of the 30 VIs.

 

However, this is great information for my next project, I will just add it to new VIs from the start!

 

I haven't used LV in a while, 1st time using a project.  Most legacy stuff at work was done in LV 7.1 so I worked in that more recently; upgrading to later LV version creates a validation nightmare.  I actually have the llb attached in my project, and hence all VIs (when expanded).  Is this bad practice?  Should I ditch the llb and just added each vi into the project?  Can I add multiple VIs to a project at one time instead of having to do it separately on 30 VIs.

 

See attached for my structure of project and subdirectories.  I am totally on the wrong path.  All seems to work great.  I based the explorer directory structure on the requirements I have to use when I validate and formally release the software into our doc control area.

 

Thanks for your time and input!!!!

Shannon F
Shannon F
0 Kudos
Message 3 of 6
(3,394 Views)

 


@sfleming wrote:
I found some examples but it looks like I need put the clear method in each VIs to reset each one individually, which is the route I might take.  

 

No, you do not. As I noted, use the VI Server to open a reference to each VI in the project and then call the "Clear History" method. It does the same thing as the dialog. I've attached an example using a simple project along with the VI to clear the histories, which is just a minor modification of a VI I use to remove polymorphic VIs from a project.

 

 


I haven't used LV in a while, 1st time using a project.  Most legacy stuff at work was done in LV 7.1 so I worked in that more recently; upgrading to later LV version creates a validation nightmare.  I actually have the llb attached in my project, and hence all VIs (when expanded).  Is this bad practice? 

 

The issue is with LLBs. An LLB is old technology, originally created to get around the 8.3 filename limitation of Windows "back in the day". LLBs also allow you to use illegal characters in filenames. The latter actually causes headaches when you try to build an application. As I noted, LLBs should only be used for distribution. If you want a library then use project libraries, which are .lvlib. These provide namespacing, allowing you to have two VIs with the same name, but since they are in different libraries it's OK. Please review the LabVIEW Help on project libraries.

 

 


Should I ditch the llb and just added each vi into the project?  Can I add multiple VIs to a project at one time instead of having to do it separately on 30 VIs.

 

LabVIEW comes with a tool to convert an LLB to a directory. Tools -> LLB Manager. Yes, you can add multiple VIs to a project - drag and drop onto the project. Please review the LabVIEW Help on projects.

 

 


See attached for my structure of project and subdirectories.  I am totally on the wrong path.  All seems to work great.  I based the explorer directory structure on the requirements I have to use when I validate and formally release the software into our doc control area.

 


I have no idea what this means. The project organization does not need to reflect the organization on disk.

 

0 Kudos
Message 4 of 6
(3,379 Views)

Thanks for all the help!!!!!!!!!!!!!!!!

Shannon F
0 Kudos
Message 5 of 6
(3,364 Views)
Solution
Accepted by topic author sfleming
0 Kudos
Message 6 of 6
(3,351 Views)