Object: 2DCoordinateSettings
- Updated2024-09-12
- 2 minute(s) read
(2DAxisSystem | Collections) > 2DCurves > 2DCurve > 2DCoordinate > Object: 2DCoordinateSettings
Object: 2DCoordinateSettings
The 2DCoordinateSettings object provides the curve parameter properties of a 2D axis system in the Coordinate display mode in DIAdem REPORT.
The following example generates a 2D axis system with a curve, determines the maximum y-value of this curve, and displays the coordinates of this point in a comment:
| VBScript | Python |
Dim oMy2DAxisSystem, oMyCurveLine, oMyPos, oMyShape, oMyCurveCoord, oMyCoordShape, oMyCoordComment, MaxValX, MaxValY Call Report.NewLayout() Set oMy2DAxisSystem = Report.ActiveSheet.Objects.Add(eReportObject2DAxisSystem,"My2DAxisSystem") Set oMyCurveLine = oMy2DAxisSystem.Curves2D.Add(e2DShapeLine,"My2DCurveLine") Set oMyPos = oMy2DAxisSystem.Position.ByCoordinate oMyPos.X1 = 20 oMyPos.X2 = 80 oMyPos.Y1 = 20 oMyPos.Y2 = 80 Set oMyShape = oMyCurveLine.Shape oMyShape.XChannel.Reference = "[1]/[1]" oMyShape.YChannel.Reference = "[1]/[2]" Set oMyCurveCoord = oMy2DAxisSystem.Curves2D.Add(e2DShapeCoordinate,"My2DCurveCoord") MaxValY = Data.GetChannel("[1]/[2]").Properties("maximum").Value MaxValX = Data.GetChannel("[1]/[1]").Values(PNo("[1]/[2]", MaxValY)) Set oMyCoordShape = oMyCurveCoord.Shape oMyCoordShape.BoundingType = eCoordinateChannelBounded oMyCoordShape.BoundingPosition =e2DCoordinateBoundingAbsoluteMax oMyCoordShape.BoundingXChannel.Reference = "[1]/[1]" oMyCoordShape.BoundingyChannel.Reference = "[1]/[2]" Set oMyCoordComment = oMyCoordShape.Extensions.CoordinateComment oMyCoordShape.Settings.Type = eMarkerCircle oMyCoordComment.Arrow.SymbolBegin = eArrowHeadPoint oMyCoordComment.Arrow.SymbolEnd = eArrowHeadStandardArrow oMyCoordComment.Arrow.Line.LineType = eLineTypeSolid oMyCoordShape.Settings.Size = 2 Call oMyCoordShape.Settings.MarkerFilling.SetPredefinedColor(eColorIndexDarkBlue) oMyCoordShape.XCoordinate.Reference = MaxValX oMyCoordShape.YCoordinate.Reference = MaxValY oMyCoordComment.Visible = True oMyCoordComment.Position.OffsetX = 20 oMyCoordComment.Position.OffsetY = 10 oMyCoordComment.Position.Width = 25 oMyCoordComment.Position.Height = 8 oMyCoordComment.Comment.Text = "Max. X: " & MaxValX & vbCrLf & "Max. Y: " & MaxValY Call Report.Refresh()
Properties
MarkerBorderLine | MarkerFilling | Palette | Size | Type | UseCurveExpansion