ChainConnectionCollection#

class ansys.stk.core.stkobjects.ChainConnectionCollection#

Class defining a collection of Chain connections.

Overview#

item

Given an index, returns the element in the collection.

item_by_from_to_objects

Given the From and To objects of a connection, returns the element in the collection.

remove_at

Remove the connection with the input index.

remove

Remove the connection for the input from-to object pair.

add

Add and returns a new connection with the corresponding values.

add_with_parent_restriction

Add with the option for a parent restriction and returns a new connection with the corresponding values. A Constellation or Subset must be one of the input objects.

clear

Clear all connections values from the collection.

count

Return the number of elements in the collection.

_new_enum

Return an enumerator for the collection.

Import detail#

from ansys.stk.core.stkobjects import ChainConnectionCollection

Property detail#

property ChainConnectionCollection.count: int#

Return the number of elements in the collection.

property ChainConnectionCollection._new_enum: EnumeratorProxy#

Return an enumerator for the collection.

Method detail#

ChainConnectionCollection.item(self, index: int) ChainConnection#

Given an index, returns the element in the collection.

Parameters:

index : int

Returns:

ChainConnection

ChainConnectionCollection.item_by_from_to_objects(self, from_object: ISTKObject, to_object: ISTKObject) ChainConnection#

Given the From and To objects of a connection, returns the element in the collection.

Parameters:

from_object : ISTKObject

to_object : ISTKObject

Returns:

ChainConnection

ChainConnectionCollection.remove_at(self, index: int) None#

Remove the connection with the input index.

Parameters:

index : int

Returns:

None

ChainConnectionCollection.remove(self, from_object: ISTKObject, to_object: ISTKObject) None#

Remove the connection for the input from-to object pair.

Parameters:

from_object : ISTKObject

to_object : ISTKObject

Returns:

None

ChainConnectionCollection.add(self, from_object: ISTKObject, to_object: ISTKObject, min_num_uses: int, max_num_uses: int) ChainConnection#

Add and returns a new connection with the corresponding values.

Parameters:

from_object : ISTKObject

to_object : ISTKObject

min_num_uses : int

max_num_uses : int

Returns:

ChainConnection

ChainConnectionCollection.add_with_parent_restriction(self, from_object: ISTKObject, to_object: ISTKObject, min_num_uses: int, max_num_uses: int, parent_restriction: ChainParentPlatformRestriction) ChainConnection#

Add with the option for a parent restriction and returns a new connection with the corresponding values. A Constellation or Subset must be one of the input objects.

Parameters:

from_object : ISTKObject

to_object : ISTKObject

min_num_uses : int

max_num_uses : int

parent_restriction : ChainParentPlatformRestriction

Returns:

ChainConnection

ChainConnectionCollection.clear(self) None#

Clear all connections values from the collection.

Returns:

None