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 15
(860 Views)

Bob,

 

Can you share that code?


"Should be" isn't "Is" -Jay
0 Kudos
Message 12 of 15
(830 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 15
(817 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.


"Should be" isn't "Is" -Jay
Message 14 of 15
(804 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.


I had a similar need and came across this thread. Did you upload the code to some other location?

^TeraTech.

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Check out this lengthy post of mostly complaints)
0 Kudos
Message 15 of 15
(489 Views)