12-23-2021 04:22 PM
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
01-03-2022 03:27 AM
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
01-03-2022 01:15 PM
Hello Walter,
thank you for your help!
Greetings
Alexander