ConstraintCollection#

class ansys.stk.core.stkobjects.astrogator.ConstraintCollection#

The Constraint component folder.

Overview#

add

Add a constraint to the collection.

cut

Copy the constraint into the clipboard and removes the constraint from the list.

get_item_by_index

Retrieve a constraint from the collection by index.

get_item_by_name

Retrieve a constraint from the collection by name.

insert_copy

Copy the constraint and inserts the copy into the list.

item

Iterate through the collection.

paste

Pastes the constraint from the clipboard and inserts into the list.

remove

Remove a specified constraint from the collection.

_new_enum

A property that allows you to enumerate through the collection.

count

Return the size of the collection.

Import detail#

from ansys.stk.core.stkobjects.astrogator import ConstraintCollection

Property detail#

property ConstraintCollection._new_enum: EnumeratorProxy#

A property that allows you to enumerate through the collection.

property ConstraintCollection.count: int#

Return the size of the collection.

Method detail#

ConstraintCollection.add(self, result_name: str) AsTriggerCondition#

Add a constraint to the collection.

Parameters:

result_name : str

Returns:

AsTriggerCondition

ConstraintCollection.cut(self, index_or_name: Any) None#

Copy the constraint into the clipboard and removes the constraint from the list.

Parameters:

index_or_name : Any

Returns:

None

ConstraintCollection.get_item_by_index(self, index: int) AsTriggerCondition#

Retrieve a constraint from the collection by index.

Parameters:

index : int

Returns:

AsTriggerCondition

ConstraintCollection.get_item_by_name(self, name: str) AsTriggerCondition#

Retrieve a constraint from the collection by name.

Parameters:

name : str

Returns:

AsTriggerCondition

ConstraintCollection.insert_copy(self, cond: AsTriggerCondition) AsTriggerCondition#

Copy the constraint and inserts the copy into the list.

Parameters:

cond : AsTriggerCondition

Returns:

AsTriggerCondition

ConstraintCollection.item(self, index_or_name: Any) AsTriggerCondition#

Iterate through the collection.

Parameters:

index_or_name : Any

Returns:

AsTriggerCondition

ConstraintCollection.paste(self) AsTriggerCondition#

Pastes the constraint from the clipboard and inserts into the list.

Returns:

AsTriggerCondition

ConstraintCollection.remove(self, index_or_name: Any) None#

Remove a specified constraint from the collection.

Parameters:

index_or_name : Any

Returns:

None