DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating 2 Y-Axis on the same axis systerm Programatically???

Hi Friends,
                I have some issues in drawing 2  y-axis on the same Axis System with common X-axis (Programmatically).....Though I tried various method but did not suceed in doing it.......Im completly not aware of how to do it programmatically.....I would be glad if someone of you could help me to come out of this issue.........I have also attached a sample tdm & tdr files which shows how the report should be ....
 
Eagerly expecting help from you'll.................
 
Warm Regards
Philip 
Message 1 of 11
(5,651 Views)
Hi Andrew,

I'm sorry, but currently it is not possible to create sub axis via VBScript. We try to create such a function for the next DIAdem revision.

Greetings

Walter
Message 2 of 11
(5,644 Views)
Hi Walter,
               Was glad to see your immediate response...Thanks for the consideration... In the previous TDR file which i had attached, the two y-axis where at the Origin and at the end of X- axis, for which i received your reply.....Is  it possible to have both the y - axis starting from the Origin???   I have also attached a zip file containing the TDM & TDR files which show how I want......
 
Expecting your reply...
 
With Regards
Philip
0 Kudos
Message 3 of 11
(5,639 Views)

Is it possible for you to load a report file which already has these two axis and then programmatically change everything you have to?

You can get all VBScript commands possible for the diagram by double-clicking the diagram, then pressing CTRL+A (or STRG+A) and copying with CTRL+V into the VBScript.

This is also possible for sub axis and should give you this:

Call GRAPHObjOpen("2DAxis1")
  Call GRAPHObjOpen("2DXAxis1_1")
    D2AXISYOFFSET    =0
    D2AXISYOFFORIGIN ="AxisOrigin"
  Call GRAPHObjClose("2DXAxis1_1")
  Call GRAPHObjOpen("2DYAxis1_1")
    D2AXISXOFFSET    =0
    D2AXISXOFFORIGIN ="AxisOrigin"
  Call GRAPHObjClose("2DYAxis1_1")
  Call GRAPHObjOpen("2DYAxis1_2")
    D2AXISXOFFSET    =-8
    D2AXISXOFFORIGIN ="AxisOrigin"
  Call GRAPHObjClose("2DYAxis1_2")
Call GRAPHObjClose("2DAxis1")

Hope this helps

Message 4 of 11
(5,638 Views)

hi TheMad,

                   Suppose if im loading a Graph with just the axis alon, and  is it possible  to  assign the channels to be plotted dynamically ? Because, the channels to be plotted on the axis varies ....Sometimes in a  Channel group, atleast one channel has to be  assigned to the first y-axis and may be 2 or 3 channels might correspond to the 2 nd y-axis.....in such case, is it possible to load the axis template and then assign the channels using VBscript ?

Then , the code which you had suggested me doesnot work when it is executed as a VBS file....I dont both the axis but just one axis everytime I run that file...

Expecting your reply...........

With Regards

Philip

0 Kudos
Message 5 of 11
(5,621 Views)
Hi Philip,

Attached you find a script which should answer your question.

Greetings

Walter
0 Kudos
Message 6 of 11
(5,612 Views)

Thanks Walter, It working fine.....

I do have another issue....when i load the TDR files and plot the values, graph gets plotted . But immdiately after which if I load somemore datas and try plotting them on the sheet (single x-y axis whose axis definition and other definitions are  done programmatically) , the curves does not get plotted on the sheet, but i do see all the curves getting  listed in the "properties dialogue box" 

This is the same case even if it is the other way round.  Whenever I run these two programs alternatively i face this problem....

What could be the reason for this?

Expecting your reply

Regards

Philip

 

 

0 Kudos
Message 7 of 11
(5,602 Views)

Hi Phillip,

 

I am not sure what is causing the behavior you’ve described, but I have attached a new version of the Test VBScript that Walter posted. This script does what it did before and then it loads more data and plots data to another axis. I edited the Test.TDR to include a second 2D-axis system.

 

Regards,

 

Eric M

0 Kudos
Message 8 of 11
(5,574 Views)

Hey guys,

 

I am trying to create 2 Y-Axis automatically as the author of this post described.

Has the capability been integrated into DIAdem 11.0? And if so, what should I do?

 

Thank you

 

Egor

0 Kudos
Message 9 of 11
(4,939 Views)

Hi Egor,

 

Yes, this is available in DIAdem 11.0 and described in the Help system-- here's the syntax to use:

 

Call GraphObjOpen("2DAxis1")

AxisIndex = GraphObjYAxisNew("Right")

MsgBox "New Right Axis Index = " & AxisIndex

AxisIndex = GraphObjYAxisNew("Left")

MsgBox "New Left Axis Index = " & AxisIndex

Call GraphObjClose("2DAxis1")

Call PicUpdate

Brad Turpin

DIAdem Product Support Engineer
National Instruments

Message 10 of 11
(4,930 Views)