From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic dispatch vi in to sub panel

Hello all,

 

Can anyone suggest me the best method to insert a dynamic dispatch vi into a sub panel control

 

Below are my requirement.

 

In my class I have a dynamic dispatch method called "Channel Configuration" which i want to insert into a sub panel.Before inserting I need to pass the Object values to the Channel Configuration vi.

 

Also I have below criteria

 

I can't consider Sub panel reference as the property of my class

I don't want to pass the sub panel reference to my channel configuration vi to handle sub panel insert inside the  Channel Configuration.vi

I don't want to inherit from a parent class which handle the UI. Its same as having the unwanted properties in the channel class.

 

Can anyone suggest me a method other than above three.

 

 

Thank you

-Vipinraj

 

0 Kudos
Message 1 of 9
(3,029 Views)

Maybe look into the MGI Panel Manager?

 

http://sine.ni.com/nips/cds/view/p/lang/en/nid/217049

 

0 Kudos
Message 2 of 9
(3,009 Views)

Thank you.

 

I will check this

0 Kudos
Message 3 of 9
(3,007 Views)
I admit I haven't used the Panel Manager directly, but I have used the Panel Actors and they're great. You basically inherit your class from Panel Actor instead of just Actor and now you can "do stuff" with it.
0 Kudos
Message 4 of 9
(3,003 Views)

Here again the implementation will be inside the channel configuration vi. This is not i m looking for,

0 Kudos
Message 5 of 9
(2,998 Views)

You could make a "launch and insert into subpanel" subVI. Your problem is that your VI reference won't exist until the subVI actually launches, so you have to have the subVI either put itself into a subpanel or have it send its reference to something that can put it in the subpanel.

 

This means there either needs to be a subpanel reference in the class private data or a queue where it can send its reference as part of its startup procedure. Either way you have to add something to its class private data.

 

To get around this (just brainstorming here...), I think you could launch the correct method via VI Server. Use "Get LV Class Path" on your parent object and append the subVI name, then open a reference to the VI you want. That way you could launch it and have a reference to it, but it's much more involved than just running a subVI. You could then stick that reference into your subpanel.

Message 6 of 9
(2,995 Views)

Hi,

 

Thanks for the reply,

 

Currently I have implemented the same way you mentioned , I have "Subpanel reference" and "This vi reference" in my base class private data, Before launching the dynamic dispatch method I will pass the subpanel reference to the object  and after launching the override vi ,it will insert the "Thisvi reference" to base class method (Call Parent node). Inside base class method I m inserting the vi reference of override vi into Subpanel.

 

But i believe i m not doing the right approach and i shouldn't be doing this activity inside base class method.Also I feel i m not following the basic rules for creating the class properties and method when I m using "Subpanel reference" and "ThisVI Reference" as my channel class property.

 

So I would like to take out these properties from the channel class and have to follow some other method to insert the vi into subpanel.

 

If I use Panel Manager in my "Configuration" method , I can follow dependency relationship between channel class and MGI Panel Manger class.But still I m trying to find better method to avoid implementing unwanted logic inside "Configuration" method.

 

 

Thank you

Vipinraj KK

 

0 Kudos
Message 7 of 9
(2,908 Views)

A little more brainstorming:

 

Does EVERYTHING in your architecture support GUI's? If so, you could make a "GUI handler" base class from which your entire heirarchy could inherit. Put all of the GUI stuff in there and let it handle things.

 

Another option would be to wait a week for LV 2020, which I believe will have interfaces and should let you define this behavior externally to your class (though I've never used them, so I may be wrong here).

0 Kudos
Message 8 of 9
(2,873 Views)

Hi,

 

Thanks for the reply.

 

I m attaching a code ,where I m handling the GUI part in Actor framework using an interface class and malleable vi. 

I have a class member vi called "To Actor core.vi" in each of the class . which will take care of launching the corresponding actor core for that class. I m using a malleable vi and actorcore interface class. So that all the class which is having the To actor core vi can execute . even if not inherited from a common parent class.

 

Can you check the code and let me know is it a right approach.

 

 

0 Kudos
Message 9 of 9
(2,863 Views)