DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

VI path or reference of a cloneable module

Solved!
Go to solution

Hi, 

I am creating few singleton modules and cloneable modules and dock their front panels in a subpanel that sits at a top-level. Following code works well for singleton modules, but not for cloneable.

Essentially, it throws the following error which seems due to invalid VI path.

 

1) Is there a way to get the file path of the clones?

2) This didn't work when I built this to an application. Again it failed at open reference function.

 

Thanks in advance!

 

Asa77_0-1736556328914.png

Asa77_1-1736557315895.png

 

 

0 Kudos
Message 1 of 4
(175 Views)
Solution
Accepted by topic author Asa77

You can't reference clone instances by file path. The approach I've seen is to add a request to your cloneable to add itself to a subpanel. Pass the subpanel reference with the request, then let the cloneable main VI insert itself with code similar to what you show below (but with the "This VI" reference on the diagram of the cloneable main VI that is doing the inserting).

Message 2 of 4
(169 Views)

Many thanks Darren,

That works well. 

 

For everyone's benefit:

It was bit tricky to find the datatype for the request event argument. It can be found at:
drop down Application control palette >> Class specifier constant. Then select method as below.

Asa77_2-1736594026068.png

 

Asa77_1-1736593696299.png

 

 

0 Kudos
Message 3 of 4
(147 Views)

Our open-source HSE Application Template offers similar functionality. Feel free to take a look at how our UI Manager module implements the handling of subpanels and modules. 




DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (Developer Experience that makes you smile )


0 Kudos
Message 4 of 4
(138 Views)