DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Can any1 provide me the script file which will genrate the X-axis label and Y-axis label ?

Solved!
Go to solution

I have two channels and I want to create a report with 2D axis system. I do not want to drag and drop those two channels into 2D axis system. Can any1 provide me the script by which I can automate the script in such a manner that while running the script only I will get label of X-axis and Y-axis.

I tried with enabling the script but it was not able to generate X-axis label (Ex.-Time) and Y-axis label (Ex. - Speed)?

 

0 Kudos
Message 1 of 3
(3,819 Views)
Solution
Accepted by topic author Etn

Hi Etn,

 

The best way to create a script which manipulates an existing layout via script is using the Ctrl-A function within the parameterization dialogs.

 

The following example creates a 2D axis system with one curve and sets the axis labelling explicitly:

 

Call PicLoad("Template")                    'New layout

Call GraphObjNew("2D-Axis","New_2DAxis1")   'Creates a new 2D axis system
Call GraphObjOpen("New_2DAxis1")            'Opens the axis object
  D2AxisBackColor  ="grey"                  'Sets the background color
  D2AxisTop        =10                      'Sets the position
  D2AxisBottom     =10
  D2AxisLeft       =10
  D2AxisRight      =10

  Call  GraphObjNew("2D-Curve","New_Curve") 'Creates a new curve
  Call GraphObjOpen("New_Curve")            'Opens the curve object
    D2CChnXName      =ChnNameExt(1)         'Defines the x-channel
    D2CChnYName      =ChnNameExt(2)         'Defines the y-channel
    D2CurveColor     ="red"                 'Defines the curve color
  Call GraphObjClose("New_Curve")           'Closes the curve object

  Call GraphObjOpen("2DXAxis1_1")
    D2AxisXTxt       = "@@ChnName(CurrChnNo)@@ [@@ChnDim(CurrChnNo)@@] (My Speed)" ' Defines the x-label
  Call GraphObjClose("2DXAxis1_1")

  Call GraphObjOpen("2DYAxis1_1")
    D2AxisYTxt       = "@@ChnName(CurrChnNo)@@ [@@ChnDim(CurrChnNo)@@] (My Time)" ' Defines the y-label
  Call GraphObjClose("2DYAxis1_1")
Call GraphObjClose("New_2DAxis1")           'Closes the axis object
Call PicUpdate()                            'Updates the report

 

Christian

0 Kudos
Message 2 of 3
(3,802 Views)

Thanx Christian, Its Working...

 

0 Kudos
Message 3 of 3
(3,791 Views)