DIAdem Help

Method: FindByDefinition for AssignmentList <Data>

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

Method: FindByDefinition for AssignmentList <Data>

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

Set oAssignment = Object.FindByDefinition(Definition)
ObjectAssignmentList <Data>
Object with this method
DefinitionVariant
Specifies the numeric value to which DIAdem determines the associated text value.
oAssignmentAssignment <Data>
Returned object

The following example generates an assignment channel with three assignments and displays the text which is assigned to the value 2:

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.FindByDefinition(2).Value)

Log in to get a better experience