Identifying the Callers of a VI or subVI

Updated Sep 14, 2023

Reported In

Software

  • LabVIEW Full

Issue Details

How can I identify the VIs that call a subVI? Several different applications call the subVI, and I have different conditions I want to trigger depending on the VI that calls the subVI.

Solution

There are several ways to identify VIs that call a certain subVI: 
  • In LabVIEW 8.5 and higher, if the group of VIs are organized into a project, you can display the list of VIs that call a certain subVI by right-clicking this subVI and selecting Find>>Callers from the Project Explorer window. Note: If there's only one caller, it will be highlighted in the Project Explorer Window.
  • In the subVI, place the Call Chain function on the block diagram and wire an indicator to the output of the function. When the subVI runs, the function returns a list of all VIs that call the subVI. Note: To locate the Call Chain function, click the Search button on the Functions palette toolbar.
  • You can also use the Find:Callers property of the ProjectItem class, which returns an array of references to all project items that reference the project item you select.

Additional Information

You can use the same approach to find callers of global variables, shared variables, and project libraries.