DIAdem Help

Method: Add for Sheets

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

Method: Add for Sheets

Adds an object to the Sheets collection and returns a Sheet object, in the script interface of DIAdem VIEW.

Set oSheet = Object.Add(Name)
ObjectSheets
Object with this method
NameString
Specifies the name of the new worksheet.
oSheetSheet
Returned object

The following example illustrates how you can add worksheets, curves, legend entries, table columns, or table titles:

VBScriptPython

 

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")