DIAdem Help

Method: Remove for AssignmentList <Data>

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

Method: Remove for AssignmentList <Data>

Deletes an assignment from the assignment list of an assignment channel in the script interface for internal data.

Object.Remove(Index)
ObjectAssignmentList <Data>
Object with this method
IndexVariant
Specifies the index or the text value (property Value) of the assignment to be deleted.

Note  DIAdem always orders the list of assignments in the ascending order of the Definition property. If you used the methods Add or Remove to change the list of assignments, the index no longer corresponds with the previous position of the assignment in the list.

The following example generates an assignment channel with three assignments and then deletes the second assignment:

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 oMyAssgnList.Remove(2)