STK ObjectsSend comments on this topic.
IAgScenario Interface

Description

IAgScenario Interface for Scenario-level properties.

Public Methods

Public Method GetAccessBetweenObjectsByPathReturns 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.
Public Method GetExistingAccessesReturns 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.
Public Method SetDirtySets the flag indicating the scenario has been modified.
Public Method SetTimePeriodMethod to set the Scenario time period. startTime/stopTime use DateFormat Dimension.

Public Properties

Public Property AcWGS84WarningSpecify when to display the aircraft mission modeler WGS84 warning.
Public Property AnalysisEpochAllows the user to configure the scenario's analysis epoch.
Public Property AnalysisIntervalAllows the user to configure the scenario's analysis time period.
Public Property AnimationScenario animation settings.
Public Property ComponentDirectoryThe component directory interface
Public Property EarthDataScenario Earth Data settings.
Public Property EpochScenario epoch. Uses DateFormat Dimension.
Public Property GenDbsScenario database settings.
Public Property GraphicsScenario 2D Graphics settings.
Public Property IsDirtySpecify whether scenario needs to be saved
Public Property LaserEnvironmentReturns the laser environment.
Public Property MslNoOrbitWarningSpecify whether to display a warning when a missile trajectory does not impact the central body.
Public Property MslStopTimeWarningGenerate 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).
Public Property RadarClutterMapReturns the global radar clutter map.
Public Property RadarCrossSectionReturns the global radar cross section.
Public Property RFEnvironmentReturns the RF environment.
Public Property SatNoOrbitWarningSpecify whether to display a warning when a satellite orbit intersects the central body.
Public Property ScenarioFilesReturns list of scenario files.
Public Property SceneManagerA scene manager.
Public Property SpaceEnvironmentScenario SpaceEnvironment settings.
Public Property StartTimeScenario start time. Uses DateFormat Dimension.
Public Property StopTimeScenario stop time. Uses DateFormat Dimension.
Public Property TerrainReturns a list of central bodies and their terrains.
Public Property TilesetsReturns a list of 3D Tilesets used for Analysis.
Public Property UseAnalysisStartTimeForEpochWhether the scenario Epoch is the same as the scenario's StartTime.
Public Property VOScenario 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';


        
© 2024 Analytical Graphics, Inc. All Rights Reserved.