DIAdem Help

Object: Constant

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

Object: Constant

The Constant object provides a constant in a 2D axis system in DIAdem VIEW. Use this object to specify the properties of the 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"

Returned From

Constants.Add | Constants.Item