LabVIEW Shortcut Menu Plug-Ins

cancel
Showing results for 
Search instead for 
Did you mean: 

LVClass Field Find All Uses.llb

Author: Aristos Queue (NI)

 

Right-click on a field of a private data control of a class and select "Find All Uses..." to discover all the places where the field is bundled or unbundled. This plug-in will find

  • all unnamed Bundle and Unbundle nodes (because those always access all fields)
  • any Bundle By Name or Unbundle By Name that references the selected field
  • any IPE Unbundle/Bundle pair that references the selected field.

The tool works for dotted fields inside nested clusters.

 

Before:

AristosQueue_3-1620317046539.png

After:

AristosQueue_4-1620317176215.png
(Added a "Copy to Clipboard" button to the dialog in later version.)
Attachment is saved in LabVIEW 2019. For install instructions, go here.

 


 

Comments
CL_eisenwr
Active Participant
Active Participant
on

It would be nice if we could export the list of VIs added to this

__________________________________
Bill Eisenhower
Certified LabVIEW & TestStand Developer
wiebe@CARYA
Knight of NI Knight of NI
Knight of NI
on

For the unnamed (un)bundler you could check if the element is wired?

 

"Give them a finger, and they’ll take the whole hand" 😊

 

EDIT: It depends a bit on what you want to know. If you want to know if it's save to delete the item, the unnamed (un)bundlers are relevant. If you want to know where the value is used or set, the element has to be wired.

 

EDIT 2: I guess it would be useful to have a "Find all reads" and "Find all writes" as well?

AristosQueue (NI)
NI Employee (retired)
on

The items are labeled in the dialog, so skip the ones that aren't of interest to you.

AristosQueue (NI)
NI Employee (retired)
on

Rev 2.

  • Dialog now just goes to the item when only one item is found.
  • Selection highlighting is better.
  • It is more clear on zero items that nothing was found.
  • @CL_eisenwr -- copy button now included in the dialog.

 

wiebe@CARYA
Knight of NI Knight of NI
Knight of NI
on

I still like this one a lot.

 

+1 for adding it at installation.

 

Could the menu be added to the (named) (un)bundlers of class data in a diagram*? As it is it's very useful, but I'm often in the diagram when I want to know if\where the item is also used elsewhere. I now have to locate the class's private data first.

 

* I know it can, technically, but are there reasons not to do it?

AristosQueue (NI)
NI Employee (retired)
on

> * I know it can, technically, but are there reasons not to do it?

 

That's a good idea. I might have time in the not too distant future to return to this project. I'll consider it.

felipefoz
Member Member
Member
on

Hey,

Is there any limitation on the VIs to run this plugin on LV2017?

Regards,

wiebe@CARYA
Knight of NI Knight of NI
Knight of NI
on

Felipe, I have saved it back to LV18, and it worked without problems.

 

I did save it back to LV16 for you, only to find I can't attach anything here...

wiebe@CARYA
Knight of NI Knight of NI
Knight of NI
on

BTW. In the spirit of 'always one more bug'...

 

There does seem to be a problem with clusters as private data. (Glad I don't have too many of them.)

 

It seems that access to individual cluster elements are not found.

 

GOOD: A 'find all uses' on a cluster or it's element returns access to the cluster.

BAD: A 'find all uses' on cluster or it's element does not return access to an individual element.

 

Find All Uses.png

felipefoz
Member Member
Member
on

 


@  wrote:
 

Felipe, I have saved it back to LV18, and it worked without problems.

 

I did save it back to LV16 for you, only to find I can't attach anything here...


Thank you Wiebe. Don't bother. I am going to test here using a LV2020 install to save it back. I will let you know. 

Apparently this post format is different. I haven't seen a place to attach either, nor reply.

AristosQueue (NI)
NI Employee (retired)
on

The inability to attach is deliberate. These plug in directly into an editor. I do not want malicious persons uploading "improved versions" of plugins. People should always vet code uploaded to the Internet before running it on their machines, but these are particularly a threat vector, so I created a forum with the properties set that only allow the original post to host attachments. I also lock edits to only the original author.

AristosQueue (NI)
NI Employee (retired)
on

Thanks for the bug report. I'd like to get time to work on this, but it hasn't happened lately. 🙂

felipefoz
Member Member
Member
on


@  wrote:
 

Felipe, I have saved it back to LV18, and it worked without problems.

 

I did save it back to LV16 for you, only to find I can't attach anything here...


 

It works in LV2017SP1.

Mehran_Moss
Member
Member
on

Where do I install this llb in LabVIEW 2021 so all users can access?

I had this instruction in here 

If you want a plug-in to only appear for a specific version of LabVIEW, you can add it to

  • <labview install directory>\resource\plugins\PopupMenus\<choose subdirectory>

or actually : C:\Program Files (x86)\National Instruments\LabVIEW 2021\resource\plugins\PopupMenus\edit time panel and diagram

 

but it did not work for my LabVIEW 32bit version.

 

wiebe@CARYA
Knight of NI Knight of NI
Knight of NI
on

I guess somehow I expected this feature to end up in LabVIEW automatically.

 

Here's an idea to add it:

"Find Callers" for Class Data - NI Community

wiebe@CARYA
Knight of NI Knight of NI
Knight of NI
on

For the record, another (tiny corner case) bug...

 

If the private data item ends with a space (which it probably never should), the (un)bundles aren't found at all.

 

Apparently, LV does us a favor by removing the space, so the name strings don't match. 

 

Sure was nasty to figure out what was happening, or rather not happening. I hope the fix is just to use a reg.ex. instead of an equal...

Contributors