LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Update multiple graphs at once

Solved!
Go to solution

Hi, I have a VI containing multiple graphs (on a page of a tab control, to be precise) like these:

 

Capture.PNG

 

 

Now, I'd like when the VI starts to initialize all of these graphs in the same manner:

 

Capture.PNG

 

Basically, removing all the plot names and making them all not visible.

Later, as my VI executes, I want to populate each graph with its relevant data and decide programatially on the number of plots in each graph, on the names of the plots etc.

Now, it is OK to do it like above when one has a few graphs, but I am going to have some 16 of them and it is a real pain to add the wires as in the above screenshot every time I decide to add a graph to the front panel or if I decide some additional initialization is needed.

Can this be done in some sort of a loop? I visialize some sort of loop going thru all the graphs belonging to some LabView object and somehow setting all those properties, while retaining the ability to reference each individual graph later in the program (by it name).

Thanks in advance for your help.

 

0 Kudos
Message 1 of 3
(2,144 Views)
Solution
Accepted by topic author SenSLabs

Create an array of references for each of those graphs.  Unlink the property notes from the graph and feed it the array of references from outside the loop.  Now the loop will autoindex over the array and setting the properties on each of those graph references.

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

Great! It works and so simple.

Thanks a lot!

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