AGI STK Objects 11 Send comments on this topic.
IAgDrDataSet Interface
Windows






Windows & Linux

Description

Represents a dataset element.

Public Methods

Public Method GetInternalUnitValuesGets the Internal Unit Values of the Data.
Public Method GetValuesRetrieves an array of values of the elements in the dataset.

Public Properties

Public Property CountReturns a number of elements in the dataset. Dimensionless.
Public Property ElementNameReturns a name of the dataset.
Public Property ElementTypeReturns a type of elements of the dataset. Dimensionless.
Public Property UnitTypeReturns a unit type of elements of the dataset. Dimensionless.

Example

Extract data from IAgDrDataSetCollection (generic)
[C#]Copy Code
foreach (String name in datasets.ElementNames) 

    //If the data set collection spans multiple intervals then the GetDataSetByName method will only 
    //get the first intervals dataset.  See the Extract data from IAgDrDataSetCollection across 
    //multiple intervals code snippet to see how to access all of the data sets in the result. 
    IAgDrDataSet dataset = datasets.GetDataSetByName(name); 
 
    Array datasetValues = dataset.GetValues(); 
 
    Console.WriteLine("{0}", dataset.ElementName); 
 
    foreach (object value in datasetValues) 
    { 
        Console.WriteLine("\t{0}", value.ToString()); 
    } 

 

Extract data from IAgDrDataSetCollection across multiple intervals.
[C#]Copy Code
foreach (IAgDrDataSet set in datasets) 

    Console.WriteLine("{0}", set.ElementName); 
    foreach (object value in set.GetValues()) 
    { 
        Console.WriteLine("\t{0}", value.ToString()); 
    } 

 

Extract data from IAgDrDataSetCollection (generic)
[Visual Basic .NET]Copy Code
For Each name As [String] In datasets.ElementNames
    'If the data set collection spans multiple intervals then the GetDataSetByName method will only
    'get the first intervals dataset. See the Extract data from IAgDrDataSetCollection across
    'multiple intervals code snippet to see how to access all of the data sets in the result.
    Dim dataset As IAgDrDataSet = datasets.GetDataSetByName(name)

    Dim datasetValues As Array = dataset.GetValues()

    Console.WriteLine("{0}", dataset.ElementName)

    For Each value As Object In datasetValues
        Console.WriteLine(vbTab & "{0}", value.ToString())
    Next
Next

Extract data from IAgDrDataSetCollection across multiple intervals.
[Visual Basic .NET]Copy Code
For Each [set] As IAgDrDataSet In datasets
    Console.WriteLine("{0}", [set].ElementName)
    For Each value As Object In [set].GetValues()
        Console.WriteLine(vbTab & "{0}", value.ToString())
    Next
Next

© 2018 Analytical Graphics, Inc. All Rights Reserved.