DIAdem Help

Method: Exists for AssignmentList <Data>

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

Method: Exists for AssignmentList <Data>

Checks in the script interface for internal data whether an assignment with the specified text value already exists in an assignment channel.

bExists = Object.Exists(Value)
ObjectAssignmentList <Data>
Object with this method
ValueString
Specifies which text value of the assignment to check.
bExistsBoolean
The value is TRUE if an assignment with the specified text value already exists.

The following example generates an assignment channel with three assignments and displays whether an assignment with the textual value text2 already exists:

VBScriptPython

 

Dim oMyGrp, oMyChn, oMyAssgnList 
Set oMyGrp = Data.Root.ChannelGroups(1)
Set oMyChn = oMyGrp.Channels.AddAssignmentChannel("MyAssignmentChn","Default Value")
Set oMyAssgnList = oMyChn.AssignmentList
Call oMyAssgnList.Add("text1",1)
Call oMyAssgnList.Add("text2",2)
Call oMyAssgnList.Add("text3",3)
Call MsgBoxDisp(oMyAssgnList.Exists("text2"))