Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Annotation to snap to an X Vs Y plot

Hi Michanovich,

Can you post a simple example that demonstrates the behavior that you are currently seeing?  This way I can test it out and see if there is a solution for you.
0 Kudos
Message 11 of 22
(6,290 Views)

Hi Terry,

I've included a very simple example. I hope it's clear enough for you understand the problem.
Click and drag on the cwgraph to create the annotation.

0 Kudos
Message 12 of 22
(6,287 Views)
Hi Michanovich,

You need to change the PointIndex for the Annotation.  The PointIndex is the plot point that the Annotation shape will be drawn around.  There are some code snippets in the Measurement Studio help.  You can find these by going to Start >> Programs >> National Instruments >> Measurement Studio >> Help >> Measurement Studio Reference.  If you look up the help for the Annotation class and the PointIndex property, the help will give more detail about this property and a code snippet. Take a look at that and if you have any questions, please let me know.
0 Kudos
Message 13 of 22
(6,276 Views)

Hi,

I am aware I can change the Pointindex and, as I wrote before, this is not the behaviour I want.
Changing the pointindex won't change the behaviour, it only changes the start position of the behaviour (which is this "center around" thing).

Hereby a quote from the reference about tis behaviour:

From the pointindex property:
"Specifies the index of a plot point to center the shape around."


As you maby could notice from the code in my example I don't want the selection to be drawn -around- the position I click and drag on yet I want like the selection to start one end of the selection at the point I press the mousbutton, and stop the other end at the position where I drag the mouse to (while holding the mousebutton). Thus only changing the shape at one side, not both.
Thereby selecting a part, as you would select a sentence in microsoft Word for example. Just click and drag.

A clear example:
I click at xposition 9 and I hold down the mousbutton to xposition 15.
The selection I see would start at position 9 an end at position 15.

If I would try this with pointindex the selection would not start at postition 9, instead this would be in the middle.

That's it.

I'm affraid I cannot show it more clearly as I tried.

Is this possible with the software at all?

Thanks,
-Michanovich

Message Edited by Michanovich on 04-19-2007 02:27 AM

0 Kudos
Message 14 of 22
(6,269 Views)
Hi Michanovich,

I talked to R&D about this and we found this problem to be a bug with the CWAnnotations.  Unfortunately, I do not have a timeframe of when or if R&D will fix this.  For now,
the only workaround is to have the Annotations set to floating.  If you have any questions, please let me know.
0 Kudos
Message 15 of 22
(6,238 Views)

Ok,
Well in any case thanks for the help thusfar. I hope the solution shall be included within the next update.

Regards

-Michanovich

Message Edited by Michanovich on 04-24-2007 01:58 AM

0 Kudos
Message 16 of 22
(6,237 Views)
Hi Michanovich,

I'm not sure if you are still reading this post, but we were reviewing the bug report filed with regards to this forum post but there is still some confusion about the actual issue. We can't tell if the forum post is mostly questioning the default behavior of the snap modes and point index features or what based upon the example that was posted.

The PointIndex property is only applied when using the snap modes of
- Point on selected plot: snaps annotation to points on a specific plot
- Point on any plot: Snaps annotation to nearest point on any plot
- Anchored to point: Fixes the annotation to a specific point on a specific plot

When you are using the above snap modes, the center of the annotation will be at array[PointIndex].  Now, I believe in your example you were calculating the PointIndex but you were sometimes calculating negative numbers and numbers greater than the number of points. If the PointIndex is out of that range, the PointIndex will default to 0.

You may already know this, but if you could explain a little more about your confusions or wants, it might help. We don't want to close out the bug report until we fully understand the issue.

Thanks
Jonathan N.
National Instruments
0 Kudos
Message 17 of 22
(5,855 Views)

Dear Jonathan,

Please do not look too much at the little example I wrote, since it is merely a simple display of the basic problem I have.

As for the problem, actually the word "bug" might not be completely fair to use problem since I'm sure the pointindex mode is working just like it should. The problem could just as well be called a new feature.

As I tried to explain in my previous posts, the wished-for behaviour is though not possible with the current version. It is only possible to simulate the behaviour by writing code in the event handlers and such which can be a tedious thing to do.
It would be great if there would be a support for a "region border"-snap function, this would save me (and I presume a lot more people) much time.

0 Kudos
Message 18 of 22
(5,848 Views)
Hi Michanovich,

Thanks for clarifying your situation. Just for your knowledge, we are not actually implementing any new features in the Measurement Studio for Visual Studio 6.0 package. This product is considered a legacy product now and we are focusing development in our Measurement Studio .NET products (i.e. for Visual Studio .NET 2003 and 2005).  However, if you do find bugs in this legacy software, please let us know so we can address that issue.

Microsoft is moving away from Visual Studio 6.0 (actually I believe they are dropping support for Visual Studio 6 in 2008) and so I would strongly suggest that start migrating your existing applications over to .NET.  This way, if you come across new features that you would like to see, you can let us know and we can add it to our list. 

Anyway, just thought I would let you know.

Best Regards,
Jonathan N.
National Instruments
0 Kudos
Message 19 of 22
(5,838 Views)
Hi Jonathan,
 
I understand the move. Actually I am using both software packages VS6 and 2005 and reducing developments in VS6.
 
As a matter of fact this particular feature would be very welcome in the projects I'm working on in C# right now, so it would be a great addition in any case.
 
With kind regards,
-Michanovich
0 Kudos
Message 20 of 22
(5,835 Views)