STK ObjectsSend comments on this topic.
IAgAccessCnstrThirdBody Interface

Description

This interface is deprecated. Use IAgAccessCnstrCbObstruction instead. Access Constraint Used for Third Body Obstructions.

Public Methods

Public Method AddObstructionThis method is deprecated. Use AddObstruction on IAgAccessCnstrCbObstruction instead. Adds an Obstruction by Name.
Public Method IsObstructionAssignedThis method is deprecated. Use IsObstructionAssigned on IAgAccessCnstrCbObstruction instead. Check whether a third body is already assigned.
Public Method RemoveObstructionThis method is deprecated. Use RemoveObstruction on IAgAccessCnstrCbObstruction instead. Remove an Obstruction by Name.

Public Properties

Public Property AssignedObstructionsThis property is deprecated. Use AssignedObstructions on IAgAccessCnstrCbObstruction instead. Gets the Assigned Obstructions.
Public Property AvailableObstructionsThis property is deprecated. Use AvailableObstructions on IAgAccessCnstrCbObstruction instead. Gets the Available Obstructions.

Remarks

Note on Solar/Lunar Obstructions


Please note the following regarding the relationship between setting Solar/Lunar in the GUI and in this Object Model:


If you select the Solar/Lunar Obstruction checkbox on the Sun Constraints page, it sets both the Sun and the Moon as obstructions. If you then want to remove one or both of these obstructions in the Object Model, you must use the RemoveObstruction method twice, i.e., once for each body.


Similarly, to set the Sun and the Moon as obstructions in the Object Model, you must use the AddObstruction method twice.

Interfaces

Implemented Interface
IAgAccessConstraint

CoClasses that Implement IAgAccessCnstrThirdBody

Example

Add and configure a third body obstruction access constraint
[C#]
// Get IAgAccessCnstrThirdBody interface
IAgAccessCnstrThirdBody thirdBodyConstraint = accessconstraints.AddConstraint(AgEAccessConstraints.eCstrThirdBodyObstruction) as IAgAccessCnstrThirdBody;

// AvailableObstructions returns a one dimensional array of obstruction paths
Array availableArray = thirdBodyConstraint.AvailableObstructions;

// In this example add all available obstructions
Console.WriteLine("Available obstructions");
foreach (string available in availableArray)
{
    Console.WriteLine(available);
    thirdBodyConstraint.AddObstruction(available);
}

// AssignedObstructions returns a one dimensional array of obstruction paths
Array assignedArray = thirdBodyConstraint.AssignedObstructions;

Console.WriteLine("Assigned obstructions");
foreach (string assigned in assignedArray)
{
    Console.WriteLine(assigned);
}
Add and configure a third body obstruction access constraint
[Visual Basic .NET]
' Get IAgAccessCnstrThirdBody interface
Dim thirdBodyConstraint As IAgAccessCnstrThirdBody = TryCast(accessconstraints.AddConstraint(AgEAccessConstraints.eCstrThirdBodyObstruction), IAgAccessCnstrThirdBody)

' AvailableObstructions returns a one dimensional array of obstruction paths
Dim availableArray As Array = thirdBodyConstraint.AvailableObstructions

' In this example add all available obstructions
Console.WriteLine("Available obstructions")
For Each available As String In availableArray
	Console.WriteLine(available)
	thirdBodyConstraint.AddObstruction(available)
Next

' AssignedObstructions returns a one dimensional array of obstruction paths
Dim assignedArray As Array = thirdBodyConstraint.AssignedObstructions

Console.WriteLine("Assigned obstructions")
For Each assigned As String In assignedArray
	Console.WriteLine(assigned)
Next
© 2024 Analytical Graphics, Inc. All Rights Reserved.