AGI STK Objects 11 Send comments on this topic.
New Method (IAgStkObjectCollection)
See Also  Example
EClassType
InstName
The name of the Object. Will be shown in the Object Browser in STK.





Description

Creates an STK object using specified class and instance name.

Syntax

[Visual Basic .NET]
Public Function New( _
   ByVal EClassType As AgESTKObjectType, _
   ByVal InstName As String _
) As IAgStkObject

[C#]
public IAgStkObject New(
AgESTKObjectType EClassType,
string InstName
);

[Managed C++]
public: IAgStkObject^ New(
AgESTKObjectType EClassType,
String __gc ^ InstName
);

[Java]
public IAgStkObject new(
AgESTKObjectType EClassType,
String InstName
);

[Unmanaged C++]
public: HRESULT New(
AgESTKObjectType EClassType,
BSTR InstName,
IAgStkObject ** ReturnValue
);

Parameters

EClassType
Member Value Description
eAdvCat 0 AdvCAT.
eAircraft 1 Aircraft.
eAreaTarget 2 Area Target.
eAttitudeCoverage 3 Attitude Coverage.
eChain 4 Chain.
eCommSystem 5 CommSystem.
eConstellation 6 Constellation.
eCoverageDefinition 7 Coverage Definition.
eFacility 8 Facility.
eGroundVehicle 9 Ground Vehicle.
eLaunchVehicle 10 Launch Vehicle.
eLineTarget 11 Line Target.
eMTO 12 MTO (Multi-Track Object).
eMissile 13 Missile.
eMissileSystem 14 Missile System.
ePlanet 15 Planet.
eRadar 16 Radar.
eReceiver 17 Receiver.
eSatellite 18 Satellite.
eScenario 19 Scenario.
eSensor 20 Sensor.
eShip 21 Ship.
eStar 22 Star.
eTarget 23 Target.
eTransmitter 24 Transmitter.
eFigureOfMerit 25 Figure of Merit.
eRoot 26 Root.
eAccess 27 Access.
eObjectCoverage 28 Coverage.
eAttitudeFigureOfMerit 29 Attitude Figure of Merit.
eAntenna 31 Antenna.
ePlace 32 Place.
eVolumetric 33 Volumetric
InstName
The name of the Object. Will be shown in the Object Browser in STK.

Example

Create an area target (on the current scenario central body)
[C#] Copy Code
// Create the AreaTarget on the current scenario central body (use 
// NewOnCentralBody to specify explicitly the central body) 
IAgAreaTarget areaTarget = root.CurrentScenario.Children.New(AgESTKObjectType.eAreaTarget, "MyAreaTarget"as IAgAreaTarget; 
 

Create a chain (on the current scenario central body)
[C#] Copy Code
// Create the Chain on the current scenario central body (use 
// NewOnCentralBody to specify explicitly the central body) 
IAgChain chain = root.CurrentScenario.Children.New(AgESTKObjectType.eChain, "MyChain"as IAgChain; 
 

Add a new STK Object to the scenario
[C#] Copy Code
root.CurrentScenario.Children.New(AgESTKObjectType.eShip, "Ship1"); 
 

Create an area target (on the current scenario central body)
[Visual Basic .NET] Copy Code
' Create the AreaTarget on the current scenario central body (use
' NewOnCentralBody to specify explicitly the central body)
Dim areaTarget As IAgAreaTarget = TryCast(root.CurrentScenario.Children.[New](AgESTKObjectType.eAreaTarget, "MyAreaTarget"), IAgAreaTarget)

Create a chain (on the current scenario central body)
[Visual Basic .NET] Copy Code
' Create the Chain on the current scenario central body (use
' NewOnCentralBody to specify explicitly the central body)
Dim chain As IAgChain = TryCast(root.CurrentScenario.Children.[New](AgESTKObjectType.eChain, "MyChain"), IAgChain)

Add a new STK Object to the scenario
[Visual Basic .NET] Copy Code
root.CurrentScenario.Children.[New](AgESTKObjectType.eShip, "Ship1")

See Also

© 2016 Analytical Graphics, Inc. All Rights Reserved.

STK Programming Interface 11.0.1