LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
JonN

Find Enum Usage by Value

Status: New

Searched the exchange and found a similar idea but it didn't contain pictures so maybe that's why it didn't receive very many kudos. So here is another attempt at what I think would be a very useful addition to the LabVIEW IDE.

 

Occassionally, I would like to find where a specific enum value is used throughout a project. If I use the right-click Find | Callers popup menu, I obtain a list of VIs that use the enum but no indication of how many times it's used or what values are associated with an instance.

 

Very simple example:

ProjectWithPopup.png

The project subVI front panel and block diagrams:

VIs.png

Find caller results:

FindCallersPopupResults.png

 

It would be nice to have some way of knowing what enum values are being used and have the ability to jump directly to the instance. Maybe a Find Callers that displays enum values:

FindCallersWithValue.png

6 Comments
P@Anand
Trusted Enthusiast

I understand it can make things easier to have a serach like this, but is it really required? We can always do a Text Search to find the item which is used as an item of Enum.

-----

The best solution is the one you find it by yourself
JonN
Member

No, it's not required and you're right - we can always do a text search to find an item that is used in an enum. But, I think it would be helpful to isolate searches to a specific enum and all the values that are used by that enum throughout a project.

Intaris
Proven Zealot

Wellthere's a difference between searching for text within "an enum" and within "that enum".  "That enum" works only with typedefs.  "An enum" works with all enums.

 

A useful addition would actually be a typedef path in the search results or a search for non-typedef enums at all (in order to perform a controlled explosion to rid the world of them).

JonN
Member

Thanks Intaris for wording clarity. Searching for text within "an enum" or "that enum" (i.e. a typedef'd enum) may not be that useful.

 

I am mainly interested in where a typedef'd enum's values are being used throughout a project.

Yamaeda
Proven Zealot

A filtered search or combined, as this is, is quite helpful. If i do a free text search it includes all the other strings and labels which include e.g. setup.

What you'd need is not only "Find this enum" but "Find this enum with value". Optimally it'd work of all identical enums, regardless of type def, but limiting to type def'd would work well.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Hooovahh
Proven Zealot

So the Search Results does have a new feature in 2016 (and hidden in 2015) that allows to filter the search results.  So if you search for the string text "Initialize" and then in the Search Results window type "Enum Constant" it will only show enum constants that have the text "Initialize".  It will unfortunately find all enums (not just one specific type) that has that string, but it is a start.  I too would like an improved enum search that has this functionality.