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.
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" ---------------------------------------------------------
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.
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.
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.
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" ---------------------------------------------------------