DIAdem Help

Method: Item for Constants

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

Method: Item for Constants

Returns the constant associated with a specific name or index as a Constant object in DIAdem VIEW.

Set oConstant = Object.Item(NameOrIndex)
ObjectConstants
Object with this method
NameOrIndexVariant
Specifies the name or the index of the specific constant.
oConstantConstant
Returned object
Note  You can always omit the Item method because it is the standard element of the collection.

The following example displays a message with the name and the direction for the first constant in a 2D axis system. The DisplayObj must be a CurveChart2D type.

VBScriptPython

 

Dim oMyConstants 
Set oMyConstants = View.ActiveSheet.ActiveArea.DisplayObj.Constants 
Call MsgBoxDisp (oMyConstants.Item(1).Name & " (Direction: " & oMyConstants(1).Direction & ")")