Description
IAgScenario Interface for Scenario-level
properties.
Object Model
Public Methods
GetAccessBetweenObjectsByPath |
Returns the access object
currently associated with the two STK objects specified using their
paths. The paths can be fully-qualified or truncated. |
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 |
Method to 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 |
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 |
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. |
UseAnalysisStartTimeForEpoch |
Whether the scenario Epoch
is the same as the scenario's StartTime. |
VO |
Scenario 3D Graphics
settings. |
Example
GetAccessBetweenObjectsByPath using the output of
GetExistingAccesses
[C#] |
Copy Code
|
IAgScenario scenario = stkRoot.CurrentScenario as IAgScenario;
Array accesses = scenario.GetExistingAccesses();
int numAccesses = accesses.GetLength(0);
string object1 = accesses.GetValue(0, 0).ToString();
string object2 = accesses.GetValue(0, 1).ToString();
bool computed = (bool)accesses.GetValue(0, 2);
IAgStkAccess access = scenario.GetAccessBetweenObjectsByPath(object1, object2);
|
|
Configure scenario
text font
[C#] |
Copy Code
|
IAgSc3dFont fonts = scenario.VO.LargeFont;
fonts.Bold = true;
fonts.Italic = true;
fonts.PtSize = AgESc3dPtSize.eSc3dFontSize36;
if (fonts.IsFontAvailable("Impact"))
{
fonts.Name = "Impact";
}
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#] |
Copy Code
|
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#] |
Copy Code
|
scenario.AnalysisInterval.SetStartTimeAndDuration("Today", "+1 Day");
|
|
GetAccessBetweenObjectsByPath using the output of
GetExistingAccesses
[Visual Basic .NET] |
Copy Code
|
Dim scenario As
IAgScenario = TryCast(stkRoot.CurrentScenario, IAgScenario)
Dim accesses As Array =
scenario.GetExistingAccesses()
Dim numAccesses As Integer =
accesses.GetLength(0)
Dim object1 As String =
accesses.GetValue(0, 0).ToString()
Dim object2 As String =
accesses.GetValue(0, 1).ToString()
Dim computed As Boolean =
DirectCast(accesses.GetValue(0, 2), Boolean)
Dim access As IAgStkAccess =
scenario.GetAccessBetweenObjectsByPath(object1, object2)
|
|
Configure scenario
text font
[Visual Basic .NET] |
Copy Code
|
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
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] |
Copy Code
|
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] |
Copy Code
|
scenario.AnalysisInterval.SetStartTimeAndDuration("Today", "+1 Day")
|
|
Change scenario
time period
[MATLAB] |
Copy Code
|
% 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';
|
|
CoClasses that Implement IAgScenario