Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: drawing limits lines in cwgraph

5 views
Skip to first unread message

Jervin_J

unread,
Jun 11, 2008, 9:40:07 AM6/11/08
to
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:

- Right click the graph and click Properties

- Select Cursors tab

- Add two cursors (using the Add button) and change their Crosshair Style to Major Y Only

- Close out of the Properties dialog

- In the code, set the YPosition attribute of the cursor using something similar to:CWGraph1.Cursors(1).YPosition = 8CWGraph1.Cursors(2).YPosition = 2

<img src="http://forums.ni.com/attachments/ni/230/3997/1/GraphWithLimits.gif"> Message Edited by Jervin_J on 06-11-2008 08:28 AM


GraphWithLimits.gif:
http://forums.ni.com/attachments/ni/230/3997/1/GraphWithLimits.gif

hrsnblm

unread,
Jun 11, 2008, 11:10:09 AM6/11/08
to
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?
&nbsp;
Thanks for your assistance.
&nbsp;
hrsnblm
&nbsp;
0 new messages