ComponentInfoCollection#

class ansys.stk.core.stkobjects.ComponentInfoCollection#

The collection of components and component folders.

Overview#

item

Allow the user to iterate through the components.

get_folder

Return the specified folder.

remove

Remove the named component from the collection.

duplicate_component

Duplicates and adds the component, with the supplied name or index, to the collection and then returns the duplicated component.

load_component

Load a component from a specified file (full path) into the current folder and then returns the loaded component.

get_item_by_index

Retrieve component info from the collection by index.

get_item_by_name

Retrieve component info from the collection by name.

_new_enum

Enumerates through the components.

count

Get the number of components available.

folder_count

Get the number of folders available.

available_folders

Return an array of Folder names.

folder_name

Get the current folder’s name.

Import detail#

from ansys.stk.core.stkobjects import ComponentInfoCollection

Property detail#

property ComponentInfoCollection._new_enum: EnumeratorProxy#

Enumerates through the components.

property ComponentInfoCollection.count: int#

Get the number of components available.

property ComponentInfoCollection.folder_count: int#

Get the number of folders available.

property ComponentInfoCollection.available_folders: list#

Return an array of Folder names.

property ComponentInfoCollection.folder_name: str#

Get the current folder’s name.

Method detail#

ComponentInfoCollection.item(self, index_or_name: Any) IComponentInfo#

Allow the user to iterate through the components.

Parameters:

index_or_name : Any

Returns:

IComponentInfo

ComponentInfoCollection.get_folder(self, index_or_name: Any) ComponentInfoCollection#

Return the specified folder.

Parameters:

index_or_name : Any

Returns:

ComponentInfoCollection

ComponentInfoCollection.remove(self, name: str) None#

Remove the named component from the collection.

Parameters:

name : str

Returns:

None

ComponentInfoCollection.duplicate_component(self, index_or_component_name: Any, new_component_name: str) IComponentInfo#

Duplicates and adds the component, with the supplied name or index, to the collection and then returns the duplicated component.

Parameters:

index_or_component_name : Any

new_component_name : str

Returns:

IComponentInfo

ComponentInfoCollection.load_component(self, file_name: str) IComponentInfo#

Load a component from a specified file (full path) into the current folder and then returns the loaded component.

Parameters:

file_name : str

Returns:

IComponentInfo

ComponentInfoCollection.get_item_by_index(self, index: int) IComponentInfo#

Retrieve component info from the collection by index.

Parameters:

index : int

Returns:

IComponentInfo

ComponentInfoCollection.get_item_by_name(self, name: str) IComponentInfo#

Retrieve component info from the collection by name.

Parameters:

name : str

Returns:

IComponentInfo