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: 

Actor Framework and Subpanel

Solved!
Go to solution

I'm working on a project.Now I need to put many actors (code reuse, many from the same Actor) generated using the Actor Framework in the subpanel on the front panel.How do I do it?

0 Kudos
Message 1 of 3
(2,947 Views)
Solution
Accepted by topic author Griffin-Ning

Here's how I have accomplished this. First, in the actor that has the VI you want inserted into the subpanel you can add a VI Refnum to it's private data. In Pre Launch Init obtain a static reference to the VI to be inserted and bundle it into the class data. Then create a VI for your actor that takes a subpanel reference as an input, and then wire that reference to an invoke node, select Insert VI, and wire in the VI Refnum from the class data, and make a message for that VI. In your UI Actor, when the event occurs that you want the VI to be inserted on you can send the message you just created with the reference to the subpanel in your UI as the input.

 

You can also use the example below as a reference. It is slightly more complicated as it uses protection proxy classes for the references which may or may not be necessary depending on your situation, but the same principles I described still apply.

 

https://forums.ni.com/t5/Actor-Framework-Documents/How-to-Embed-a-Nested-Actor-s-Front-Panel-into-a-...

0 Kudos
Message 2 of 3
(2,926 Views)

I made a video specifically on the topic of Actors and sub-panels:

 

Message 3 of 3
(2,844 Views)