DIAdem Help

Content Type
Programming Language
Current manual
Table of Contents

Property: DefinitionRange for Assignment <Data>

Property: DefinitionRange for Assignment <Data>

Specifies the value range of a channel to which a specific text value is assigned, in the script interface for internal data. A text value (property Value) is assigned to a numeric value (property Definition) or to a value range (property DefinitionRange) in order to define an assignment.

Object.DefinitionRange
ObjectAssignment <Data>
Object with this property
Object.DefinitionRangeVariant with read and write access
Write: Assign a visual basic array with two values, for example, Array(1,2) to the DefinitionRange property.
Read: You receive a visual basic array with two values. Assign a variable to this array in order to access the values.

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

VBScriptPython

 

Dim oMyGrp, oMyChn, oMyAssgnList, Assignment, vRange
Set oMyGrp = Data.Root.ChannelGroups(1)
Set oMyChn = oMyGrp.Channels.AddAssignmentChannel("MyAssignmentChn","Default Value", DataTypeChnFloat64, 1)
Set oMyAssgnList = oMyChn.AssignmentList
Call oMyAssgnList.Add("text1",Array(10,20))
Call oMyAssgnList.Add("text2",Array(30,40))
Call oMyAssgnList.Add("text3",Array(50,60))
For Each Assignment in oMyAssgnList
  vRange = Assignment.DefinitionRange
  Call MsgBoxDisp("Definition Range " & vRange(0) & " - " & vRange(1) & ": " & Assignment.Value)
Next
In This Section
Was this information helpful?