LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to add (multiple) cursors programmatically in an XY graph?

 how to add (multiple) cursors programmatically in an XY graph?

 

I am building an XY graph. then I would like to add cursors at certain locations (positioned on x axis) I determine through a program.

How can I add cursors programatically?

 

Thank you.

0 Kudos
Message 1 of 6
(7,226 Views)

Check out this thread:

http://forums.ni.com/ni/board/message?board.id=170&message.id=245120&query.id=17462#M245120

 

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
Message 2 of 6
(7,224 Views)

Thank you, but the thread is not good enough. The answer provided by Evan is closest to what I have but not good enough.

I have no cursors on the graph before I start the program. The program draws an XY graph and then determines certain locations on X axis where I want to input cursors. The number of cursors is different every time. How could I add or create cursors on the XY graph starting with no cursors in the beginning? Then, how can I clear the cursors if I need to?

 

0 Kudos
Message 3 of 6
(7,220 Views)

Initialize a cluster array (CrsrList type) with as many cursors as you think you would ever need.   Setup your cursors dynamically, then delete the unused cursors (array elements) and then update your CursorList property.

 

 

 

Message Edited by vt92 on 03-20-2009 04:04 PM
>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 4 of 6
(7,213 Views)

I think I'm on the right path but I still can show only one cursor. Could you be more specific?

 

 

0 Kudos
Message 5 of 6
(7,203 Views)

The graph has a property called CSRLIST, which you can set.

 

It's an array of CURSOR clusters.

Build each one the way you need it (Position.X, Position.Y, Color, etc.).

Build them into an array.

Assign the array to the CSRLIST property.

Enjoy! 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 6 of 6
(7,197 Views)