Object: DrawingEvents

DIAdem 2018 Help


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

DOWNLOAD (Windows Only)


DIAdem 2015 Help
DIAdem 2017 Help
DIAdem 2018 Help
DIAdem 2019 Help
DIAdem 2020 Help

The DrawingEvents object provides the events when drawing a REPORT object.

Note  To test the example script, you must first save the script and register it as a user command in the dialog box that opens when you select Settings»Extensions»User Commands.

The following example executes the user command MyOn2DCurveDrawEvent when a curve is plotted in a 2D axis system. The user command changes the display of the curve which DIAdem is plotting and displays the associated worksheet, the axis system, and the curve. The user command is only executed if you use the Enable for CurveExpansionSettings property to enable the expansion mode:

Report.Events.Drawing.OnAxisSystem2DCurve = "MyOn2DCurveDrawEvent"

Sub MyOn2DCurveDrawEvent(Context, CurrCurve)
  Dim oMyAxis, oMyCurve
  Set oMyAxis = Context.AxisSystem
  Set oMyCurve = CurrCurve
  Report.Settings.CurveExpansion.Enable = True
  Select Case oMyCurve.ShapeType
    Case e2DShapeLine
      oMyCurve.Shape.Settings.Line.Color.SetPredefinedColor(ePredefinedColorDarkTurquoise)
    Case e2DShapeLineAndPoints
      oMyCurve.Shape.Settings.Line.Color.SetPredefinedColor(ePredefinedColorDarkTurquoise)
    Case e2DShapeSpikes
      oMyCurve.Shape.Settings.Line.Color.SetPredefinedColor(ePredefinedColorDarkTurquoise)
    Case e2DShapeBars
      oMyCurve.Shape.Settings.BorderLine.Color.SetPredefinedColor(ePredefinedColorDarkTurquoise)
    Case e2DShapeOutlineBars
      oMyCurve.Shape.Settings.Line.Color.SetPredefinedColor(ePredefinedColorDarkTurquoise)
    Case e2DShapeDifferential
      oMyCurve.Shape.Settings.BorderLine.Color.SetPredefinedColor(ePredefinedColorDarkTurquoise)
    Case e2DShapeConstant
      oMyCurve.Shape.Settings.Line.Color.SetPredefinedColor(ePredefinedColorDarkTurquoise)
    Case e2DShapeSpikesHorizontal
      oMyCurve.Shape.Settings.Line.Color.SetPredefinedColor(ePredefinedColorDarkTurquoise)
    Case e2DShapeBarsHorizontal
      oMyCurve.Shape.Settings.BorderLine.Color.SetPredefinedColor(ePredefinedColorDarkTurquoise)
    Case e2DShapeOutlineBarsHorizontal
      oMyCurve.Shape.Settings.Line.Color.SetPredefinedColor(ePredefinedColorDarkTurquoise)
    Case e2DShapeSpecialCombination
      oMyCurve.Shape.Settings.Line.Color.SetPredefinedColor(ePredefinedColorDarkTurquoise)
    Case e2DShapeCoordinate
      oMyCurve.Shape.Settings.MarkerBorderLine.Color.SetPredefinedColor(ePredefinedColorDarkTurquoise)
    Case e2DShapeFilledArea
      oMyCurve.Shape.Settings.Line.Color.SetPredefinedColor(ePredefinedColorDarkTurquoise)
  End select
  
  Call MsgBox("Sheet: " & Context.Sheet.Name & VBCrLf & "Axis system: " & oMyAxis.Name & "Curve name: " & oMyCurve.Name)
End Sub

Returned From

Events.Drawing

WAS THIS ARTICLE HELPFUL?

Not Helpful