pycatia.system_interfaces.collection¶
Module initially auto generated using V5Automation files from CATIA V5 R28 on 2020-06-10 10:58:07.270911
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.system_interfaces.collection.Collection(com_object, child_object=<class 'pycatia.system_interfaces.any_object.AnyObject'>)¶
Note
CAA V5 Visual Basic Help (2020-06-10 10:58:07.270911)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchCollectionRepresents the base object for collections.As a base object, it provides properties and methods shared by any otherobject.- property application: Application¶
Note
- CAA V5 Visual Basic Help (2020-06-10 10:58:07.270911)
- o Property Application() As Application (Read Only)Returns the application. The application is the root object in the objectstructure and can be retrieved from any object in the object structure usingthe Application property. The Application property is the way to jump from anyobject up to the root of the object data structure, allowing then to navigatedownwards. For in-process scripting, the application is always referred to asCATIA. Note that the Application property of the Application object returns theApplication object itself.Example:This example retrieves in CurrentApplication the application object,root of the object structure, from a given object of this structure: a documentrefered to using the MyDocCollecion variable.Dim CurrentApplication As ApplicationSet CurrentApplication = MyDocCollecion.Application
- Return type:
- property count: int¶
Note
- CAA V5 Visual Basic Help (2020-06-10 10:58:07.270911)
- o Property Count() As long (Read Only)Returns the number of objects in the collection. This is handy to scan allthe objects in a collection.Example:This example retrieves in ObjectNumber the number of objects currentlygathered in MyCollection.ObjectNumber = MyCollection.Count
- Return type:
int
- get_item(id_name: str) AnyObject ¶
Note
- CAA V5 Visual Basic Help (2020-06-10 10:58:07.270911))
- o Func GetItem(CATBSTR IDName) As CATBaseDispatchReturns an object from its name.Role: To retrieve an object when only its name is available. You should notuse this method, but you can find it in the macros generated by theTools->Macro command.Parameters:IDNameThe searched object nameReturns:The searched object
- Parameters:
id_name (str) –
- Return type:
- get_item_by_index(index)¶
- Parameters:
index (str/int) – relation name or index
- Returns:
child_object
- items()¶
- Returns:
[self.child_object()]
- property name: str¶
Note
- CAA V5 Visual Basic Help (2020-06-10 10:58:07.270911)
- o Property Name() As CATBSTR (Read Only)Returns or sets the name of the object. The name is a character string youcan assign to any object to handle it easier. In the case of an object part ofa collection, the name can often be used in place of the object rank toretrieve or remove the object, providing the Item and Remove methods of thecollection feature an argument with the Variant type. If the object has no nameset, the name returned is the one of its parent.Example:This example sets to MyObject the name Nice and Handy ObjectName.MyObject.Name(“Nice and Handy Object Name”)
- Return type:
str
- property parent: AnyObject¶
Note
- CAA V5 Visual Basic Help (2020-06-10 10:58:07.270911)
- o Property Parent() As CATBaseDispatch (Read Only)Returns the parent object. The parent object of a given object is theobject that created this object, usually the object just above in the objecttree structure and that aggregates it. In the case of an object part of acollection, the parent object is not the collection object itself, but theobject that aggregates the collection object. The Parent property is the way tostep upwards in the object data structure. Note that the Parent property of theApplication object returns the Application object itself.Example:This example retrieves in ParentObject the parent object of theGivenObject object.Dim ParentObject As AnyObjectSet ParentObject = GivenObject.Parent
- Return type: