DIAdem Help

Method: Item for ContextParameters

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

Method: Item for ContextParameters

Returns the ContextParameter object associated with a specific name or with a specific index.

Set oContextParameter = Object.Item(NameOrIndex)
ObjectContextParameters
Object with this method
NameOrIndexVariant
Specifies the name or the index of the context parameter.
oContextParameterContextParameter
Returned object

The following example generates a set with two context parameters and displays the name of the second context parameter:

VBScriptPython

 

Dim oMyDataStore
Set oMyDataStore = Navigator.ConnectDataStore("MyASAMServer")
'Generating parameter set
Dim oMyParameterSet
Set oMyParameterSet = Navigator.Settings.CreateContextParameterSet
oMyParameterSet.Name = "MyParameterSet"
'Generating parameters and writing parameters into parameter set
Dim OMyParameters
Set oMyParameters = oMyParameterSet.Parameters
Call oMyParameters.Add("DoubleParameter",1.2345,DataTypeFloat64)
Call oMyParameters.Add("StringParameter","Parameter",DataTypeString)
'Displaying second parameter name
Call MsgBoxDisp(oMyParameters.Item(2).Name)