DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

D2CurveETType

Hi,

   I'm writing an autosequence to modify a free text located above a constant courve in diadem report. I use the parameter D2CurveETType but it doesn't work.  This is my code:

    Call GRAPHObjOpen("2DAxis1")
    Call GRAPHObjOpen(D2CurveObj(2))
     D2CurveETType= "Free text"
     D2CurveETTxt  = " 80% limit"
    Call GRAPHObjClose(D2CurveObj(2))
  Call GRAPHObjClose("2DAxis1")
 call picupdate()

 I use Diadem 10 with SP1. Any suggestion?

Thans a lot.

Oriol.
Passive Safety Enginner
Applus Idiada.
0 Kudos
Message 1 of 5
(3,843 Views)
Hi Oriol,

did you set the line type "Line and symbol" -  that's necessary. The following script works fine on my PC with DIAdem 10.0 SP1

Call GraphObjOpen("2D-Axis1")
  Call GraphObjOpen("2DObj5_Curve1")
    D2CCURVETYPE     ="Line and symbol"
    D2CURVEETTYPE    ="Free text"
    D2CURVEETTXT     ="My Test"
  Call GraphObjClose("2DObj5_Curve1")
Call GraphObjClose("2D-Axis1")

Greetings
Walter

0 Kudos
Message 2 of 5
(3,838 Views)
Hi Walter,

   Thanks for your response.
    If I set line type "Line and symbol" woks fine but I my courve is a constant.  Here is my complete function:

sub addLimit(limit,i)
  Call GRAPHObjOpen("2DAxis1")    
    Call GRAPHObjnew("2D-Curve","2DObj1-curvelim"&i)
    Call GRAPHObjOpen("2DObj1-curvelim"&i)
     D2CurveInterv=1
     D2CCURVETYPE= "contant"
     D2CCONSTX        = NOVALUE
     D2CCONSTY        = limit    
     D2CurveInterv    = 5
     D2CurveLinewidth = "0.3"
     D2CurveETType = "Free text"
     D2CurveETPos = "largest index"    
     D2CurveETRelPos="top"
     if (i=0) then
       D2CurveColor     = "red"
       D2CurveETTxt = "Red"
     end if
     if (i=2) then
       D2CurveColor     = "green"
       D2CurveETTxt = "Green"
     end if
   Call GRAPHObjClose("2DObj1-curvelim"&i)
 Call GRAPHObjClose("2DAxis1")    
end sub

Greetings,

Oriol Montalà
Passive Safety Engineer
Applus Idiada
0 Kudos
Message 3 of 5
(3,831 Views)
Hi Oriol,

in that case you must use D2CONSTETTYPE like:

Call GraphObjOpen("2D-Axis1")
  Call GraphObjOpen("2DObj5_Curve1")
    D2CONSTETTYPE    ="Free text"
    D2CURVEETTXT     ="My Test"
  Call GraphObjClose("2DObj5_Curve1")
Call GraphObjClose("2D-Axis1")

By the way, the easiest way to get all necessary parameters is to use the key combination CTRL-A. Therefore open the axis system - with CTRL-A you can copy all properties into the clipboard and past them later on into your script.

Greetings
Walter
0 Kudos
Message 4 of 5
(3,826 Views)
Hi Walter,

   Thanks a lot! Now works fine. I didn't know the power of CTRL+A. This hot key is very cool.

Greetings,

Oriol.
0 Kudos
Message 5 of 5
(3,820 Views)