Resolving Project Conflicts

Projects can contain items that conflict with other items in the project. A conflict is a potential cross-link that occurs when a LabVIEW project contains two or more items with the same qualified name under a single target. For example, if a VI calls a subVI of the same qualified name as an item already in the project from a different path, a conflict occurs because of the cross-link. Most conflicts exist because other items in the project reference a conflicting item.

Finding Conflicting Items

The best way to determine if cross-linking exists is to view the full path to the item. Right-click the project root and select View�Full Paths from the shortcut menu to display the Paths column and view the file paths that correspond to the project items. You either must rename or remove all but one item with the same qualified name from the project.

To view detailed information about existing conflicts, click the Resolve Conflicts button, shown as follows, to display the Resolve Project Conflicts dialog box.

You also can select Project�Resolve Conflicts from the project menu to display this dialog box or right-click a conflicting item and select Resolve Conflicts from the shortcut menu.

Right-click a specific conflicting item on the Items page and select Find�Conflicts to view all conflicting items in the Find Conflicts dialog box. If the item only conflicts with one other item, LabVIEW highlights the item in the Project Explorer window. You also can use the Find:Conflicts property to find conflicts in the project programmatically.

Note��A yellow warning triangle appears on any conflicting items in the Project Explorer window.

The Hierarchy Conflicts with Project dialog box appears when you try to load a file that conflicts with items already in the LabVIEW project. LabVIEW cannot open the file because items in its hierarchy have the same qualified name as items in the project or Dependencies. If a dependent item conflicts with another project item, removing the items that reference it removes the item from Dependencies.

LabVIEW scans the VI hierarchy when you open the block diagram of a VI and add a new subVI. The subVI does not load if any members of its hierarchy have the same qualified name but different paths as an item already in the project. The Add to Project and Update Dependencies dialog box appears. You can add the hierarchy or cancel the load and choose another subVI.

Removing Conflicting Items

You can remove caller VIs from the project to resolve conflicts when a hierarchy of VIs conflicts with the hierarchy of other contents in the project. Right-click a VI or type definition and select Find�Callers or Find�SubVIs from the shortcut menu to highlight the caller or subVI the item references in the Project Explorer window. If more than one caller or subVI exists in the project, the Find Callers or Find SubVIs dialog box appears. Right-click a project root or target and select Find Items with No Callers from the shortcut menu to display the Find Items with No Callers dialog box and find all top-level items. If no callers reference a conflicting subVI, remove the subVI from the project. You also can use the Find:Callers, Find:SubVIs, or Find:Items with No Callers properties to find callers, subVIs, and items with no callers programmatically.

Note��Removing a conflicting subVI from the project might not resolve the conflict because other VIs in the project may still reference the conflicting subVI. The item is a conflicting item until you remove all callers that call the conflicting item from the project. Deleting an item that has callers from the project moves the item to Dependencies.

Renaming Conflicting Items

If you do not want to remove the conflicting item and you detect it has the same qualified name as another item in the project, you can rename the item or add the item to a project library.

Renaming the item loads the callers that reference the incorrect item path, renames the item, and saves the item and all callers. The callers reference the new name. If you do not save the callers, the original item appears under Dependencies because callers still reference the item.

When a VI is part of a project library, LabVIEW qualifies the VI name with the project library name to avoid cross-linking. A qualified name includes the filename and the qualified name of the owning project library filename. The qualified name changes without changing the path or filename.

If a LabVIEW project library in memory conflicts with another project item, you must rename at least one conflicting library before loading. Right-click the library and select Unload from the shortcut menu. After LabVIEW unloads the library, you can reload the library and the VIs from the correct paths. If a library conflicts with another project item and is not in memory, you can right-click the library and select Load from the shortcut menu. After LabVIEW loads the library, you can edit the library or its contents and load VIs from the correct paths.

Redirecting Conflicting Items

When two or more items have the same qualified name, and only one item exists on disk, you can right-click a conflicting item and select Replace with Item Found by Project from the shortcut menu. LabVIEW updates the callers of the incorrect item to reference the item found on disk.

If you detect that one or more VIs refers to the wrong subVI, redirect all callers to reference a subVI with a different path. Right-click a conflicting VI in the Project Explorer window and select Replace with from the shortcut menu to choose the correct subVI on disk. Select a replacement file from the file dialog that appears. LabVIEW automatically updates all items that reference the incorrect path to reference the replacement. You also can load each VI that refers to a conflicting item. The Resolve Load Conflict dialog box appears. You can choose a specific caller VI to load.

Note��LabVIEW dims Replace with Item Found by Project and Replace with if the item is a project library or a member of a project library.

Finding Missing Items

If you think that one or more VIs incorrectly refers to an item that LabVIEW cannot find, right-click the project root and select Find Missing Items from the shortcut menu. The Find Missing Items dialog box appears. This dialog box lists all items in the project that reference an item on disk that LabVIEW cannot find. When an item is not in the project but another item in the project is dependent on the missing item, the missing item appears in Dependencies.

Finding Incorrectly Claimed Items

You can locate and resolve conflicts between a library and the items a library claims in LabVIEW. To determine whether or not an item reciprocates a claim from a library, right-click the project root and select Find Items Incorrectly Claimed by a Library from the shortcut menu to display a list of the incorrectly claimed items in the Find Project Items dialog box. Use this dialog box to navigate to a specific item and remove it from the library or add it to the library.

Tip��You also can access this feature by right-clicking a folder or library and selecting Items Incorrectly Claimed by a Library from the shortcut menu.