Configuring Source Control with LVCompare.exe

You can configure a third-party source control provider to use LVCompare.exe as the default comparison tool. Use LVCompare.exe to compare differences between two VIs interactively.

Note LVCompare.exe is available only in the LabVIEW Professional edition.

LVCompare.exe is equivalent to the Compare VIs dialog box.

To configure a third-party source control provider to use LVCompare.exe as the default comparison tool, complete the following steps.

  1. Make sure the computer on which you are running LabVIEW also includes a third-party source control provider.
    Consult the source control administrator for additional assistance.
  2. Direct the source control provider to LVCompare.exe.
    LabVIEW installs LVCompare.exe in different directories depending on the platform.
    • (Windows) C:\Program Files\National Instruments\Shared\LabVIEW Compare\LVCompare.exe
    • (macOS) /Library/Application Support/National Instruments/LabVIEW Compare/LVCompare.app/Contents/MacOS/LVCompare
    • (Linux) /usr/local/bin/LVCompare
    Directories might vary depending on the configuration of the computer.
  3. Use the following syntax to configure any arguments that LVCompare.exe needs:
    lvcompare.exe <path to vi1> <path to vi2> [-lvpath <path to LabVIEW>][-noattr][-nofp][-nofppos][-nobd][-nobdcosm][-nobdpos]
    Note The path you specify for each VI can be absolute or relative to where LVCompare.exe launches from.
    Table 3. LVCompare.exe Arguments
    Argument Description
    lvpath path to the version of LabVIEW you want to use for the comparison operation
    Note If you do not specify which version of LabVIEW to use for the comparison operation, LabVIEW uses the currently registered version of LabVIEW. (macOS) LabVIEW uses the latest version of LabVIEW on the computer. (Linux) LabVIEW uses the last installed version of LabVIEW.
    -noattr Do not compare VI attributes
    -nofp Do not compare the front panels
    -nofppos Do not compare the size or position of front panel objects
    -nobd Do not compare the block diagrams
    -nobdcosm Do not compare the appearance of block diagram objects, including changes in position or size
    -nobdpos Do not compare the size or position of block diagram objects
    Note This argument was deprecated in LabVIEW 2021.

    You can choose any arbitrary VI for vi1 and vi2. vi1 is not necessarily the base file, and vi2 is not necessarily a modification of the base file. Within the scope of the comparison report:

    • vi1 is the VI you assign for the initial state (from the state in vi1)
    • vi2 is the VI you assign for the after state (to the state in vi2)

    For example, to configure the third-party source control provider to use LabVIEW 2009 to compare VIs but not compare cosmetic, size, or position differences, use the following command line:

    "C:\Program Files\National Instruments\Shared\LabVIEW Compare\LVCompare.exe" $1 $2 -lvpath "C:\Program Files\National Instruments\LabVIEW 2009\LabVIEW.exe" -nobdcosm -nofppos

    $1 and $2 are variables the third-party source control provider defines for the paths to the VIs you want to compare.

    Note You also can enter this command directly in the command line to launch LVCompare.exe.
  4. Optional: Complete any remaining steps to configure the third-party source control provider.
    For example, some source control providers allow you to specify comparison tools for particular file extensions. If the source control provider allows you to specify a comparison tool, specify LVCompare.exe for the .vi file extension. Consult the documentation for the source control provider for more information.