Description
IAgScenario Interface for Scenario-level properties.
Public Methods
GetAccessBetweenObjectsByPath | Returns an IAgStkAccess object associated with the two STK objects specified using their paths. The paths can be fully-qualified or truncated. See remarks section for more info. |
GetExistingAccesses | Returns an array of existing accesses in the current scenario. The result is a two-dimensional array of triplets where each triplet contains the paths of two objects participating in the access and a flag indicating whether the access is computed. |
SetDirty | Sets the flag indicating the scenario has been modified. |
SetTimePeriod | Set the Scenario time period. startTime/stopTime use DateFormat Dimension. |
Public Properties
AcWGS84Warning | Specify when to display the aircraft mission modeler WGS84 warning. |
AnalysisEpoch | Allows the user to configure the scenario's analysis epoch. |
AnalysisInterval | Allows the user to configure the scenario's analysis time period. |
Animation | Scenario animation settings. |
ComponentDirectory | Get the component directory interface. |
EarthData | Scenario Earth Data settings. |
Epoch | Scenario epoch. Uses DateFormat Dimension. |
GenDbs | Scenario database settings. |
Graphics | Scenario 2D Graphics settings. |
IsDirty | Specify whether scenario needs to be saved. |
LaserEnvironment | Returns the laser environment. |
MslNoOrbitWarning | Specify whether to display a warning when a missile trajectory does not impact the central body. |
MslStopTimeWarning | Generate a message that warns the user if the missile achieves orbit (and give the perigee) or impacts the surface (and give the interval after missile's stop time). |
RadarClutterMap | Returns the global radar clutter map. |
RadarCrossSection | Returns the global radar cross section. |
RFEnvironment | Returns the RF environment. |
SatNoOrbitWarning | Specify whether to display a warning when a satellite orbit intersects the central body. |
ScenarioFiles | Returns list of scenario files. |
SceneManager | A scene manager. |
SpaceEnvironment | Scenario SpaceEnvironment settings. |
StartTime | Scenario start time. Uses DateFormat Dimension. |
StopTime | Scenario stop time. Uses DateFormat Dimension. |
Terrain | Returns a list of central bodies and their terrains. |
Tilesets | Returns a list of 3D Tilesets used for Analysis. |
UseAnalysisStartTimeForEpoch | Whether the scenario Epoch is the same as the scenario's StartTime. |
VO | Scenario 3D Graphics settings. |
Interfaces
CoClasses that Implement IAgScenario
Example
GetAccessBetweenObjectsByPath using the output of GetExistingAccesses
[C#] |
---|
IAgScenario scenario = stkRoot.CurrentScenario as IAgScenario;
Array accesses = scenario.GetExistingAccesses();
int numAccesses = accesses.GetLength(0); // number of accesses
string object1 = accesses.GetValue(0, 0).ToString(); // e.g. "Facility/Fac1"
string object2 = accesses.GetValue(0, 1).ToString(); // e.g. "Satellite/Sat1"
bool computed = (bool)accesses.GetValue(0, 2); // e.g. true (if access has been computed)
IAgStkAccess access = scenario.GetAccessBetweenObjectsByPath(object1, object2);
|
|
Configure scenario text font
[C#] |
---|
IAgSc3dFont fonts = scenario.VO.LargeFont;
fonts.Bold = true;
fonts.Italic = true;
fonts.PtSize = AgESc3dPtSize.eSc3dFontSize36;
if (fonts.IsFontAvailable("Impact"))
{
fonts.Name = "Impact";
}
// AvailableFonts returns a one dimensional array of font strings
Array allFonts = fonts.AvailableFonts;
int index = Array.IndexOf(allFonts, "Courier");
if (index != -1)
{
fonts.Name = allFonts.GetValue(index) as string;
}
|
|
Sets the scenario analysis time to the empheris time of another object.
[C#] |
---|
IAgSatellite satellite = stkRoot.GetObjectFromPath("/Satellite/GeoEye") as IAgSatellite;
IAgCrdnProvider vgtProvider = stkRoot.VgtRoot.GetProvider("/Satellite/GeoEye");
IAgVePropagatorTwoBody twoBody = satellite.Propagator as IAgVePropagatorTwoBody;
IAgCrdnEventSmartEpoch startEpoch = twoBody.EphemerisInterval.GetStartEpoch();
IAgCrdnEventSmartEpoch stopEpoch = twoBody.EphemerisInterval.GetStopEpoch();
scenario.AnalysisInterval.SetStartAndStopEpochs(startEpoch, stopEpoch);
|
|
Sets the scenario analysis time to today and the duration to one day.
[C#] |
---|
scenario.AnalysisInterval.SetStartTimeAndDuration("Today", "+1 Day");
|
|
GetAccessBetweenObjectsByPath using the output of GetExistingAccesses
[Visual Basic .NET] |
---|
Dim scenario As IAgScenario = TryCast(stkRoot.CurrentScenario, IAgScenario)
Dim accesses As Array = scenario.GetExistingAccesses()
Dim numAccesses As Integer = accesses.GetLength(0)
' number of accesses
Dim object1 As String = accesses.GetValue(0, 0).ToString()
' e.g. "Facility/Fac1"
Dim object2 As String = accesses.GetValue(0, 1).ToString()
' e.g. "Satellite/Sat1"
Dim computed As Boolean = DirectCast(accesses.GetValue(0, 2), Boolean)
' e.g. true (if access has been computed)
Dim access As IAgStkAccess = scenario.GetAccessBetweenObjectsByPath(object1, object2)
|
|
Configure scenario text font
[Visual Basic .NET] |
---|
Dim fonts As IAgSc3dFont = scenario.VO.LargeFont
fonts.Bold = True
fonts.Italic = True
fonts.PtSize = AgESc3dPtSize.eSc3dFontSize36
If fonts.IsFontAvailable("Impact") Then
fonts.Name = "Impact"
End If
' AvailableFonts returns a one dimensional array of font strings
Dim allFonts As Array = fonts.AvailableFonts
Dim index As Integer = Array.IndexOf(allFonts, "Courier")
If index <> -1 Then
fonts.Name = TryCast(allFonts.GetValue(index), String)
End If
|
|
Sets the scenario analysis time to the empheris time of another object.
[Visual Basic .NET] |
---|
Dim satellite As IAgSatellite = TryCast(stkRoot.GetObjectFromPath("/Satellite/GeoEye"), IAgSatellite)
Dim vgtProvider As IAgCrdnProvider = stkRoot.VgtRoot.GetProvider("/Satellite/GeoEye")
Dim twoBody As IAgVePropagatorTwoBody = TryCast(satellite.Propagator, IAgVePropagatorTwoBody)
Dim startEpoch As IAgCrdnEventSmartEpoch = twoBody.EphemerisInterval.GetStartEpoch()
Dim stopEpoch As IAgCrdnEventSmartEpoch = twoBody.EphemerisInterval.GetStopEpoch()
scenario.AnalysisInterval.SetStartAndStopEpochs(startEpoch, stopEpoch)
|
|
Sets the scenario analysis time to today and the duration to one day.
[Visual Basic .NET] |
---|
scenario.AnalysisInterval.SetStartTimeAndDuration("Today", "+1 Day")
|
|
Change scenario time period
[MATLAB] |
---|
% IAgStkObjectRoot root: STK Object Model Root
root.CurrentScenario.SetTimePeriod('30 Jul 2014 16:00:05.000', '31 Jul 2014 16:00:00.000');
root.CurrentScenario.Epoch = '30 Jul 2014 16:00:05.000';
|
|