DIAdem Help

Method: Remove for Channels

  • Updated2024-09-12
  • 1 minute(s) read

Method: Remove for Channels

Deletes a y-channel to a 2D axis system in the display mode Stacked Bars or Grouped Bars in DIAdem-REPORT.

Object.Remove(Index)
ObjectChannels
Object with this method
IndexLongInteger
Specifies the index of the y-channel to be deleted.

The following example generates a 2D axis system with grouped bars and then deletes the first y-channel:

VBScriptPython

 

Dim oMy2DAxisSystem, oMyPos, oMy2DCurve
Call Data.Root.Clear()
Call DataFileLoad("Example.tdm","TDM","")

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 oMy2DCurve = oMy2DaxisSystem.Curves2D.Add(e2DShapeGroupedBars, "MyNew2DCurve")
oMy2DCurve.Shape.XChannel.Reference = ""
oMy2DCurve.Shape.YChannels.Add("[4]/[1]") 
oMy2DCurve.Shape.YChannels.Add("[4]/[2]") 
oMy2DCurve.Shape.YChannels.Add("[4]/[3]") 

oMy2DCurve.Shape.YChannels.Remove(1)

Call Report.Refresh()