DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Display error 2d axis system in report

Hello everyone,

 

i would like to use four edit boxes in a user dialog to enter the start value and end value for the X-Axis and the min. and max. value for the Y-Axis and output them in a report. If I only enter the values for the X-Axis or the Y-Axis, then the axes are adjusted in each case (attach). However, as soon as I enter the values for the X-Axis and Y-Axis, the Y-Axis is shifted (attach). Has anyone a similar problem?

 

Here ist the script:

 

If Len(XAxisStartBox.Lines(1).Text) <> 0 and Len(XAxisEndBox.Lines(1).Text) <> 0 Then


Set oMyScaling = o2DAxisSystem.XAxis.Scaling
Call o2DAxisSystem.UpdateScaling()
oMyScaling.AutoScalingType = eAxisAutoScalingManual
oMyScaling.Type = e2DYScalingLinear
oMyScaling.Begin = CInt(XAxisStartBox.Lines(1).Text)
oMyScaling.End = CInt(XAxisEndBox.Lines(1).Text)


End If

 

If Len(YAxisStartBox.Lines(1).Text) <> 0 and Len(YAxisEndBox.Lines(1).Text) <> 0 Then


Set oMyScaling = o2DAxisSystem.YAxis.Scaling
Call o2DAxisSystem.UpdateScaling()
oMyScaling.AutoScalingType = eAxisAutoScalingManual
oMyScaling.Type = e2DYScalingLinear
oMyScaling.Begin = CInt(YAxisStartBox.Lines(1).Text)
oMyScaling.End = CInt(YAxisEndBox.Lines(1).Text)


End If

 

Call o2DAxisSystem.UpdateScaling()
Call Report.Refresh()

 

Thanks a lot.

 

Greetings

Alexander 

0 Kudos
Message 1 of 3
(1,302 Views)

Hello Alexander,

 

If you set the scaling for X and Y axis manually, you must also set the Origin point (crossing point of X and Y axis). If you only set one axis (X or Y) manually then the Origin is automatically calculated.

 

Greetings

Walter

0 Kudos
Message 2 of 3
(1,255 Views)

Hello Walter,

 

thank you for your help!

 

 

Greetings

Alexander 

0 Kudos
Message 3 of 3
(1,250 Views)