PathCollection#

class ansys.stk.core.stkobjects.PathCollection#

Allow adding and removing of paths.

Overview#

item

Given an index, returns an element in the collection.

remove_at

Remove an element from the collection using specified index.

remove_all

Remove all elements from the collection.

add

Add a new element to the collection. Must be the full path to the file.

remove

Remove an element from the collection given a filename.

count

Return the number of elements in a collection.

_new_enum

Return an enumerator that can iterate through the collection.

Import detail#

from ansys.stk.core.stkobjects import PathCollection

Property detail#

property PathCollection.count: int#

Return the number of elements in a collection.

property PathCollection._new_enum: EnumeratorProxy#

Return an enumerator that can iterate through the collection.

Method detail#

PathCollection.item(self, index: int) str#

Given an index, returns an element in the collection.

Parameters:

index : int

Returns:

str

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

Remove an element from the collection using specified index.

Parameters:

index : int

Returns:

None

PathCollection.remove_all(self) None#

Remove all elements from the collection.

Returns:

None

PathCollection.add(self, filename: str) None#

Add a new element to the collection. Must be the full path to the file.

Parameters:

filename : str

Returns:

None

PathCollection.remove(self, filename: str) None#

Remove an element from the collection given a filename.

Parameters:

filename : str

Returns:

None