STK ObjectsSend comments on this topic.
IAgStkObject Interface

Description

Represents the instance of STK object.

Public Methods

Public Method CopyObjectCopy and paste the current instance of STK Object. The copied object will be pasted as the sibling of the instance being copied.
Public Method CreateOnePointAccessCreates one point access to the supplied object name. The Remove method in IAgOnePtAccess should be called when you are done with the data.
Public Method ExportExports the object to a file.
Public Method GetAccessReturns an IAgStkAccess object associated with this STK object and another STK object specified using its path. The path can be fully-qualified or truncated. See remarks section for more info.
Public Method GetAccessToObjectReturns an IAgStkAccess object associated with this STK object and another STK object. See remarks section for more info.
Public Method IsAccessSupportedUsed to determine whether or not the object supports Access.
Public Method IsObjectCoverageSupportedUsed to determine whether or not the object supports ObjectCoverage.
Public Method IsVgtSupportedReturns whether the object supports Vector Geometry.
Public Method UnloadRemoves the object from the scenario.

Public Properties

Public Property AccessConstraintsGet the constraints imposed on the object.
Public Property CentralBodyNameThe object's central body.
Public Property ChildrenReturns a collection of direct descendants of the current object.
Public Property ClassNameReturns a class name of the object (i.e. Aircraft, Facility.)
Public Property ClassTypeReturns a class type of the object (i.e. eAircraft, eFacility etc.)
Public Property DataProvidersReturns the object representing a list of available data providers for the object.
Public Property HasChildrenReturns true if the object has direct descendants.
Public Property InstanceNameA name of the object.
Public Property LongDescriptionA long description of the object.
Public Property MetadataGets the object's metadata. Metadata is a collection of keys and their associated values.
Public Property ObjectCoverageReturns an IAgStkObjectCoverage object.
Public Property ObjectFilesReturns the list of files that constitute an object.
Public Property ParentReturns the parent object or null if the object has become orphaned. The exception is AgStkObjectRoot object which is a topmost element and does not have a parent.
Public Property PathReturns the object path.
Public Property RootReturns the Root object or null.
Public Property ShortDescriptionThe short description of the object.
Public Property VgtReturns an instance of Vector Geometry Tool provider.

Interfaces

Implemented Interface
IAgLifetimeInformation

CoClasses that Implement IAgStkObject

Example

Add Metadata To Object
[C#]
stkObject.Metadata.Set("key", "value");
Add ReadOnly Metadata To Object
[C#]
stkObject.Metadata.Set("key", "value");
stkObject.Metadata.SetReadOnly("key", true);
Remove Metadata From Object
[C#]
stkObject.Metadata.RemoveKey("key");
Iterate Metadata Keys
[C#]
foreach (string key in stkObject.Metadata.Keys)
{
    Console.WriteLine("Key: {0}, Value: {1}", key, stkObject.Metadata[key]);
}
Check If Metadata Is ReadOnly
[C#]
if (stkObject.Metadata.GetReadOnly("test"))
{
    Console.WriteLine("The test Metadata element is ReadOnly.");
}
Check If Metadata Contains Key
[C#]
if (stkObject.Metadata.Contains("test"))
{
    Console.WriteLine("The collection contains the test element.");
}
Add Metadata To Object
[Visual Basic .NET]
stkObject.Metadata.[Set]("key", "value")
Add ReadOnly Metadata To Object
[Visual Basic .NET]
stkObject.Metadata.[Set]("key", "value")
stkObject.Metadata.SetReadOnly("key", True)
Remove Metadata From Object
[Visual Basic .NET]
stkObject.Metadata.RemoveKey("key")
Iterate Metadata Keys
[Visual Basic .NET]
For Each key As String In stkObject.Metadata.Keys
	Console.WriteLine("Key: {0}, Value: {1}", key, stkObject.Metadata(key))
Next
Check If Metadata Is ReadOnly
[Visual Basic .NET]
If stkObject.Metadata.GetReadOnly("test") Then
	Console.WriteLine("The test Metadata element is ReadOnly.")
End If
Check If Metadata Contains Key
[Visual Basic .NET]
If stkObject.Metadata.Contains("test") Then
	Console.WriteLine("The collection contains the test element.")
End If
Create a New AdvCAT Object
[Python - STK API]
# IAgScenario scenario: Scenario object
advCAT = scenario.Children.New(AgESTKObjectType.eAdvCat, 'MyAdvCAT')

Create a New AdvCAT Object
[MATLAB]
% IAgScenario scenario: Scenario object
advCAT = scenario.Children.New('eAdvCAT', 'AdvCAT');


        
© 2024 Analytical Graphics, Inc. All Rights Reserved.