Keysight Pathwave 89600 VSA .NET API
MeasurementData Method
See Also  Example
Agilent.SA.Vsa.Interfaces Assembly > Agilent.SA.Vsa Namespace > Measurement Class : MeasurementData Method


dataName
The data name.

Glossary Item Box

Returns the measurement data for the passed data name.

Syntax

Visual Basic (Declaration) 
Public MustOverride Function MeasurementData( _
   ByVal dataName As String _
) As MeasurementData
C# 
public abstract MeasurementData MeasurementData( 
   string dataName
)
C++/CLI 
public:
abstract MeasurementData^ MeasurementData( 
   String^ dataName
) 

Parameters

dataName
The data name.

Return Value

Returns the measurement data if the data name is valid, otherwise null.

Remarks

Each call to this method returns a newly allocated instance of the MeasurementData class. This new instance has an infinite lifetime in the server process until the client notifies the server that it is done using the instance. This notification is provided by calling the Dispose() method on the returned instance. Failure to call Dispose() on returned instances will lead to unchecked memory growth in the server process as more instances are created.

The recommended pattern for using the MeasurementData() method is shown in the Examples section.

Example

C#Copy Code
using (MeasurementData data = app.Measurements.SelectedItem.MeasurementData("Syms/Errs1"))
{
    if (data != null)
    {
        string[] summaryNames = data.SummaryNames;
        for (int i = 0; i < summaryNames.Length; i++)
        {
            object summaryData = data.Summary(i);
            if (summaryData != null)
            {
                // do something with the data...
            }
        }
    }
}
VB.NETCopy Code
Dim data As MeasurementData
        
data = app.Measurements.SelectedItem.MeasurementData("Syms/Errs1")
If (Not (IsNothing(data))) Then
    Try
        Dim summaryNames As String() = data.SummaryNames
        For i As Integer = 0 To summaryNames.Length - 1
            Dim summaryData = data.Summary(i)
            If (Not (IsNothing(summaryData))) Then
                ' do something with the data
            End If
        Next
    Finally
        DirectCast(data, IDisposable).Dispose()
    End Try
End If

Requirements

Target Platforms: Windows 11 Professional or Enterprise; Windows 10 Professional, Enterprise, or Education (64-bit)

See Also