Hi,
I am using MeasurementStudio7 in C++ mode. I have to create a marker on a graph (this is just a cursor) and a text assigned to it. I am able to create the cursor. I have tried almost every possible way to add an Annotation, but it seems that for some reason the system disregards my efforts. I am trying with no curves displayed. The range of the axis is 0-10 both X and Y. I can add the annotation, but I cannot specify which coordinates I want it to point to and which coordinates the text should be displayed at. The idea would be to point to a point on the cursor. I also noticed that if I add an anotation and pan the graph it just stays at the same position no matter what the axes are displaying.
Also if I try to move the text it just clips to the top left of the graph.
So my question is this:
1. how can I create an annotation with arrow pointing to a specified graph coordinate?
2. how can I track this without having a bounding limit
Here is the code I used:
CNiAnnotation newAnnotation = m_Graph2D.Annotations.Add();
newAnnotation.SnapMode = CNiAnnotation::SnapFixed;
newAnnotation.CoordinateType = CNiAnnotation::AxesCoordinates;
CNiShape shape = newAnnotation.Shape;
shape.Type = CNiShape:: Point;
CNiReal64Vector xC,yC;
xC.Append(3);
yC.Append(5);
shape.SetCoordinates(xC,yC);
newAnnotation.Caption.Text = _T("Caption");
newAnnotation.Enabled = true;
newAnnotation.Visible = true;
This means I want it to point to (3,5). I am always clipped to an area of (0, 9.25, 5, 10). I have attahced a JPG, the left one shows where the annotation is placed based on the above code, the right one shows how it reacts when I pan.
Please help,
Thank You
Miklos