LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically Create/Hide Plots

Solved!
Go to solution

All,

 

I would like to programmatically set the visibility of plots and tab control pages. The solution I came up with was to place visibility property nodes in a case structure and based on the value of the control, that many plots would be made visible. However, placing all of those property nodes is tedious and I don't think this solution is scalable -- ultimately, I will have many more plots than what I included in the example VI.

 

What is the most efficient and elegant method for controlling the visibility of a large number of plots?

 

Regards,

Andrew
0 Kudos
Message 1 of 4
(2,715 Views)
Solution
Accepted by topic author arcranda

Create an array of references for all your graphs.  Now you can programmatically feed them into a For Loop with autoindexing into a Visible Property node. 

 

Message 2 of 4
(2,713 Views)

Thanks for the great advice, Ravens Fan. If I could give you two kudos, you'd get one for the excellent answer and another for the prompt reply at such a ridiculous hour Smiley Wink

Andrew
0 Kudos
Message 3 of 4
(2,704 Views)

Given your GUI, I would recommend tossing the tab control and only having three plots (or whatever number you need at maximum).  For each plot, use a listbox or similar control to select the signal shown on it.  You can thus support an infinite number of signals, but will not overwhelm your GUI with lots of plots.  This will also reduce your memory use and increase your efficiency, since plotting data to the front panel does copy the data and slow the program down.  However, it will also require you to cache your data so you can plot it.

 

Let us know if you need more help.

0 Kudos
Message 4 of 4
(2,683 Views)