Method: Add for HeaderItems
- Updated2024-09-12
- 1 minute(s) read
DIAdem VIEW > Methods > Method: Add for HeaderItems
Method: Add for HeaderItems
Adds an object to the HeaderItem collection and returns a HeaderItems object in the script interface of DIAdem VIEW.
Set oHeaderItem = Object.Add(AttrName)
| Object | HeaderItems Object with this method |
| AttrName | String Specifies the name of the channel property to be displayed in the table title. |
| oHeaderItem | HeaderItem Returned object |
The following example illustrates how you can add worksheets, curves, legend entries, table columns, or table titles:
| VBScript | Python |
Call View.Sheets.RemoveAll() Dim oMySheet: Set oMySheet = View.Sheets.Add("NewSheet") Dim oOldArea: Set oOldArea = oMySheet.ActiveArea oOldArea.DisplayObjType = "CurveChart2D" Call oOldArea.DisplayObj.Curves2D.Add("[1]/[1]","[1]/[3]") Call oOldArea.DisplayObj.LegendItems.Add("Name") Dim oNewArea: Set oNewArea = oMySheet.ActiveArea.SplitTop("NewArea",0.5) oNewArea.DisplayObjType = "ChannelTable" Call oNewArea.DisplayObj.Columns.Add(3) Call oNewArea.DisplayObj.HeaderItems.Add("Name")