DIAdem Help

Method: Exists for ContextParameters

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

Method: Exists for ContextParameters

Checks, whether the context parameter with the specified name already exists.

bExists = Object.Exists(Name)
ObjectContextParameters
Object with this method
NameString
Specifies the name of the context parameter.
bExistsBoolean
The value is TRUE if the context parameter with the specified name already exists.

The following example generates a set with two context parameters and checks, whether the StringParameter context parameter already exists:

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)
'Checking if parameter exists
Call MsgBoxDisp(oMyParameters.Exists("StringParameter"))