DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Who can help me with "GraphObjChnClear(GraphObjName) " ???

Hello everyone,
 
I'm trying to delete a line in a graph. in diadem 8.1 and I'm using.
 
  Call GRAPHObjOpen("2DObj6_Curve1")
    D2CCHNX          ="Timer_15"
    D2CCHNY          ="Ped_strk5"
    D2CCHNY1         =0
    D2CCONSTX        =NOVALUE
    D2CCONSTY        =NOVALUE
    D2CAXISPAIRNO    =3
    D2CCURVETYPE     ="Line"
    D2CURVECOLOR     ="blue"
    D2CURVECOLORRGB  =50266112
    D2CURVESPECCOLOR ="red"
    D2CURVESPECCORGB =33554687
    D2LEGDRAW        =0
    D2LEGPDRAW       =0
    D2USECOMMONXCHN  =0
  call GraphObjChnClear("2DObj6_Curve1")
 
But it doesn't have any effect. Can someone explain me how can I delete a line of a graph.????
 
thanks in advance.
0 Kudos
Message 1 of 6
(3,963 Views)

Hi mvila

If you know the name of the axis system (eg. "2D-Axis1") and the name of the curve (e.g. "2DObj6_Curve1") you can use the following scipt to delete a single curve:

'------------------- Curve and axis definition ---------------------

Call

GraphObjOpen("2D-Axis1")

'------------------- Curve list -------------------------------

  Call GraphObjOpen("2DObj6_Curve1")

    D2CChnXName =""

    D2CChnYName =""

  Call GraphObjClose("2DObj6_Curve1")

Call

GraphObjClose("2D-Axis1")

Call

PicUpdate() 'Updates the report

If you want to delete all curves you can use GraphObjChnClear.

Call

GraphObjChnClear("2D-Axis1")

Call

PicUpdate() 'Updates the report

Hope this helps.

Winfried

0 Kudos
Message 2 of 6
(3,961 Views)
Dear Winner,
 
Thanks for your help, It works but deletes all the curves, what I need is a function that only deletes an specific curve. And I thought that "GraphObjChnClear" is the function to solve that but it doesn't work (normally?).
 
Do you know how can I do that?
 
Thanks in advance.
0 Kudos
Message 3 of 6
(3,945 Views)

Hi mvila

As I show you in the first example you have to assign an empty string ("") to the x and y channel to delete a single curve.

Winfried

0 Kudos
Message 4 of 6
(3,939 Views)

I know that I used the following script ... but it don't causes any effect. Do you have another way to do that???

Obviously I checked that everi Object Name is correct.

'------------------- Curve and axis definition ---------------------

Call GraphObjOpen("2DAxis5")

'------------------- Curve list -------------------------------

  Call GraphObjOpen("2DObj5_Curve2")

    D2CChnXName =""

    D2CChnYName =""

  Call GraphObjClose("2DObj5_Curve2")
 

Call GraphObjClose("2DAxis5")

Call PicUpdate() 'Updates the report

0 Kudos
Message 5 of 6
(3,936 Views)

Also I tried "GraphObjDestroy(GraphObjName)" but also don't work.

thanks in advance.

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