Merging VIs
- 已更新2026-03-31
- 閱讀時間為 3 分鐘
You can reconcile different sets of changes to the same VI with the merge VIs functionality in LabVIEW.
LabVIEW uses a three-way merge to merge VIs. A three-way merge reconciles two diverging sets of changes by comparing each set to the same original code. The VI merge capability in LabVIEW uses the following terms:
For example, another user might have made changes to the same VI and checked these changes into source control before you submitted your own changes. In this case, you need to reconcile your own changes with the changes the other user made to the same starting point VI.
For example, assume Their VI and Your VI include a tunnel. To merge the VIs, a tunnel must also exist in Base VI so that LabVIEW knows that the matching tunnels in Their VI and Your VI also match each other.
Use the Select VIs to Merge dialog box to automatically or interactively resolve differences between the original (base) VI and two diverging revisions of that original VI. If differences between the two VIs conflict, you can interactively resolve the changes using the Merge VIs dialog box.
To automatically or interactively merge two VIs, complete the following steps.
-
Rename the VIs that you want to merge.
LabVIEW cannot load two VIs with the same name.
-
Select .
The Select VIs to Merge dialog box appears.
- Click Browse next to Base VI, navigate to the original VI, and click OK.
- Click Browse next to Your VI, navigate to the VI with your own changes, and click OK.
- Click Browse next to Their VI, navigate to the VI with the other user's changes, and click OK.
- Optional:
Select options from the Merge options section to configure how
LabVIEW merges elements of the VIs.
View the context help ( or Ctrl+H) to display rollover help for each option.
-
Click Merge.
The Merge front panels window, Merge block diagrams window, a merged VI, and the Merge VIs dialog box appear.
-
To view the details of a specific change, click the expand/contract symbol next to the
change.
By default, LabVIEW collapses each change in the Unresolved conflicting change(s) field.
-
For each change, select the detail of either Your VI or
Their VI by clicking the description of the change under the
Yours or Theirs subcategories.
Note Most changes are circled in red on either the Front panel changes window, the Block diagram changes window, or in the untitled merged VI.LabVIEW puts an X next to each unresolved change.
-
To select the change you want to accept and add to the merged VI, click the
Choose Base, Choose Theirs, or
Choose Yours button.
As you resolve each change, a checkmark appears next to the change.
-
After you resolve all changes:
- Click the Close button to close the Merge VIs dialog box.
- Click the Save button to save the merged VI.
You also can configure a third-party source control provider to use LVMerge.exe as the default merge application. LVMerge.exe is equivalent to the Select VIs to Merge dialog box.
To merge LLBs, you can use the Select LLBs to Merge dialog box to automatically or interactively resolve differences between different versions of an LLB.