Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I annotate in a CNiGraph3D

I am using Measurment Studio on Visual C++ 6.0 (OS: Win XP).  I want to add some text to a 3-D graph that was created using the Plot3DSurface() in CNiGraph3D.  How could I do this.  I see that there is the CNiAnnotation class but that only works with the CNiGraph and not with CNiGraph3D. 
 
Any help would be appreciated.
 
Thanks,
Arvind
0 Kudos
Message 1 of 3
(6,570 Views)
Hi Arvind,

Hope you had a good weekend!  The best resource I found was knowledge base article on our support page:

http://digital.ni.com/public.nsf/allkb/6CF37D593BEA882D86256F5C00694B50?OpenDocument

I hope this answers your question.  If I mis-understood, please let me know.  Thanks!
Matt S
National Instruments
Applications Engineer
0 Kudos
Message 2 of 3
(6,543 Views)

Hello Matt,

  Thats exactly what I was looking for.  I wanted to add text labels to a CNiGraph3D, and could not till now.  I even tried using the Visual C++ MFC CDC (device context) class to add text, but it did not work well.  The example you suggested using the CNiCursor3D adds the text labels exactly the way I wanted.  Thanks for your help.

 

  If anyone wants, here is the code I used in Measurement Studio for Visual C++ 6.0 that adds the text label:

CNiCursor3D niMarkerLabel;
 niMarkerLabel = pMyNiGraph3D->Cursors.Add();
 niMarkerLabel.Name = sLabel;
 niMarkerLabel.NameVisible = true;
 niMarkerLabel.PositionVisible = false;
 niMarkerLabel.PointStyle = CNiCursor3D::None;
 niMarkerLabel.LineStyle = CNiCursor3D::LineNone;
 niMarkerLabel.TextBackgroundTransparency = 100;

 niMarkerLabel.SnapMode = CNiCursor3D::SnapFixed;
 
 niMarkerLabel.SetPosition(dX, dY, dZ); // X, Y, and Z posistions where the text needs to be added.
 niMarkerLabel.Visible = true;
 niMarkerLabel.Enabled = false;

 

Thanks,

Arvind

0 Kudos
Message 3 of 3
(6,526 Views)