Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

drawing limits lines in cwgraph

I am using VB6 with CWGraph and would like to draw/set the limit lines on the graph. How is this done? Can I modify the appearance of these lines so that they appear separate from the actual graph/chart ?
0 Kudos
Message 1 of 3
(7,277 Views)

Hi hrsnblm,

You can achieve this fairly easily using cursors.

For example, I'm working off the Simple Graph example located at:
C:\Documents and Settings\All Users\Documents\National Instruments\MStudioVS6\VB\Samples\UI\Graph\Simple Graph

What I did was:

  1. Right click the graph and click Properties
  2. Select Cursors tab
  3. Add two cursors (using the Add button) and change their Crosshair Style to Major Y Only
  4. Close out of the Properties dialog
  5. In the code, set the YPosition attribute of the cursor using something similar to:
    CWGraph1.Cursors(1).YPosition = 8
    CWGraph1.Cursors(2).YPosition = 2



Message Edited by Jervin_J on 06-11-2008 08:28 AM
Jervin Justin
NI TestStand Product Manager
0 Kudos
Message 2 of 3
(7,249 Views)
Thank you for your help. This gets me started. The limits lines I will need to draw will not be horizontal, but angled to represent the limits of a slope. Can I set the run statement "CWGraph1.Cursors(2).YPosition = " equal to the slope equation for the limit line, or is there a different way to represent such a limit line?
 
Thanks for your assistance.
 
hrsnblm
 
0 Kudos
Message 3 of 3
(7,242 Views)