STK AviatorSend comments on this topic.
IAgAvtrCatalogItem Interface

Description

Interface used to access the options for a Catalog Item in the Aviator Catalog. Use this interface to Create, Remove, Duplicate, or Rename items in the catalog.

Public Methods

Public Method AddChildOfTypeCreates a new child with the given name and specified type.
Public Method AddDefaultChildCreates a new child with the given name and default type.
Public Method ContainsChildItemGet whether the catalog item is contains the given child item.
Public Method DuplicateDuplicates the catalog item.
Public Method GetChildItemByNameGet the child of the catalog item with the given name.
Public Method RemoveRemoves the catalog item.
Public Method SaveSaves the catalog item.

Public Properties

Public Property ChildNamesGet the child names of the catalog item.
Public Property ChildTypesGet the child types.
Public Property DescriptionGet the description of the catalog item.
Public Property IsReadOnlyGet whether the catalog item is read only.
Public Property NameGets or sets the name of the catalog item.

CoClasses that Implement IAgAvtrCatalogItem

Example

Create a new performance model for an aircraft
[C#]
// Get the acceleration type
IAgAvtrAircraftAcceleration acceleration = aircraft.Acceleration;
// Get it as a catalog item
IAgAvtrCatalogItem accAsCatalogItem = acceleration.GetAsCatalogItem();
// Get the names of the current acceleration models
Array modelNames = accAsCatalogItem.ChildNames;
// Check how many models there are
int modelCount = modelNames.Length;
// Get the child types (for example AGI Basic Acceleration Model, Advanced Acceleration Model)
Array modelTypes = accAsCatalogItem.ChildTypes;
// Create a new performance model of type "Advanced Acceleration Model"
IAgAvtrCatalogItem newPerformanceModel = accAsCatalogItem.AddChildOfType("Advanced Acceleration Model", "Model Name");
// Save the changes to the catalog
aircraft.GetAsCatalogItem().Save();
Create a new performance model for an aircraft
[Visual Basic .NET]
' Get the acceleration type
Dim acceleration As IAgAvtrAircraftAcceleration = aircraft.Acceleration
' Get it as a catalog item
Dim accAsCatalogItem As IAgAvtrCatalogItem = acceleration.GetAsCatalogItem()
' Get the names of the current acceleration models
Dim modelNames As Array = accAsCatalogItem.ChildNames
' Check how many models there are
Dim modelCount As Integer = modelNames.Length
' Get the child types (for example AGI Basic Acceleration Model, Advanced Acceleration Model)
Dim modelTypes As Array = accAsCatalogItem.ChildTypes
' Create a new performance model of type "Advanced Acceleration Model"
Dim newPerformanceModel As IAgAvtrCatalogItem = accAsCatalogItem.AddChildOfType("Advanced Acceleration Model", "Model Name")
' Save the changes to the catalog
aircraft.GetAsCatalogItem().Save()
Create a new performance model for an aircraft
[Python - STK API]
      # IAgAvtrAircraft aviatorAircraft: Aviator Aircraft object
# Get the acceleration type
acceleration = aviatorAircraft.Acceleration
# Get the names of the current acceleration models
modelNames = acceleration.ChildNames
# Check how many models there are
modelCount = len(modelNames)
# Get the child types (for example AGI Basic Acceleration Model, Advanced Acceleration Model)
modelTypes = acceleration.ChildTypes
# Create a new performance model of type "Advanced Acceleration Model"
newPerformanceModel = acceleration.AddChildOfType('Advanced Acceleration Model', 'Model Name')
# Save the changes to the catalog
aviatorAircraft.Save()

Create a new performance model for an aircraft
[MATLAB]
% IAgAvtrAircraft aviatorAircraft: Aviator Aircraft object
% Get the acceleration type
acceleration = aviatorAircraft.Acceleration;
% Get the names of the current acceleration models
modelNames = acceleration.ChildNames;
% Check how many models there are
modelCount = length(modelNames);
% Get the child types (for example AGI Basic Acceleration Model, Advanced Acceleration Model)
modelTypes = acceleration.ChildTypes;
% Create a new performance model of type "Advanced Acceleration Model"
newPerformanceModel = acceleration.AddChildOfType('Advanced Acceleration Model', 'Model Name');
% Save the changes to the catalog
aviatorAircraft.Save();


        
© 2024 Analytical Graphics, Inc. All Rights Reserved.