06-26-2011 11:14 PM
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,
Solved! Go to Solution.
06-26-2011 11:25 PM - edited 06-26-2011 11:28 PM
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.
06-26-2011 11:32 PM
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
06-27-2011 08:02 AM
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.