ISTKObjectCollection#
- class ansys.stk.core.stkobjects.ISTKObjectCollection#
Represents a collection of STK objects.
Overview#
Check whether the collection contains an object with the given type and name. |
|
Copy and paste the specified object. |
|
Return a collection of objects of specified type. |
|
Retrieve an Stk object from the collection by index. |
|
Retrieve an Stk object from the collection by name. |
|
Import object from external file and returns the pointer to the object. |
|
Given an index, returns the element in the collection. If the index is an integer, then 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. |
|
Create an STK object using specified class and instance name. |
|
Create an STK object using specified class, instance name and the central body. |
|
Remove an STK object using specified object’s type and name. |
Return an enumerator for the collection. |
|
Return the number of elements in the collection. |
|
Return the available objects that can be added to this object. |
Import detail#
from ansys.stk.core.stkobjects import ISTKObjectCollection
Property detail#
- property ISTKObjectCollection._new_enum: EnumeratorProxy#
Return an enumerator for the collection.
Method detail#
- ISTKObjectCollection.contains(self, class_type: STKObjectType, inst_name: str) bool #
Check whether the collection contains an object with the given type and name.
- ISTKObjectCollection.copy_object(self, object_to_clone: ISTKObject, new_object_name: str) ISTKObject #
Copy and paste the specified object.
- Parameters:
object_to_clone :
ISTKObject
new_object_name :
str
- Returns:
ISTKObject
- ISTKObjectCollection.get_elements(self, class_type: STKObjectType) ISTKObjectElementCollection #
Return a collection of objects of specified type.
- Parameters:
class_type :
STKObjectType
- Returns:
ISTKObjectElementCollection
- ISTKObjectCollection.get_item_by_index(self, index: int) ISTKObject #
Retrieve an Stk object from the collection by index.
- Parameters:
index :
int
- Returns:
ISTKObject
- ISTKObjectCollection.get_item_by_name(self, name: str) ISTKObject #
Retrieve an Stk object from the collection by name.
- Parameters:
name :
str
- Returns:
ISTKObject
- ISTKObjectCollection.import_object(self, file_path: str) ISTKObject #
Import object from external file and returns the pointer to the object.
- Parameters:
file_path :
str
- Returns:
ISTKObject
- ISTKObjectCollection.item(self, index_or_name: Any) ISTKObject #
Given an index, returns the element in the collection. If the index is an integer, then 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
- ISTKObjectCollection.new(self, class_type: STKObjectType, inst_name: str) ISTKObject #
Create an STK object using specified class and instance name.
- Parameters:
class_type :
STKObjectType
inst_name :
str
- Returns:
ISTKObject
- ISTKObjectCollection.new_on_central_body(self, class_type: STKObjectType, inst_name: str, central_body_name: str) ISTKObject #
Create an STK object using specified class, instance name and the central body.