ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

DIAdemヘルプ

Collection: AssignmentList <Data>

  • 更新日2024-09-12
  • 4分で読める

Collection: AssignmentList <Data>

Collection of the assignments of an assignment channel in the script interface for internal data.

The following example generates an assignment channel with three assignments and displays the value ranges and the associated texts:

VBScriptPython

 

Dim oMyGrp, oMyChn, oMyAssgnList, Assignment, vRange
Set oMyGrp = Data.Root.ChannelGroups(1)
Set oMyChn = oMyGrp.Channels.AddAssignmentChannel("MyAssignmentChn","Default Value")
Set oMyAssgnList = oMyChn.AssignmentList
Call oMyAssgnList.Add("text1",Array(1,2))
Call oMyAssgnList.Add("text2",Array(3,4))
Call oMyAssgnList.Add("text3",Array(5,6))
For Each Assignment in oMyAssgnList
  vRange = Assignment.DefinitionRange
  Call MsgBoxDisp("Range " & vRange(0) & " - " & vRange(1) & ": " & Assignment.Value)
Next