05-02-2024 08:16 AM
Hi
I am failing to create cursors for different plots in an XY Graph. I have used the property "Plot" in the "Cursors list" array, but this doesn't seem to affect what I am trying to do.
I would like that cursors associated with a Plot, to be hidden when the plot is not visible.
I am attached a small vi that may explain better what I am trying to do. When Plot_1 is hidden, the cursor (that I am thinking belongs to Plot 1) is still visible.
Please point me to the right direction
Thanks
05-02-2024 08:28 AM - edited 05-02-2024 08:29 AM
Something like this may be:
?
05-02-2024 08:44 AM
hi thanks
that might be a solution indeed (although it involves some more work... I thought there might be a simpler way...)
thanks anyway
05-02-2024 09:21 AM
@nitad54449 wrote:
hi thanks
that might be a solution indeed (although it involves some more work... I thought there might be a simpler way...)
thanks anyway
You can simplify this a little bit by using Cursor's Visibility Property (if this can be set programmatically), but not much, you still need a loop and can do this in Run-Time only, I don't know any way to achieve this "statically" in development environment, no any link between "visibilities"
This is how software engineering is working - for certain functionality we need to create some code...
05-02-2024 09:30 AM
Hi
Actually I am trying to do this at run time. I was thinking that the property "Plot" from the array CursorList, will associate a cursor with the respective "plot". But it isn"t or I don't know how to use. I tried also ActivePlot and cursor list but to no avail.
thanks
05-02-2024 10:52 AM
Another way to do it, by property node and Cursors Index:
05-02-2024 11:08 AM
Hi
Thanks, I will look into it. the main problem I have (I have tried the solution proposed by Andrey) is that my plots can change, i.e. what is now a Plot_0, if the user selects another plot, the cursors for Plot_0 are "moved" to the new plot, which may have a different range. So, I am thiniking to combine the method proosed earlier, I can associate the cursors list for a plot with its name (or rather the name of the dataset that produced the Plot_0).. But it's kind of messy.... (I was thinking naively that cursor can be associated with a plot, even if the name is changed, it has a reference number ...).
Thanks
05-02-2024 12:18 PM
Are you talking about this ?
Associating a cursor to a plot (by index).
05-02-2024 03:12 PM
hu
yes, at runtime I don't know how to do it. Take a look at my vi
N
05-02-2024 03:36 PM
@nitad54449 wrote:
hu
yes, at runtime I don't know how to do it. Take a look at my vi
N
If you need to assotiate cursor with plot in runtime, then use Cursor Mode and Plot together:
Cursor Mode = 1 will enable assotiation cursor with Plot, and then next one is Plot which will be assotiated.