Method: Exists for ContextParameters
- Updated2024-09-12
- 1 minute(s) read
DIAdem NAVIGATOR > Methods > Method: Exists for ContextParameters
Method: Exists for ContextParameters
Checks, whether the context parameter with the specified name already exists.
bExists = Object.Exists(Name)
| Object | ContextParameters Object with this method |
| Name | String Specifies the name of the context parameter. |
| bExists | Boolean 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:
| VBScript | Python |
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"))