Object: AdditionalComment

DIAdem 2018 Help


Edition Date: June 2018
Part Number: 370858P-01
View Product Info

DOWNLOAD (Windows Only)


DIAdem 2012 Help
DIAdem 2014 Help
DIAdem 2015 Help
DIAdem 2017 Help
DIAdem 2018 Help
DIAdem 2019 Help

The AdditionalComment object provides an additional comment in the 2D and 3D display mode Coordinate 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:

Dim oMy2DAxisSystem, oMyPos, oMyCurveShape, oMyCurveLine, oMyCoordShape, oMyCurveCoord
Dim MaxValX, MaxValY, oMyCoordCommArrow, oMyCoordComment, oMyCoordCommPosition
Call Report.NewLayout()
Set oMy2DAxisSystem = Report.ActiveSheet.Objects.Add(eReportObject2DAxisSystem,"My2DAxisSystem")
Set oMyPos = oMy2DAxisSystem.Position.ByCoordinate
oMyPos.X1 = 20
oMyPos.X2 = 80
oMyPos.Y1 = 20
oMyPos.Y2 = 80
Set oMyCurveLine = oMy2DAxisSystem.Curves2D.Add(e2DShapeLine,"My2DCurveLine")
Set oMyCurveShape = oMyCurveLine.Shape
oMyCurveShape.XChannel.Reference = "[1]/[1]" 
oMyCurveShape.YChannel.Reference = "[1]/[2]"

Set oMyCurveCoord = oMy2DAxisSystem.Curves2D.Add(e2DShapeCoordinate,"My2DCurveCoord")
Set oMyCoordShape = oMyCurveCoord.Shape
oMyCoordShape.BoundingType = eCoordinateChannelBounded
oMyCoordShape.BoundingPosition = e2DCoordinateBoundingAbsoluteMax 
oMyCoordShape.BoundingXChannel.Reference = "[1]/[1]"
oMyCoordShape.BoundingyChannel.Reference = "[1]/[2]"

oMyCoordShape.Settings.Type = eMarkerCircle
Set oMyCoordComment = oMyCoordShape.Extensions.CoordinateComment
Set oMyCoordCommArrow = oMyCoordComment.Arrow
oMyCoordCommArrow.SymbolBegin = eArrowHeadPoint
oMyCoordCommArrow.SymbolEnd = eArrowHeadStandardArrow
oMyCoordCommArrow.Line.LineType = eLineTypeSolid
oMyCoordShape.Settings.Size = 2
Call oMyCoordShape.Settings.MarkerFilling.SetPredefinedColor(eColorIndexDarkBlue)

MaxValY = Data.GetChannel("[1]/[2]").Properties("maximum").Value
MaxValX = Data.GetChannel("[1]/[1]").Values(PNo("[1]/[2]", MaxValY))
oMyCoordShape.XCoordinate.Reference = MaxValX
oMyCoordShape.YCoordinate.Reference = MaxValY
oMyCoordComment.Visible = True
Set oMyCoordCommPosition = oMyCoordComment.Position
oMyCoordCommPosition.OffsetX = 20
oMyCoordCommPosition.OffsetY = 10
oMyCoordCommPosition.Width = 25
oMyCoordCommPosition.Height = 8

oMyCoordComment.Comment.Text = "Max. X: " & MaxValX & vbCrLf & "Max. Y: " & MaxValY
Call Report.Refresh()

Properties

Arrow | Comment | Position | Visible

WAS THIS ARTICLE HELPFUL?

Not Helpful