LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

refresh graph properties (colors...) when front panel not opened

I have a problem with setting the plot properties of a multiple xy-graph.

I first pass the data (n plots, number variable) to the graph control, THEN I set the according properties like color, line style etc. by a property node beginning with "active plot" followed by the properties. So when I set them, the xy-graph is already initialized with n plots.
Afterwards, I take the graph picture and save it to a bitmap-file.

That works fine as long as the front panel is opened or the number of plots and their attributes stays constant. But if the panel is closed (which is the default of that VI) and the number of plots changes, I get only as many plots plotted correctly as there are shown in the plot legend
- regardless of if the legend is shown or not.

I don't like the idea of having a huge legend on the panel which still might be too small sometimes or having the legend scaled by it's height-property in pixels.

What I need is something like a .refresh-method that forces the graph to update even if the front panel is closed. Any idea how to do this?

Cheers & thanks, Daniel
0 Kudos
Message 1 of 2
(2,759 Views)
The issue you are seeing is because LabVIEW doesn't update the controls/indicator of a front panel that is not open. This is done to save computer resources. The simple way around this is to use VI server to open the front panel for it to update and then close it again. You can use the VI property FP.position to move the window offscreen where it can't be seen and perform the open/close. This will get you the results you are after while still allowing the illusion of a closed front panel.
0 Kudos
Message 2 of 2
(2,759 Views)