DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to insert 2nd Y Axis into a 2D axis report using a script

After doing:

call GraphObjNew("2D-axis", "My2DAxis")
call GRAPHObjOpen("My2DAxis")
D2AXISSYSTEM ="n systems"

Do I need to do another graphobjnew ?

Apparently, specifying "n systems" doesn't automatically create more y axes,
because the call GraphObjOpen(D2AxisXObj(1)) with an index > 1 is not valid.

Examples would be much appreciated.
0 Kudos
Message 1 of 4
(3,629 Views)
Hi,

To my knowledge, it is not possible to programatically insert additional 2D Y-axes to a report.

There is a workaround, well sort of at least. What I have done in the past is create a layout and save multiple version of it, one with 1 Y-axis, one with 2 -Y-axes, etc. Then I'll load the one I need depening on what type of data I want to put in there.

This is not the most elegant solution, but it works for my application.

Let me know if I can help further,

Otmar
Otmar D. Foehner
0 Kudos
Message 2 of 4
(3,629 Views)
Hi,

I do not know any solution to create subaxis. But you can create a subaxis interactively and hide them. To hide them you choose "no color". To make them visible again by script select black as color again.

Call GRAPHObjOpen("2DAxis2")
Call GRAPHObjOpen("2DYAxis3_2")
D2AXISYLINECOLOR ="black"
Call GRAPHObjClose("2DYAxis3_2")
Call GRAPHObjClose("2DAxis2")

To get this script, select the subaxis and open the corresponding subdialog where you select the color. Then press Ctrl-A to copy the script to the clipboard.

Winfried
0 Kudos
Message 3 of 4
(3,629 Views)
Hi,

You must create a new object for each graphical object (like a 2d axis system) or sub object (like a curve) in DIAdem. Example:

' create a new 2d-Axis system
call GraphObjNew("2D-axis", "My2DAxis")
call GraphObjOpen("My2DAxis")
' create a new curve in the axis system
call GraphObjNew("2D-curve", "My2DCurve")
call GraphObjOpen("My2DCurve")
D2CCHNXNAME ="MyXChannel"
D2CCHNYNAME ="MyXChannel"
call GraphObjClose("My2DCurve")
call GraphObjClose("My2DAxis")

picupdate

I hope this will help you.

Greetings

Walter Rick
0 Kudos
Message 4 of 4
(3,629 Views)