Showing results for 
Search instead for 
Did you mean: 

Displaying a measurement on a Graph.

Go to solution

I’m drawing a blank and can’t find what I need to do in the search.

I am using :





To detect the starting point of a measurement. I am using this detection point and offsetting this starting location to do a 3-point measurement, and averaging those numbers.


  FRET=ChD(FRE,"Smoothed_MotorA Postion")


  LRE=ChD(i,"PulseStartChnLine")+0400  '

  LRET=ChD(LRE,"Smoothed_MotorA Postion")


  LRE=ChD(i,"PulseStartChnLine")+0600  '

  LRET=ChD(LRE,"Smoothed_MotorA Postion")



IS there a way to display the three points that I will be using for the average on the Graph?


Thank you in advance for any help


0 Kudos
Message 1 of 3
Accepted by topic author Spidermansrevenge
05-01-2019 08:57 AM

If I understand correctly, you're looking to add markers for specific coordinates to show which three points are being used on a 2D-axis system. If that's the case, the following example may be helpful to see how that can be done. It first creates a 2D-axis system and plots example data on it, and then starting at line 18 defines a coordinate and places it where the maximum value occurs. It should be relatively straightforward to modify it to reference an existing graph and add multiple coordinates:


Dim oMy2DAxisSystem, oMyCurveLine, oMyPos, oMyShape, oMyCurveCoord, oMyCoordShape, 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]"
oMyCoordShape.Settings.Type = eMarkerCircle
oMyCoordShape.Settings.Size = 2

Call oMyCoordShape.Settings.MarkerFilling.SetPredefinedColor(eColorIndexDarkBlue)

oMyCoordShape.XCoordinate.Reference = MaxValX
oMyCoordShape.YCoordinate.Reference = MaxValY

Call Report.Refresh()

Let me know if I misinterpreted your question!


Message 2 of 3

Thanks You so much for your help JustNI !


You nailed it !

0 Kudos
Message 3 of 3