DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

axis scaling

hello
Im a newbie with diadem and my engish is very bad.
 
I whant to scale manually my axis
 
sub parametrage_graph()
'placement du graph dans la fenetre report
  D2AXISTOP        =10
  D2AXISBOTTOM     =21.6
  D2AXISLEFT       =15
  D2AXISRIGHT      =15
'parametre du graph
  D2AXISCOLOR      ="black"
  D2AXISCOLORRGB   =33554432
  D2AXISLINEWIDTH  ="0.5"
  D2AXISISODISP    =0
  D2AXISDISPTYPE   ="Frame"
  D2AXISBACKCOLOR  =""
  D2AXISBACKCOLRGB =0
  D2AXISGRIDCOLOR  ="grey"
  D2AXISGRIDCOLRGB =33554432

 ' D2AXISSCALEDIN   ="range of values"         
   D2AXISXSCALETYPE="manual"             i add this command but it dont work, it said: invalid variable access (D2AXISXSCALETYPE)
                                                                     Parent object open?
                                                                     i dont understand why the command D2AXISSCALEDIN   ="range of values" work
                                                                     and why D2AXISXSCALETYPE dont work.
                                                                     thank you.
  D2MTICKGRIDDRAW  =0
  D2AXISINDIVIDCOL =0
  DHI5             =0
  D2AXISDISP(1)    ="Grid"
  D2AXISDISP(2)    ="Grid"
  D2AXISGRIDTYPE(1)="solid"
  D2AXISGRIDTYPE(2)="solid"
  D2AXISGRIDINTERV(1)=2
  D2AXISGRIDINTERV(2)=2
  D2GRIDLINEWIDTH(1)="min"
  D2GRIDLINEWIDTH(2)="min"
 
  'parametre de la legende
   D2LEGFRAME       =0
  D2LEGDRAW        =1
  D2LEGSIZETYPE    ="complete legend"
  D2LEGSIZEGLX     =20
  D2LEGSIZEGLY     =10
  D2LEGSIZELOX     =10
  D2LEGSIZELOY     =4
  D2LEGORIENT      ="horizontal"
  D2LEGTXTPOS      ="right"
  D2LEGSYMSIZE     =10
  D2LEGANGLE       ="0"
  D2LEGFRAMEWIDTH  ="min"
  D2LEGBACKCOLOR   ="white"
  D2LEGTXTTYPE     ="ChannelName"
  D2LEGTXTFREE     =""
  D2LEGSIZEGLY     =5
  D2LegTxtSize     =5
  For i=1 To 250
  D2CURVELEGDRAWT(i)="yes"
  Next
  D2LEGPOSX        =37.75
  D2LEGPOSY        =2.98
  D2LEGMOVE        ="automatic"
  D2LEGRELPOS      ="bottom left"
 
'parametrage du text de l'axe X
   Call GRAPHObjOpen("2DXAxis1_1")
    D2AXISXTXT       =T1
    D2AXISXTXTSIZE   =3
    D2AXISXTXTFONT   =""
    D2AXISXTXTCOLOR  ="blue"
    D2AXISXTXTCOLRGB =50266112
    D2AXISXTXTANG    =0
    D2AXISXTXTDELTAX =54
    D2AXISXTXTDELTAY =-5
    D2AXISXTXTBOLD   =0
    D2AXISXTXTITAL   =0
    D2AXISXTXTUNDL   =0
    D2AXISXTXTSTROUT =0
    D2AXISXTXTFRAME  =0
  Call GRAPHObjClose("2DXAxis1_1")
'parametrage du text de l'axe Y
  if R16=0 then
    GraphObjOpen("2DYAxis1_1")
    D2AxisXOffOrigin = "AxisEnd"
    D2AXISYTXT       =T2
    D2AXISYTXTSIZE   =3
    D2AXISYTXTFONT   =""
    D2AXISYTXTCOLOR  ="blue"
    D2AXISYTXTCOLRGB =50266112
    D2AXISYTXTANG    =90
    D2AXISYTXTDELTAX =4.5
    D2AXISYTXTDELTAY =60
    D2AXISYTXTBOLD   =0
    D2AXISYTXTITAL   =0
    D2AXISYTXTUNDL   =0
    D2AXISYTXTSTROUT =0
    D2AXISYTXTFRAME  =0
    D2AxisYRelPos="right"
    GraphObjClose("2DYAxis1_1")
  end if
  if R16=1 then
    Call GRAPHObjOpen("2DYAxis1_1")
    D2AXISYTXT       =T2
    D2AXISYTXTSIZE   =3
    D2AXISYTXTFONT   =""
    D2AXISYTXTCOLOR  ="blue"
    D2AXISYTXTCOLRGB =50266112
    D2AXISYTXTANG    =90
    D2AXISYTXTDELTAX =-4.5
    D2AXISYTXTDELTAY =60
    D2AXISYTXTBOLD   =0
    D2AXISYTXTITAL   =0
    D2AXISYTXTUNDL   =0
    D2AXISYTXTSTROUT =0
    D2AXISYTXTFRAME  =0
    Call GRAPHObjClose("2DYAxis1_1")
    end if
end sub
0 Kudos
Message 1 of 15
(4,970 Views)
Im using DIAdem 10.2
thank you.
0 Kudos
Message 2 of 15
(4,968 Views)
Hi c.reverte,

to scale you axis only the following parameters are necessary:

'------------------- Curve and axis definition ---------------------
Call GraphObjOpen("2D-Axis1")
  '------------------- Axis parameters --------------------------
  '------------------- X scaling --------------------------------
  Call GraphObjOpen("2DXAxis8_1")
    D2AxisXDivMode   ="linear"
    D2AxisXScaleType ="manual"
    D2AxisXBegin     =0
    D2AxisXEnd       =20
    D2AxisXOrigin    =0
  Call GraphObjClose("2DXAxis8_1")
  '------------------- Y scala ----------------------------------
  Call GraphObjOpen("2DYAxis8_1")
    D2AxisYDivMode   ="linear"
    D2AxisYScaleType ="manual"
    D2AxisYBegin     =22
    D2AxisYEnd       =34
    D2AxisYOrigin    =22
  Call GraphObjClose("2DYAxis8_1")
Call GraphObjClose("2D-Axis1")


Because the other parameter are not changed you don't need to set them.

Greetings
Walter
0 Kudos
Message 3 of 15
(4,959 Views)
Thank you very much walter!
0 Kudos
Message 4 of 15
(4,955 Views)
It is possible to read the parameter's values for an axis system?
 
For exemple:
 
i have a curve on report window. I change the x-axis scaling (into "curve and axis definiion -->scaling") and i whant this value goes on a variable.
 
If u dont understand my problem, i'll redefine it.
 
Thank you.
 
 
 
0 Kudos
Message 5 of 15
(4,949 Views)
Hi,

Yes you can. The following example shows that:


Dim sMode, sType, dBegin, dEnd, sOrigin
Call GraphObjOpen("2D-Axis1")
  '------------------- Axis parameters --------------------------
  Call GraphObjOpen("2DYAxis8_1")
   
sMode   = D2AxisYDivMode   ="linear"
    sType   = D2AxisYScaleType
   
dBegin  = D2AxisYBegin 
    sEnd    = D2AxisYEnd      
   
sOrigin = D2AxisYOrigin
  Call GraphObjClose("2DYAxis8_1")
Call GraphObjClose("2D-Axis1")


Greetings
Walter
0 Kudos
Message 6 of 15
(4,944 Views)
But i cant modifie the report (scaling,..) when my program run.
how take the hand when it run??
0 Kudos
Message 7 of 15
(4,941 Views)

Hi

How can i take the hand durring program runs?

When my program runs i whant to sleep him and work on my report sheet. After i whant to wake up him.

Actually, for modifie my report sheet i must to wait that my programm quit.

If u dont understand me i'll redefine my question.

Thank you.

0 Kudos
Message 8 of 15
(4,921 Views)
Hi,

Maybe I don't understand your question correct, but if a VBScript is running it is not possible to act interactively.

Greetings
Walter
0 Kudos
Message 9 of 15
(4,914 Views)
Ok,
Ihave a prgm wich creat a report
After this creation the prgm is closed
Iwhant to change scalling (for exemple)
i whant to create a prgm wich read new axis parameters:
 
 
 
Dim sMode, sType, dBegin, dEnd, sOrigin
Call GraphObjOpen("2D-Axis1")
  '------------------- Axis parameters --------------------------
  Call GraphObjOpen("2DYAxis8_1")
    sMode   =
D2AxisYDivMode   ="linear"
    sType   = D2AxisYScaleType
   
dBegin  =
D2AxisYBegin 
    sEnd    = D2AxisYEnd      
   
sOrigin =
D2AxisYOrigin
  Call GraphObjClose("2DYAxis8_1")
Call GraphObjClose("2D-Axis1")

But it said: "2D-Axis1" unkown or not open.

If i call GraphObjNew the error disapear but it reset axis? no?

i think i must load axis name from first prgm. but i dont know how.

 

Sry again for my english 🙂

Thank you very much.

 


0 Kudos
Message 10 of 15
(4,912 Views)