ISTKObjectElementCollection#
- class ansys.stk.core.stkobjects.ISTKObjectElementCollection#
Represents a collection of STK objects.
Overview#
Given an index, returns an element in the collection. If the index is an integer, then the method returns the element in the collection at the given position. If the index is a string, then the method returns the element with the specified name. |
|
Check whether an object with the given name exists. |
|
Retrieve an Stk object element from the collection by index. |
|
Retrieve an Stk object element from the collection by name. |
Import detail#
from ansys.stk.core.stkobjects import ISTKObjectElementCollection
Property detail#
- property ISTKObjectElementCollection._new_enum: EnumeratorProxy#
Return an enumerator that can iterate through the collection.
Method detail#
- ISTKObjectElementCollection.item(self, index_or_name: Any) ISTKObject #
Given an index, returns an element in the collection. If the index is an integer, then the method returns the element in the collection at the given position. If the index is a string, then the method returns the element with the specified name.
- Parameters:
index_or_name :
Any
- Returns:
ISTKObject
- ISTKObjectElementCollection.contains(self, inst_name: str) bool #
Check whether an object with the given name exists.
- ISTKObjectElementCollection.get_item_by_index(self, index: int) ISTKObject #
Retrieve an Stk object element from the collection by index.
- Parameters:
index :
int
- Returns:
ISTKObject
- ISTKObjectElementCollection.get_item_by_name(self, name: str) ISTKObject #
Retrieve an Stk object element from the collection by name.
- Parameters:
name :
str
- Returns:
ISTKObject