LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

dynamically instantiate cluster elements

Hi,
Is it possible to instantiate new elements in a cluster while the vi is running? I would like to have my vi search a directory and for each file in the directory create an element in the cluster. However, I do not know ahead of time how many files there will be. In addition, the type of cluster element that gets created depends on the file. For instance in the case of one type of file I would like a multicolumn listbox to be created while with a different type of file I would like an array to be created. Is it possible to do this dynamically? Thanks in advance,

Jason
0 Kudos
Message 1 of 4
(2,742 Views)
A Variant type can hold on to any type dynamically. Look for the "To Variant" primitive.
0 Kudos
Message 2 of 4
(2,742 Views)
Thanks for the quick response, but I'm not sure how this does what I want. I would like the cluster and the front panel display of the cluster to be programatically updated based on the number and types of files found in my directory. Thanks,

Jason
0 Kudos
Message 3 of 4
(2,742 Views)
If you want the front panel controls to be dynamic as well, you can use subpanels.
0 Kudos
Message 4 of 4
(2,742 Views)