AGI STK Objects 11 Send comments on this topic.
PreData Property (IAgDataProvider)
See Also  Example





Description

The string associated with the current PreData parameter.

Property type

Read-write property

Syntax

[Visual Basic .NET]
Public Property PreData() As String

[C#]
public string PreData {get; set;}

[Managed C++]
public: __property String __gc ^ get_PreData();
public: __property void set_PreData(
String __gc ^
);

[Unmanaged C++]
public: HRESULT get_PreData(
BSTR * pRetVal
);
public: HRESULT put_PreData(
BSTR NewPreData
);

[Java]
public String getPreData();public void setPreData(
String
);

Example

Execute a time dependent group data provider which uses preData and returning the specified elements
[C#] Copy Code
Array elems = new object[] 
"Time""x""y""z" }; 
IAgDataProviderGroup dpVectorChoose = satObj.DataProviders["Vector Choose Axes"as IAgDataProviderGroup; 
IAgDataProvider groupPosition = dpVectorChoose.Group["Position"as IAgDataProvider; 
groupPosition.PreData = "Satellite/Sat2 Body"
IAgDataPrvTimeVar timeVarDP = groupPosition as IAgDataPrvTimeVar; 
IAgDrResult result = timeVarDP.ExecElements("26 Jan 2015 17:00:00.000""27 Jan 2015 17:00:00.000"120ref elems); 
IAgDrDataSetCollection datasets = result.DataSets; 
 
if (result.DataSets.Count > 0

    System.Array arrayTime = datasets[0].GetValues(); 
    System.Array arrayX = datasets[1].GetValues(); 
    System.Array arrayY = datasets[2].GetValues(); 
    System.Array arrayZ = datasets[2].GetValues(); 

 

Execute a time dependent data provider which uses preData and returning the specified elements
[C#] Copy Code
Array elems = new object[] 
"Range""Radial Rate" }; 
IAgDataPrvTimeVar RICdp = satObj.DataProviders["Relative Motion"as IAgDataPrvTimeVar; 
(RICdp as IAgDataProvider).PreData = "Satellite/Satellite123"
IAgDrResult result = RICdp.ExecElements("26 Jan 2015 17:00:00.000""27 Jan 2015 17:00:00.000"120ref elems); 
IAgDrDataSetCollection datasets = result.DataSets; 
 
if (result.DataSets.Count > 0

    System.Array arrayRange = datasets[0].GetValues(); 
    System.Array arrayRadialRate = datasets[1].GetValues(); 

 

Execute a time dependent group data provider which uses preData and returning the specified elements
[Visual Basic .NET] Copy Code
#If Not CSToJava Then
#Else
#End If
Dim elems As Array = New Object() {"Time", "x", "y", "z"}
Dim dpVectorChoose As IAgDataProviderGroup = TryCast(satObj.DataProviders("Vector Choose Axes"), IAgDataProviderGroup)
Dim groupPosition As IAgDataProvider = TryCast(dpVectorChoose.Group("Position"), IAgDataProvider)
groupPosition.PreData = "Satellite/Sat2 Body"
Dim timeVarDP As IAgDataPrvTimeVar = TryCast(groupPosition, IAgDataPrvTimeVar)
Dim result As IAgDrResult = timeVarDP.ExecElements("26 Jan 2015 17:00:00.000", "27 Jan 2015 17:00:00.000", 120, elems)
Dim datasets As IAgDrDataSetCollection = result.DataSets

If result.DataSets.Count > 0 Then
    Dim arrayTime As System.Array = datasets(0).GetValues()
    Dim arrayX As System.Array = datasets(1).GetValues()
    Dim arrayY As System.Array = datasets(2).GetValues()
    Dim arrayZ As System.Array = datasets(2).GetValues()
End If

Execute a time dependent data provider which uses preData and returning the specified elements
[Visual Basic .NET] Copy Code
#If Not CSToJava Then
#Else
#End If
Dim elems As Array = New Object() {"Range", "Radial Rate"}
Dim RICdp As IAgDataPrvTimeVar = TryCast(satObj.DataProviders("Relative Motion"), IAgDataPrvTimeVar)
TryCast(RICdp, IAgDataProvider).PreData = "Satellite/Satellite123"
Dim result As IAgDrResult = RICdp.ExecElements("26 Jan 2015 17:00:00.000", "27 Jan 2015 17:00:00.000", 120, elems)
Dim datasets As IAgDrDataSetCollection = result.DataSets

If result.DataSets.Count > 0 Then
    Dim arrayRange As System.Array = datasets(0).GetValues()
    Dim arrayRadialRate As System.Array = datasets(1).GetValues()
End If

See Also

© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1