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.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.CollectionListRepresents 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. ReturnsE_FAIL if the object type is not correct. Will return E_FAIL if trying to setan 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 AnyObjectRetrieves a Feature using its index or its name from the Featurescollection.Parameters:iIndexThe index or the name of the Feature to retrieve from thecollection of Features. As a numerics, this index is the rank of the Feature inthe collection. The index of the first Feature in the collection is 1, and theindex of the last Feature is Count. As a string, it is the name you assigned tothe Feature using theAnyObject.Name property or when creating the Feature.Returns:The retrieved FeatureExample:This example retrieves the last Feature in the Featurescollection.Dim lastFeature As CATIABaseSet lastFeature = Features.Item(Features.Count)
- Parameters:
i_index (cat_variant) –
- Return type:
- 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:iIndexThe index or the name of the Feature to retrieve from thecollection of Features. As a numerics, this index is the rank of the Feature inthe collection. The index of the first Feature in the collection is 1, and theindex of the last Feature is Count. As a string, it is the name you assigned tothe Feature using theAnyObject.Name property or when creating the Feature.Example:This example removes the Feature named density from the Featurescollection.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 targetposition. Doesn’t change the list if either position is out of the list. ReturnE_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. ReturnsE_FAIL if the object type is not correct or the index is out of bounds. ReturnsE_FAIL if trying to set an already existing element whileIsDuplicateElementsAllowed is false.
- Parameters:
i_index (cat_variant) –
i_item_value (AnyObject) –
- Return type:
None