PathCollection#

class ansys.stk.core.stkobjects.PathCollection#

Allow adding and removing of paths.

Overview#

add

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

item

Given an index, returns an element in the collection.

remove

Remove an element from the collection given a filename.

remove_all

Remove all elements from the collection.

remove_at

Remove an element from the collection using specified index.

_new_enum

Return an enumerator that can iterate through the collection.

count

Return the number of elements in a collection.

Import detail#

from ansys.stk.core.stkobjects import PathCollection

Property detail#

property PathCollection._new_enum: EnumeratorProxy#

Return an enumerator that can iterate through the collection.

property PathCollection.count: int#

Return the number of elements in a collection.

Method detail#

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.item(self, index: int) str#

Given an index, returns an element in the collection.

Parameters:

index : int

Returns:

str

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

Remove an element from the collection given a filename.

Parameters:

filename : str

Returns:

None

PathCollection.remove_all(self) None#

Remove all elements from the collection.

Returns:

None

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

Remove an element from the collection using specified index.

Parameters:

index : int

Returns:

None