DIAdem Help

Method: FindByValue for AssignmentList <Data>

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

Method: FindByValue for AssignmentList <Data>

Uses the text to determine an assignment of texts to values in the script interface for internal data.

Set oAssignment = Object.FindByValue(Value)
ObjectAssignmentList <Data>
Object with this method
ValueString
Specifies the text value of an assignment to which DIAdem determines the associated value definition.
oAssignmentAssignment <Data>
Returned object

The following example generates an assignment channel with three assignments and displays the definition value of the assignment which contains the Text text2:

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.FindByValue("text2").Definition)

Log in to get a better experience