ConstraintCollection#

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

The Constraint component folder.

Overview#

add

Add a constraint to the collection.

item

Iterate through the collection.

remove

Remove a specified constraint from the collection.

cut

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

paste

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

insert_copy

Copy the constraint and inserts the copy into 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.

_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.item(self, index_or_name: Any) AsTriggerCondition#

Iterate through the collection.

Parameters:

index_or_name : Any

Returns:

AsTriggerCondition

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

Remove a specified constraint from the collection.

Parameters:

index_or_name : Any

Returns:

None

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.paste(self) AsTriggerCondition#

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

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.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