Graphical differencing shows a visual comparison of two VIs and specifically highlights and lists everything that is different between them. The example below has highlighted objects on the block diagram that have been moved outside of a case structure. The lower window shows the comprehensive list and checks off all of the items that have been examined, which is beneficial for code reviews.
Figure 1: Graphical differencing highlights and lists everything that has been modified between different versions of VIs.
This feature can be invoked in one of three ways:
- From within LabVIEW, select Tools » Compare » Compare VIs. - this requires that the developer have copies of the files to compare saved on disk.
- With integration with SCC turned on, select Tools » Show Differences. - this requires that a developer be using the SCC integration with the LabVIEW ADE.
- From the command-line - the differencing engine can be invoked by calling LVCompare.exe from the command line and passing it the location of the files.
The third option enables SCC providers to override default, text-based editors so that differencing can be performed outside of the LabVIEW development environment. Consult your SCC provider for information on how to override the default text-based comparison tool.
Use the following syntax to configure any arguments that LVCompare.exe needs.
lvcompare.exe <absolute path to VI 1> <absolute path to VI 2> [-lvpath <path to LabVIEW>][-noattr][-nofp][-nofppos][-nobd][-nobdcosm][-nobdpos]
As an example, if you have this configured with TortoiseSVN, you can simply right click on the file in the Windows Explorer and select 'Diff' to launch the comparison utility.
Figure 2: The TortoiseSVN Client for Subversion can invoke graphical differencing with the command-line interface in LabVIEW 2009 or later.