Hi,
I'm not sure if you are talking about the VIEW or the GRAPH module, so I have listed solutions for both modules:
For VIEW:
Call VIEWLAYOUTLOAD("REG_1A")
Call VIEWOBJOPEN(VWAXISOBJNAME(1)) ' open first axis object of layout
Do While VWCURVEOBJCNT>0 ' check and delete 'old' curves
Call VIEWOBJDELETE(VWCURVEOBJNAME(1))
Loop
Call VIEWOBJNEW("2D-Curve", "Curve1") ' create first curve object
Call VIEWOBJOPEN(VWCURVEOBJNAME(1)) ' open first curve object
VWCURVECHNX=1 ' select x-channel
VWCURVECHNY=2 ' select y-channel
VWCURVECOLOR="red" ' select curve color
Call VIEWOBJCLOSE(VWCURVEOBJNAME(1)) ' close first curve objec
t
Call VIEWOBJCLOSE(VWAXISOBJNAME(1))
Call VIEWUPDATE() ' show/redraw View window
In GRAPH, this is actually much easier.
You can create a template that already contains all the references to the channels. If you want to change these, this is the code:
GRAPHObjOpen('2DAxis1');
GRAPHObjOpen('2DObj1_Curve1');
D2CCHNX := 'X-Channel';
D2CCHNY := 'Y-Channel';
GRAPHObjClose('2DObj1_Curve1');
GRAPHObjClose('2DAxis1');
Let me know if this helped or if you are looking for something more specific. Your question is quite general, si I'm not sure this is exactly what you are looking for.
Otmar
Otmar D. Foehner