DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Re-order curves programmatically in REPORT or VIEW

Is is possible to programatically re-order curves in REPORT or VIEW? 

 

Thanks!

 

Julia

0 Kudos
Message 1 of 4
(3,755 Views)

Hi Julia,

 

One simple method that you can use is to change the channel associated with a particular curve number.  Below is a snippet of a sample script that shows the current names and positions of two curves on a graph in both the REPORT and VIEW panels.  You can programmatically set the each curve to be any channel you wish, and thus you can "swap" their order in whatever manner you would like.  Please let me know if this is what you are looking for.

 

Swap Channels.jpg

Cheers,
Kelly R.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 4
(3,725 Views)

Hi Kelly,

 

I appreciate the response.  I am aware that I can switch channel names, but the problem is that I have multiple curves with very different properties (curve type, color, symbol type and size, etc.), and I want to retain the curve properties, but move the position of the curve, just like I can do if I am in REPORT.  Maybe I should be asking another question - why isn't the curve order, or at least the leading curve, identified by any script-accessible method?

 

Here is an example of why this is a problem for me.  If I manually create a 2D axes in REPORT with 2 curves, then press CTRL-A, then paste in a script, I see my two curves are named "2DObj1_Curve1" and "2DObj1_Curve2".  Now, if I re-order the curves manually in REPORT, so that Curve2 is in the first position (and so that the y-axis is labeled with this curve and so that it is the 'front' curve), and press CTRL-A and paste into a script, there is no indication that I have moved Curve2 to the leading position...except that it shows up first. 

 

Thank you again!

Julia

Message 3 of 4
(3,714 Views)

Hi Julia,

 

Unfortunately there is no method that we expose to do this.  I file a product suggestion for you to do this however.   The two options that you have, and I know that they are not the most optimal, are to either delete and recreate all of the curves, or continue with the method that I had mentioned, but copy over all of the properties to swap all of the properties that you are dealing with.  I hope this helps, and again, I will file this as a suggestion for you.

Cheers,
Kelly R.
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(3,676 Views)