AGI STK Objects 11Send 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.
Windows






Windows & Linux

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
MemberValueDescription
eAdvCat0AdvCAT.
eAircraft1Aircraft.
eAreaTarget2Area Target.
eAttitudeCoverage3Attitude Coverage.
eChain4Chain.
eCommSystem5CommSystem.
eConstellation6Constellation.
eCoverageDefinition7Coverage Definition.
eFacility8Facility.
eGroundVehicle9Ground Vehicle.
eLaunchVehicle10Launch Vehicle.
eLineTarget11Line Target.
eMTO12MTO (Multi-Track Object).
eMissile13Missile.
eMissileSystem14Missile System.
ePlanet15Planet.
eRadar16Radar.
eReceiver17Receiver.
eSatellite18Satellite.
eScenario19Scenario.
eSensor20Sensor.
eShip21Ship.
eStar22Star.
eTarget23Target.
eTransmitter24Transmitter.
eFigureOfMerit25Figure of Merit.
eRoot26Root.
eAccess27Access.
eObjectCoverage28Coverage.
eAttitudeFigureOfMerit29Attitude Figure of Merit.
eAntenna31Antenna.
ePlace32Place.
eVolumetric33Volumetric
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

© 2018 Analytical Graphics, Inc. All Rights Reserved.