DIAdem Help

Method: Item for OrderLines

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

Method: Item for OrderLines

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

Set oOrderLine = Object.Item(NameOrIndex)
ObjectOrderLines
Object with this method
NameOrIndexVariant
Specifies the name or the index of the specific order line.
oOrderLineOrderLine
Returned object

Note  You can always omit the Item method because it is the standard element of the collection.
The following example creates a cascade display and inserts six order lines:

VBScriptPython

 

Call Data.Root.Clear()
Call DataFileLoad(ProgramDrv & "Examples\Data\cascade.tdm","TDM","")
Dim oMyDisplayObj, oMyCascadeCurve, i
Call View.NewLayout
View.Sheets(1).Areas(1).DisplayObjType = "Cascade" 
Set oMyDisplayObj = View.Sheets(1).Areas(1).DisplayObj 
Set oMyCascadeCurve = oMyDisplayObj.CurvesCascade.AddCascade("[2]/[1]","[2]/[2]","[2]/[3]")
oMyCascadeCurve.OrderChannelName = "[1]/[11]"
For i = 1 to 6
  Call oMyCascadeCurve.OrderLines.Add(i)
  oMyCascadeCurve.OrderLines.Item(i).Color = "blue"
Next