DIAdem Help

Method: Item for Segments

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

Method: Item for Segments

Returns the Segment object associated with a specific name or index in DIAdem VIEW.

Set oSegment = Object.Item(NameOrIndex)
ObjectSegments
Object with this method
NameOrIndexVariant
Specifies the name or the index of the specified segment.
oSegmentSegment
Returned object
Note  You can always omit the Item method because it is the standard element of the collection.

The following example displays a message with the name of the x-channel of the first segment. The second line of the example is the simplified form of the first line. The DisplayObj must be a CurveChart2D type.

VBScriptPython

 

Call MsgBoxDisp("Name of first x-channel: " & View.ActiveSheet.ActiveArea.DisplayObj.Segments.Item(1).XChannelName)
Call MsgBoxDisp("Name of first x-channel: " & View.ActiveSheet.ActiveArea.DisplayObj.Segments(1).XChannelName)