LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

add new cursor from block diagram

I want to automatically add a new cursor to an intensity graph with specified coordinates when a certain key is pressed. I understand that I can add a cursor from the front panel manually, but that is not what I want.
0 Kudos
Message 1 of 9
(3,979 Views)
Hello
This is a way to do that:

1.- Add cursors from front panel and activate them.
2.- Go to visible items and uncheck cursors.
3.- You can control any cursor parametes from your block diagram

Cheers
Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 2 of 9
(3,972 Views)
Thank you for your reply. The code works, but I do not want to have a limit on the number of cursors. Everytime I click on the graph I want a new cursor to appear at that point. I have everything implemented except for the addition of new cursor only when the mouse is clicked on the intensity graph
0 Kudos
Message 3 of 9
(3,961 Views)
I also noticed that from your code, you have the while loop set to 7 iteration, but only 6 cursors appears because that is the number of cursors that you created manually from the front panel.
0 Kudos
Message 4 of 9
(3,955 Views)
Thank you for your reply. The code works, but I do not want to have a limit on the number of cursors. Everytime I click on the graph I want a new cursor to appear at that point. I have everything implemented except for the addition of new cursor only when the mouse is clicked on the intensity graph. I also noticed that from your code, you have the while loop set to 7 iteration, but only 6 cursors appears because that is the number of cursors that you created manually from the front panel.
0 Kudos
Message 5 of 9
(3,951 Views)
You can do this with the cursor list property. The cursor list is a cluster array where each cluster element defines dursor name, color, style, postion, etc. You would start out with an empty cursor list wired to a shift register by reading the property. When you want to add a cursor, take a new cluster element and append it to the existing array using the build array function and then do a write to the property.
Message 6 of 9
(3,938 Views)
Hello
You need to use the cursor list, as Dennis Knutson states.
This is a sample of generating array of cursors. If some cursor has to be no visible, use tansparent color or style 0.

Greetings
Alipio
---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
Message 7 of 9
(3,926 Views)
Hi

I just found the right example for a problem in my application.
But I can't find the used property in my property list. Why?

Thanks for any help


Yves


Using LV 8.0.1
0 Kudos
Message 8 of 9
(3,706 Views)
Yves,
      I cannot see the OldCrsrList property either.  Have you tried using the Cursor List property?

Thanks,

NathanT
0 Kudos
Message 9 of 9
(3,689 Views)