DIAdem Help

Collection: Constants

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

Collection: Constants

The Constants object provides a collection of all Constants in a 2D axis system in DIAdem VIEW. Use the Constants collection to delete constants or to add new constants.

The following example generates a 2D axis system with a curve and an x-constant and a y-constant:

VBScriptPython

 

Dim oMySheet, oMyChart, oMyCurve, oMyConstX, oMyConstY
Call Data.Root.Clear()
Call DataFileLoad("Example.tdm")
Call View.NewLayout()
Set oMySheet = View.ActiveSheet
oMySheet.ActiveArea.DisplayObjType = "CurveChart2D"
Set oMyChart = View.ActiveSheet.ActiveArea.DisplayObj
Set oMyCurve = oMyChart.Curves2D.Add("[1]/[1]","[1]/[2]")
Set oMyConstX = oMyChart.Constants.Add("30",0) 
oMyConstX.Color = "red" 
Set oMyConstY = oMyChart.Constants.Add("20",1) 
oMyConstY.Color = "green"

Properties

Count

Methods

Add | Item | Remove | RemoveAll

Returned From

CurveChart2D.Constants