Method: Add for Columns
- Updated2024-09-12
- 1 minute(s) read
DIAdem VIEW > Methods > Method: Add for Columns
Method: Add for Columns
Adds an object to the Columns collection and returns a Column object in the script interface of DIAdem VIEW.
Set oColumn = Object.Add(NameOrNo)
| Object | Columns Object with this method |
| NameOrNo | Variant Specifies the number or the name of the channel to be displayed. |
| oColumn | Column 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")