LabVIEW Shortcut Menu Plug-Ins

cancel
Showing results for 
Search instead for 
Did you mean: 

Open Message Handler.llb

Spoiler

Author: crandiba (CERN)

Hi all,

This plugin adds the option to quickly open the block diagram of the called VI from an Actor Framework Message's "Do.vi" by right-clicking on its respective "Send ... Msg".

 

Open Message Handler.gif

 

 

To identify the clicked subVI as an AF's message "Send" VI, three checks are performed:

1) that the VI is part of a library that contains a "Do.vi" (so rules out abstract message classes)

2) that that library inherits from the AF's "Message" class

3) that it contains an AF Message's "Enqueue" .vi

These three checks are of course, a compromise in robustness and amount of code executed. They are kept as simple subVIs in the code to make them a bit more accessible if ever you wish to change or replace them.

 

As always, thank you all 

Best,

Cris

 

Comments
StefanLemmens
Member Member
Member
on

Hi Cris,

 

As you already described in your block diagram comment to increase speed we might compromise with less checks and only check if there is a Do.vi.

I noticed it takes a long time to show the menu if there are a lot of libraries (classes, messages,..) in the project. The reason seems to be the property node that returns the reference to the owning library of a VI. I created a version that just checks whether there is a Do.vi next to the VI under test on disk. This works for my most of my "Send....Msg". It's a less thorough check but much faster in large projects.

 

I also omitted the "check for enqueuer" and "check for message parent" since they both expect "Actor Framework.lvlib" to contain the AF but we also use packed actor libraries and I wanted to be able to use this plugin on those as well.

You can find my version of this plugin attached to this post (I couldn't upload it here). It is saved in LabVIEW2016.

 

Thanks for such a useful plugin. I already saved me a lot of time and clicking.

 

Best Regards,

Stefan Lemmens

Intersoft Electronics

McQuillan
Active Participant Active Participant
Active Participant
on

I was about to make this plugin myself - so thanks for doing the hard-work for me!

The apart from what's already mentioned, I'm going to make minor changes it so it displays as 'Go to Method...' and appears at the very top of the menu.

 

Update: One thing I would like to see more of on the community forums is collaboration. If the owner of this thread is happy to share the GitHub (or other SSC) repository, I would be happy to commit my (and Stefan's) changed for the benefit of the wider community.

McQuillan
Active Participant Active Participant
Active Participant
on

This is a great tool developed by crandiba (CERN). I have created this GitHub page to share the small changes I made, I invite developers to also contribute to the tool.

https://github.com/TomsLabVIEWAdventure/Open-Actor-Method-From-Message

  1. Made LLB compatible with LabVIEW 2015
  2. Separated compiled code from source files so the tool wouldn't re-compile with every version of LabVIEW installed
  3. Changed the name of the tag to be 'Open Method...'
  4. Moved the menu tag to the top of the menu (as it's the item I will use most often)
  5. Removed BD object highlighting when BD opens (I found that annoying)Tom McQuillan Open AF Method.gif

     

    There are more optimisations to be done. However, I hope this starts to push some collaborative efforts 🙂
crandiba
Member
Member
on

Hi all,

It makes me more happy than you know to be able to give a small something back to a great community. Your words only motivate me more.

Thanks for putting it up on github, hopefully it will be easier to share and improve for everyone.

Thanks again,

Cris

 

Marck_GPower
Member Member
Member
on

Hi,

thanks for sharing this, how do you install this?

 

i have tried using the Right-Click Framework from JKI

 

/Marck

Marck Holm Hansen
Tech Lead at GPower | LabVIEW Architect | TestStand Architect | Bachelor of Electrical Engineering | Admin, LabVIEW.dk

crossrulz
Knight of NI Knight of NI
Knight of NI
on

How to install plug-ins that you download

 

Don't use the JKI Right-Click Framework.  That was a hack when it was released (was quite useful at the time, mostly done to force NI to release Scripting) and NI changed things to completely break it somewhere along the line.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Darren
Proven Zealot
Proven Zealot
on

@crossrulz wrote:

NI changed things to completely break it somewhere along the line.


To be clear, the breakage was unintentional. The JKI RCF depended on some unsupported functionality that happened to change between LabVIEW versions, for reasons completely unrelated to its usage inside JKI RCF.

AdrianaOlivaRemola
Member
Member
on

Hi All and Tom,

 

thank you for sharing the improved Plug-in.

 

I tried to run it and it returned me the following message:

 

AdrianaOlivaRemola_0-1612462925043.png

 

I don't know why it reads that vi inside the Do.vi, but I have solved the issue modifying the "Execute Open Message Handle.vi" as follows:

 

AdrianaOlivaRemola_1-1612463184581.png

 

I have done a Pull Request in te TomsLabVIEWAdventure repository.

 

I hope it is a good approach. If not, please let me know!

 

Adriana.

 

EngHyCo - Adriana Oliva