pycatia.knowledge_interfaces.list

Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-11 12:40:47.360445

Warning

The notes denoted “CAA V5 Visual Basic Help” are to be used as reference only. They are there as a guide as to how the visual basic / catscript functions work and thus help debugging in pycatia.

class pycatia.knowledge_interfaces.list.List(com_object)

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)

System.IUnknown
System.IDispatch
System.CATBaseUnknown
System.CATBaseDispatch
System.Collection
List

Represents a CATIAList.
add(i_item_value: AnyObject) None

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub Add(AnyObject iItemValue)

Adds an item at the end of the list. Does an AddRef on the item. Returns
E_FAIL if the object type is not correct. Will return E_FAIL if trying to set
an already existing element while IsDuplicateElementsAllowed is false.
Parameters:

i_item_value (AnyObject) –

Return type:

None

item(i_index: cat_variant) AnyObject

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Func Item(CATVariant iIndex) As AnyObject

Retrieves a Feature using its index or its name from the Features
collection.

Parameters:

iIndex
The index or the name of the Feature to retrieve from the
collection of Features. As a numerics, this index is the rank of the Feature in
the collection. The index of the first Feature in the collection is 1, and the
index of the last Feature is Count. As a string, it is the name you assigned to
the Feature using the

AnyObject.Name property or when creating the Feature.
Returns:
The retrieved Feature
Example:
This example retrieves the last Feature in the Features
collection.

Dim lastFeature As CATIABase
Set lastFeature = Features.Item(Features.Count)
Parameters:

i_index (cat_variant) –

Return type:

AnyObject

remove(i_index: cat_variant) None

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub Remove(CATVariant iIndex)

Removes a Feature from the Features collection.

Parameters:

iIndex
The index or the name of the Feature to retrieve from the
collection of Features. As a numerics, this index is the rank of the Feature in
the collection. The index of the first Feature in the collection is 1, and the
index of the last Feature is Count. As a string, it is the name you assigned to
the Feature using the

AnyObject.Name property or when creating the Feature.

Example:
This example removes the Feature named density from the Features
collection.

Features.Remove(“density”)
Parameters:

i_index (cat_variant) –

Return type:

None

reorder(i_index_current: cat_variant, i_index_target: cat_variant) None

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub Reorder(CATVariant iIndexCurrent,
CATVariant iIndexTarget)

Reorders an element by moving it from the current position to the target
position. Doesn’t change the list if either position is out of the list. Return
E_FAIL if cannot reorder.
Parameters:
  • i_index_current (cat_variant) –

  • i_index_target (cat_variant) –

Return type:

None

replace(i_index: cat_variant, i_item_value: AnyObject) None

Note

CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
o Sub Replace(CATVariant iIndex,
AnyObject iItemValue)

Sets an item in the list at a position. Does an AddRef on the item. Returns
E_FAIL if the object type is not correct or the index is out of bounds. Returns
E_FAIL if trying to set an already existing element while
IsDuplicateElementsAllowed is false.
Parameters:
  • i_index (cat_variant) –

  • i_item_value (AnyObject) –

Return type:

None