AGI STK Objects 11 Send comments on this topic.
LoadScenario Method (IAgStkObjectRoot)
See Also  Example
Path
The file path where the Scenario is.





Description

Use Load method. Loads a scenario using the specified path. The method throws an exception if there is a scenario already loaded.

Syntax

[Visual Basic .NET]
Public Sub LoadScenario( _
   ByVal Path As String _
) 

[C#]
public void LoadScenario(
string Path
);

[Managed C++]
public: void LoadScenario(
String __gc ^ Path
);

[Java]
public  loadScenario(
String Path
);

[Unmanaged C++]
public: HRESULT LoadScenario(
BSTR Path
);

Parameters

Path
The file path where the Scenario is.

Example

Load a scenario (closing the current scenario if necessary)
[C#] Copy Code
// close current scenario 
if (root.CurrentScenario != null

    root.CloseScenario(); 

root.LoadScenario(scenarioLocation); 
 

Load a scenario (closing the current scenario if necessary)
[Visual Basic .NET] Copy Code
' close current scenario
If root.CurrentScenario IsNot Nothing Then
    root.CloseScenario()
End If
root.LoadScenario(scenarioLocation)

See Also

© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1