User manual

Table Of Contents
Part 2: Automation Programming Reference
Accessing Out.Result Objects
These instructions apply to items that appear when selecting an object from a Result Interface folder in
XStreamBrowser.
For each level of the object hierarchy up to but not including the item’s parent object, create an object
variable using the syntax:
<handle> = Object.Item('<object>')
For example, the following lines of code drill into the P1 object hierarchy up to the parent "Out.Result":
meas = app.Object.Item('Measure');
p1 = meas.Object.Item('P1');
Create an object variable for "Out.Result" using this syntax:
p1_results = p1.Out.Result
To read properties within the Out.Result object, use either of the following:
p1_<handle> = p1_results.<property>
p1 = get(p1_results,'<property>')
For example, to read the Value property:
p1_val = p1_results.Value
Or
p1 = get(p1_results,'Value')
To read back multi-valued items such as ValueArray and DataArray, use the get function:
P1_array = get(p1_results, 'ValueArray', -1, 0, 1)
C1_data = get(c1_results, 'DataArray', -1, -1, 0, 1)
ValueArray, which returns all measured values for a parameter, and DataArray, which returns waveform
data, are actually interfaces that require several arguments to determine the number of values to return,
what kind of values, etc. See ValueArray and DataArray.
2-49