Object: PolarCurveDrawingContext
- Updated2024-09-12
- 2 minute(s) read
DIAdem REPORT > Objects > Context Objects > Object: PolarCurveDrawingContext
Object: PolarCurveDrawingContext
The PolarCurveDrawingContext object provides information about the polar axis system and the worksheet into which DIAdem REPORT is plotting the current curve.
![]() | 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 MyOnPolarCurveDrawEvent user command when a curve is plotted in a polar 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 receives two parameters. The first parameter corresponds to a PolarCurveDrawingContext object and provides information about the polar axis system and the worksheet into which DIAdem is plotting the curve. The second parameter corresponds to a PolarCurve object and provides information about the curve DIAdem is plotting:
Report.Events.Drawing.OnPolarSystemCurve = "MyOnPolarCurveDrawEvent" Sub MyOnPolarCurveDrawEvent(Context, CurrCurve) Dim oMyAxis, oMyCurve Set oMyAxis = Context.PolarSystem Set oMyCurve = CurrCurve Select Case oMyCurve.ShapeType Case ePolarShapeLine oMyCurve.Shape.Line.Color.SetPredefinedColor(ePredefinedColorDarkTurquoise) Case ePolarShapeLineAndPoints oMyCurve.Shape.Line.Color.SetPredefinedColor(ePredefinedColorDarkTurquoise) Case ePolarShapeSpikes oMyCurve.Shape.Spike.Color.SetPredefinedColor(ePredefinedColorDarkTurquoise) Case ePolarShapeDifferential oMyCurve.Shape.DifferentialLine.Color.SetPredefinedColor(ePredefinedColorDarkTurquoise) End Select Call MsgBox("Sheet: " & Context.Sheet.Name & VBCrLf & "Axis system: " & oMyAxis.Name & "Curve name: " & oMyCurve.Name) End Sub
