Quantcast
Channel: DIAdem topics
Viewing all articles
Browse latest Browse all 3197

VIEW: Adjust YScaling Bug

$
0
0

Hello,

 

I want to report a Bug which concerns the View-Module.

 

I've faced this bug in DIAdem 2021 as well as 2018.

 

If I want to adjust the Y-Axis in a Curve Chart manually, I can use the following Code provided from the DIAdem help:

 

View.Sheets(1).Areas(1).DisplayObjType = "CurveChart2D"Dim oMyChart: Set oMyChart = View.Sheets(1).Areas(1).DisplayObjCall oMyChart.Curves2D.Add("[1]/[1]","[1]/[2]")
oMyChart.YScaling = "1 system [phys.]"
oMyChart.YScalingMode = "manual"
oMyChart.YScalingBegin = 0
oMyChart.YScalingEnd = 10

however this only works if a new Chart is added 

Call oMyChart.Curved2d.Add(...)

if this line is outcommented and an already existing Curve should be scaled, the script does not work.

 

 

 

Here is another example to adjust the Y-Axis of an already existing Curve, which was Shift-copied from the View:

Dim oDisplayObj Set oDisplayObj = View.Sheets("Blatt 1").Areas("Area : 1").DisplayObj '------------------- 2DAxisSystem ------------------------------ oDisplayObj.AxisLabeling = true oDisplayObj.DateTimeRepresentation = eDateTimeRepresentationLegacy oDisplayObj.YScalingMode = "manual" oDisplayObj.YScalingBegin = 0 oDisplayObj.YScalingEnd = 50 oDisplayObj.Abscissa = "X-Cursor" oDisplayObj.Ordinate = "Y-Cursor" Dim oCurves 'Set oDisplayObj = View.Sheets("Blatt 1").Areas("Area : 1").DisplayObj.Curves2D Set oCurves = oDisplayObj.Curves2D '------------------- Curves2D ------------------------------ oCurves.Item(1).ColorRGB = 3618785

 

this script adjusts the Y-Axis for an existing Curve but will only work consistently if the last line of Code

oCurves.Item(1).ColorRGB = ...

is executed.

 

Is there an easier and more cosistent way to adjust the Y-Axis of an already existing Curve (for the View Module)?

Thanks in advanced


Viewing all articles
Browse latest Browse all 3197

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>