Can I Plot Multiple Vertical or Horizontal Lines in DIAdem VIEW Panel?

Updated Dec 17, 2018

Reported In

Software

  • DIAdem

Issue Details

I'm using the DIAdem VIEW panel to plot my data. I currently use the crosshair cursor to highlight specific points in my plot. Can I place multiple constant lines on my 2D axis system, either horizontal to highlight a limit threshold or vertical to highlight points like maximum, minimum or where that limit threshold is crossed?

Solution

The DIAdem VIEW panel has the ability to plot horizontal or vertical constant lines in 2D Axis Systems.
  1. Double click the 2D Axis System or right-click on it and select Display... to get to the 2D Axis System Display dialog box.
  2. Select Constants...
  1. Click the New Entry button (+) to add a constant to the Axis System. You can add Y constants to set constant horizontal lines at a given Y-value or X constants to set constant vertical lines at a given X-value.
    • The screenshot below shows the constants for the screenshot in the Issue Details section. Here, we want to highlight where the Speed channel goes above 40 m/s. We set the Y constant 40 to show the threshold, then use the Curve Cursor to interactively find where the Speed channel is closest to 40 (39.96 m/s at time 13.688 seconds). Then we can set an X constant at 13.688 seconds.


The DIAdem REPORT panel has more options for types of plots, specifically a Constant plot type. This plot type can plot a single value as a horizontal line, vertical line, or combination of both. This can also be used to highlight specific points, thresholds, or limits.
  1. From a 2D Axis System already displaying a plot you want to add constants to, double click the 2D Axis System or right-click on it and select Display... to get to the 2D Axis System Curve and Axis Definition dialog box.
  2. Click the New Entry button (+), and select the Constant plot type. Set the values for the Constants you want to use to highlight a point of interest. In this case, we set the values to the same Y-constant of 40 m/s and X-Constant 13.688 s to show where the speed is closest to 40 m/s.
  1. This will display a vertical and a horizontal line at the specified values, see screenshot below.

 

Additional Information

The script below was adapted from the help documentation DIAdem Help, Constants for CurveChart2D adapted for the example above. The script

Dim oCurveObj, oMyDisplayObj, oMyConstX, oMyConstY
View.Sheets(1).Areas(1).DisplayObjType = "CurveChart2D"
Set oMyDisplayObj = View.Sheets(1).Areas(1).DisplayObj
Set oCurveObj = oMyDisplayObj.Curves2D.Add("[1]/[1]","[1]/[2]")
oCurveObj.Color = "green"
Set oMyConstX = oMyDisplayObj.Constants.Add("13.688",0) 
oMyConstX.Color = "red" 
Set oMyConstY = oMyDisplayObj.Constants.Add("40",1) 
oMyConstY.Color = "red"


The script below was adapted from the help documentation DIAdem Help, XConstant for 2DConstant. The script creates a report layout, loads data, creates a 2D axis system, plots data from the Data Portal, and plots a constant at X = 10 and Y = 20.
Dim oMy2DAxisSystem, oMyCurveLine, oMyCurveConst, oMyPos, oMySettings, oMyLineShape, oMyConstShape
Call Report.NewLayout()
Set oMy2DAxisSystem = Report.ActiveSheet.Objects.Add(eReportObject2DAxisSystem, "My2DAxisSystem")
Call Data.Root.Clear()
Call DataFileLoad(DataReadPath & "Report_Data.tdm","TDM","")
Set oMyPos = oMy2DAxisSystem.Position.ByCoordinate
oMyPos.X1 = 20
oMyPos.X2 = 80
oMyPos.Y1 = 20
oMyPos.Y2 = 80
Set oMyCurveLine = oMy2DAxisSystem.Curves2D.Add(e2DShapeLine, "MyCurve")
Set oMyLineShape = oMyCurveLine.Shape
oMyLineShape.XChannel.Reference = "[1]/[1]" 
oMyLineShape.YChannel.Reference = "[1]/[2]" 
Set oMyCurveConst = oMy2DAxisSystem.Curves2D.Add(e2DShapeConstant, "MyConstant")
Set oMyConstShape = oMyCurveConst.Shape
oMyConstShape.XConstant.Reference = 10 
oMyConstShape.YConstant.Reference = 20 
Set oMySettings = oMyCurveConst.Shape.Settings
Call oMySettings.Line.Color.SetPredefinedColor(eColorIndexBlue)
oMySettings.Line.Width = eLineWidth0100
Call Report.Refresh()

WAS THIS ARTICLE HELPFUL?

Not Helpful