UnitPreferencesUnitCollection#

class ansys.stk.core.stkutil.UnitPreferencesUnitCollection#

Object that contains a collection of UnitPreferencesUnit.

Overview#

item

Return the specific item in the collection given a unit identifier or an index.

get_item_by_index

Retrieve a unit from the collection by index.

get_item_by_name

Retrieve a unit from the collection by name.

count

Return the number of items in the collection.

_new_enum

Return an enumeration of UnitPreferencesUnit.

Import detail#

from ansys.stk.core.stkutil import UnitPreferencesUnitCollection

Property detail#

property UnitPreferencesUnitCollection.count: int#

Return the number of items in the collection.

property UnitPreferencesUnitCollection._new_enum: EnumeratorProxy#

Return an enumeration of UnitPreferencesUnit.

Method detail#

UnitPreferencesUnitCollection.item(self, index_or_name: Any) UnitPreferencesUnit#

Return the specific item in the collection given a unit identifier or an index.

Parameters:

index_or_name : Any

Returns:

UnitPreferencesUnit

UnitPreferencesUnitCollection.get_item_by_index(self, index: int) UnitPreferencesUnit#

Retrieve a unit from the collection by index.

Parameters:

index : int

Returns:

UnitPreferencesUnit

UnitPreferencesUnitCollection.get_item_by_name(self, name: str) UnitPreferencesUnit#

Retrieve a unit from the collection by name.

Parameters:

name : str

Returns:

UnitPreferencesUnit