LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

automating LVDiff or LVCompare

I've used the lvcompare function as the basis for a LabVIEW routine that lets me "point" at two folders representing two (versions of) LabVIEW Projects, which sounds like what you're attempting.  The Bad News is that the lvcompare function, like the Compare tool in LabVIEW, requires that the two files have differeent names, but the Good News is that if you call this function programmatically with "wrapper" LabVIEW code, there's nothing to stop you from renaming one of the files, for example by replacing the .vi extension with .tmp, doing the Compare, and then renaming it back to .vi.  Of course, you can do other things with the "wrapper", such as making lists of files that are unique in Project 1 and Project 2 (I'm calling the two comparing entities "Project", as that's what is usually in the folders I'm comparing).  Another "trick" is to do a straight binary compare first (very fast, and if they're identical to-the-byte, then LVCompare will find them identical, as well).  I originally had two routines, the first one did a "non-interactive LVCompare" to make lists of differing files for me, then called a similar routine where I specified the specific VI to compare interactively (so I could see what changed).  I recently combined these two phases into a single routine that passes the non-interactive "Different VIs" list to the "Compare pairs of differing VIs interactively" phase.  Can be quite helpful when I forget to use SVN when working from home ...

 

BS

Message 11 of 14
(187 Views)

Bob,

 

Can you share that code?

0 Kudos
Message 12 of 14
(157 Views)

Sure.  It's a Project (with numerous sub-VIs, as per my coding style).  What is the best way to "share" it?  I've heard about someplace in LabVIEW Community to share code, but am not sure Where or How.  Guidance welcomed.

0 Kudos
Message 13 of 14
(144 Views)

@Bob_Schor wrote:

Sure.  It's a Project (with numerous sub-VIs, as per my coding style).  What is the best way to "share" it?  I've heard about someplace in LabVIEW Community to share code, but am not sure Where or How.  Guidance welcomed.


Any time for the easy ones Bob!
From the project explorer select "Build Specs>> New>> Zip fileSmiley Wink

 

in the Zip file structure pane select "Strip common directory"  This seems to work rather well.

0 Kudos
Message 14 of 14
(131 Views)