LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Bob_Schor

Make "guts" of LVCompare available as an Invoke Node (to call programmatically)

Status: Declined

Any idea that has received less than 4 kudos within 4 years after posting will be automatically declined.

I need to compare two almost-identical folders of VIs (two versions of the same project) to see which VIs are "substantially the same" and which are different.  There's a Command Line utility, LVCompare.exe, that has much of the functionality of the LabVIEW Compare Tool -- indeed, it has additional switches to allow you to ignore cosmetic changes in your Block Diagram so you can move a wire without it saying the VI is different.  One serious drawback to this utility, however, is that it has no "return code" -- you have to actually look at the Compare screen and note if there are 0 Differences (or not).

 

However, using a command-line utility when you want to compare, say, 1000 VIs is painful, particularly in the absence of a "Same?" switch.  I would like to have something like an Invoke Node, to which I could wire references to the two VIs I want to compare, perhaps a boolean input to control whether or not the utility was "interactive" (it would be nice to turn off the "comparison view" if I was just going to "batch process" a lot of files), six booleans for the six LVCompare switches, and a boolean Same? outout.  With this, an enterprising user could easily cook up a nifty utility to help maintain multiple versions of LabVIEW code, noting which VIs are the same and which are different.

 

As it happens, exactly such a User Interface node to the LV Compare utility appears to exist, but is not "publically available".  As noted above, making it available would make the LabVIEW Compare tool truly useful -- as it currently stands, there really is no other way to easily tell if two VIs are, or are not, "substantially" the same, due to the binary nature of VIs and the tendency to recompile them even when nothing appears to change.  Thus a simple "binary compare" or "date/time compare" won't do the trick.

15 Comments
James@Work
Member

AristosQueue:  I would never have expected this to be part of the RTE.  Using the application would require the Full Development System to be present for the application to function; comparing VIs is ONLY for the developer's domain.  After saying that, I realized my tunnel vision in ever expecting the invoke node to call back to the development environment once converted into an EXE.  Smiley Embarassed

I realize that sharing my application with other developers will require a re-write to use a command line interface to launch the LVCompare functionality.  And, then simply display an error if that EXE is not found.  I had initially started my little VI, that grew into a powerful tool, using the command line method, but switched to using the invoke node I found here; it works great!!  I'll need to work on getting past the issues with the first method that resulted from the lack of documentation or examples; everything I found was related to its use with SCC applications. Smiley Frustrated

Thanks for the feedback.

James

Tech Advisor - Automation
LabVIEW 5.0 - 2020
wiebe@CARYA
Knight of NI

>I realize that sharing my application with other developers will require a re-write to use a command line interface to launch the LVCompare functionality. 

 

Or invoke the method using VI server reference to the IDE? That kind of stuff used to be possible. IIRC the package manager does this even with different LabVIEW IDE versions from one exe.

James@Work
Member

>Or invoke the method using VI server reference to the IDE? That kind of stuff used to be possible.

 

A great suggestion!

However, I tried a couple of different methods using VI Server to reference the IDE without any success. Smiley Frustrated

Tech Advisor - Automation
LabVIEW 5.0 - 2020
wiebe@CARYA
Knight of NI

>However, I tried a couple of different methods using VI Server to reference the IDE without any success. Smiley Frustrated

 

To be honest, I tried it years ago, but gave up after a while. It should be possible... Not sure if there are examples, it is a bit obscure.

James@Work
Member

>To be honest, I tried it years ago, but gave up after a while. It should be possible... Not sure if there are examples, it is a bit obscure.

 

And, I realized that this will be much easier to accomplish by simply distributing as an add-on. Smiley Happy  I'll just include this with the developer tools package I already have on our repository.  Then, users can find it in their Tools menu.

Tech Advisor - Automation
LabVIEW 5.0 - 2020