LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Irritating graph problem

I have an X-Y graph that holds several datasets and has a cursor, locked to
datapoints, that the user can drag around to get information on different
datapoints and different datasets. The user can opt to hide a dataset to
make the display clearer. In this case, if the datapoint the cursor is
pointing to disappears from the plot, the cursor goes to (0,0) and has to be
manually brought back by the menu option "Bring cursor to centre", which is
a builtin function of the X-Y plot.

I want to remove this manual step and automatically bring the cursor back to
the centre. This should have been trivial- I assumed the "Bring cursor to
centre" would be a method of the X-Y graph object. Not so. So I then read
the new X and Y axis ranges aft
er removing the data and I set the cursor X
and Y to the midpoint of these. This doesn't work unless a datapoint exists
at the centre of the plot. So first, I unlock the cursor and move it to the
centre- this is fine. If I manually change the cursor lock mode to "Lock to
point" it automatically jumps to the closest datapoint- good. However if I
do it programmatically, it jumps to (0,0). Not good.

This is obviously an irritating problem. I'm on 6.0- I've not had the time
to backup and install the latest update, though I've not heard of this in
the discussed fixes.

I don't particularly want to have to locate the closest visible datapoint to
the centre and programmatically move the cursor there- it's bound to be much
slower than the builtin function if only I can get at it!

Anyone done this?
0 Kudos
Message 1 of 4
(2,955 Views)
Craig,

sounds to me like you want to have a look at KnowledgeBase doc #1FNFHJE7. It helped me solve a similar issue (I am running 6.0.2). HTH.
Xavier.
0 Kudos
Message 2 of 4
(2,955 Views)
Ouch.

This certainly seems the case, however on 6.0 those properties are uints,
and wiring a -1 int to them in the hope the cast will do something
meaningful causes Labview to crash (in "graphcrs.cpp") when that part of the
code is executed. Nasty.

I needed a reason to take the time to apply 6.0.2 though so it sounds like
that's this morning's job. Thanks for the pointer.

Xavier wrote in message
news:101-506500000005000000F5180000-982303670000@quiq.com...
> Craig,
>
> sounds to me like you want to have a look at KnowledgeBase doc
> #1FNFHJE7. It helped me solve a similar issue (I am running 6.0.2).
> HTH.
> Xavier.
0 Kudos
Message 3 of 4
(2,955 Views)
Hmm. Updating my installation to 6.0.2 doesn't solve the crash. Bug report
submitted. I've attached here a simple VI demonstrating the problem that,
when run, results in a failure at line 2361 in "graphcrs.cpp". Be
interesting to see if it's a widespread thing or just my machine.

If anyone's interested and didn't see the preceding messages, this is in
discussion of KnowledgeBase article #1FNFHJE7

Craig Graham wrote in message
news:3a938f0a@newsgroups.ni.com...
> Ouch.
>
> This certainly seems the case, however on 6.0 those properties are uints,
> and wiring a -1 int to them in the hope the cast will do something
> meaningful causes Labview to crash (in "graphcrs.cpp") when that part of
the
> code is executed. Nas
ty.




[Attachment GraphCrashDemo.vi, see below]
0 Kudos
Message 4 of 4
(2,955 Views)