DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

VB Script to select Y axix of 2D curve (Y1 or Y2)

Hi NI
I am a relatively new user of Diadem. I have succesfully written VBScript to manipulate and analyse data, I am now trying to use the script to automatically modify the graphs in the report view.  I have been able to define channels for the curves, but I cannot find how to select the Y axis for each curve on a report graph through VB Script.
 
Can you tell me what variable to set after I have opened the Sheet Object, the Graph Object then the Curve Object, in order to set the Y axis used for the selected ( open ) curve.
 
 
Thank you
 
Phil
 
Phil Moisey
0 Kudos
Message 1 of 3
(3,948 Views)
Hello Phil!
 
For new DIAdem users the easiest way to learn scripting something like this is to open the setting dialog - here the axis dialog - and press Ctrl+A. Paste than the clipboard content into a text editor. You get the script code to make all the settings in the dialog. You can extract what you need to change and put it in your source.
 
In your special case it will result in a GraphObjOpen for the axis and then a GraphObjOpen("2DYAxis1_1") to get the access to the Y-axis and variables like D2AxisYScaleType.
 
Matthias
Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
Message 2 of 3
(3,946 Views)
Hi Matthias
 
Thanks for the quick and very helpfull reply.
 
That is excellent
 
Cheers
 
Phil
Phil Moisey
0 Kudos
Message 3 of 3
(3,943 Views)