LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Resetting XY graph plot names in LABVIEW

Solved!
Go to solution

Hello,

I have code that changes the plot names. I would like to add a "Clear All" button that resets the plot names to their original Plot 0, Plot 1 . . . names. "plots" is the number of plots that have been renamed so that the for loop can reset the names of those corresponding plots. My problem is that Plot 0 is not renaming plot 0, it is renaming the last plot whose name was changed, and then plot 0 is renamed to Plot 1, plot 1 becomes Plot 2 and so on. 

cathborisova_0-1604450678528.png

This is the relevant cases. Case 1 reinitializes the graph to default, Case 3 sets Clear All to false and resets the plot variable.

Here is an example of plots being renamed:

cathborisova_1-1604450757242.png

Here is what I get when I click "Clear All"

cathborisova_2-1604450792849.png

 

I have tried highlight execution and it looks like it should be renaming plot 0 when i=0 but for some reason that is not occurring. Thank you all in advance!

0 Kudos
Message 1 of 2
(1,029 Views)
Solution
Accepted by topic author cathborisova

Set the active plot before setting the plot name (move it higher up in the property node)

0 Kudos
Message 2 of 2
(1,022 Views)