pycatia.product_structure_interfaces.products¶
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.product_structure_interfaces.products.Products(com_object)¶
Note
CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445)
System.IUnknownSystem.IDispatchSystem.CATBaseUnknownSystem.CATBaseDispatchSystem.CollectionProductsThe collection of the Product objects contained in a given Product object of aProductDocument object.A Product object can aggregate one or zero Productscollection.- add_component(i_reference_product: Product) Product ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func AddComponent(Product iReferenceProduct) As ProductCreates a component and adds it to the Products collection. A component isa Product object created from another Product object used asreference.Parameters:iReferenceProductThe product used as referenceExample:The following example creates the SpareWheel componentfromthe reference product FrontRightWheel and adds thecomponentto the ToolKits collection.Dim SpareWheel As ProductSet SpareWheel = ToolKits.AddComponent(FrontRightWheel)
- add_components_from_files(i_files_list: tuple, i_method: str) None ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Sub AddComponentsFromFiles(CATSafeArrayVariant iFilesList,CATBSTR iMethod)Creates a component for each file. The components are added to the Productscollection.Parameters:iFilesListThe paths of the files used to retrieve the reference or the shapeof th componentiMethodA string describing the expected type of the files
- Parameters:
i_files_list (tuple) –
i_method (str) –
- Return type:
None
- add_external_component(i_product_document: Document) Product ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func AddExternalComponent(Document iProductDocument) AsProductCreates a component from the root product of another ProductDocumentobject. This root product is used as a reference to create the component. Thecomponent is added to the Products collection.Parameters:iProductDocumentThe product document whose root object is to be used as referenceto create the componentExample:The following example creates the GearBox componentbyreferencing the GearBoxDocument and adds itto the PowerTrains collection.Dim GearBox As ProductSet GearBox = PowerTrains.AddExternalComponent(GearBoxDocument)
- add_new_component(i_documen_type: str, i_part_number: str) Product ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func AddNewComponent(CATBSTR iDocumenType,CATBSTR iPartNumber) As ProductCreates a component from the root product of a new ProductDocument object.This root product is used as a reference to create the component. The componentis added to the Products collection.Parameters:iProductDocumentThe product document whose root object is to be used as referenceto create the componentExample:The following example creates the GearBox componentbyreferencing the GearBoxDocument and adds itto the PowerTrains collection.Dim GearBox As ProductSet GearBox = PowerTrains.AddNewComponent(GearBoxDocument, “A120-253X-7”)
- Parameters:
i_documen_type (str) –
i_part_number (str) –
- Returns:
Product
- add_new_product(i_part_number: str) Product ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func AddNewProduct(CATBSTR iPartNumber) As ProductCreates a Product reference object. This creates a Product reference objectand the associated component by specifying its type and adds it to the Productscollection.Parameters:iPartNumberThe part number of the product to be created and added to the tothe collectionExample:The following example creates the Engine productand adds the created component to the PowerTrainscollection.Dim Engine As ProductSet Engine = PowerTrains.AddNewProduct(V6Engine)
- Parameters:
i_part_number (str) –
- Return type:
- item(i_index: cat_variant) Product ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func Item(CATVariant iIndex) As ProductReturns a product from its index in the Productscollection.Parameters:iIndexThe index of the product to retrieve in the collection of products.This index can either be the rank of the product in the collection or the nameyou assign to the product. As a numerics, this index is the rank of the productin the collection. The index of the first product in the collection is 1, andthe index of the last product is Count. As a string, it is the name youassigned to the product using theAnyObject.Name propertyReturns:The retrieved productExample:The following example returns in ThisProduct the thirdproduct,and in ThatProduct the product namedWheel in the CarParts product collection.Dim ThisProduct As ProductSet ThisProduct = CarParts.Item(3)Dim ThatProduct As ProductSet ThatProduct = CarParts.Item(“Wheel”)
- 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 product from the Products collection.Parameters:iIndexThe index of the product to remove. This index can either be therank of the product in the collection or the name you assigned to the product.As a numerics, this index is the rank of the product in the collection. Theindex of the first product in the collection is 1, and the index of the lastproduct is Count. As a string, it is the name you assigned to the product usingtheAnyObject.Name propertyExample:The following example removes the sixth product and the productnamedLeftRearDisc from the Brakes product collection.Brakes.Remove(6)Brakes.Remove(“LeftRearDisc”)
- Parameters:
i_index (cat_variant) –
- Return type:
None
- replace_component(i_old_component: Product, i_file_path: str, i_multi_instances: bool) Product ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func ReplaceComponent(Product iOldComponent,CATBSTR iFilePath,boolean iMultiInstances) As ProductCreates a component which replace the given one.Parameters:iOldComponentThe component which will be replacediFilePaththe document to replace withiMultiInstancesParameter to set to True if all instances are to be replaced, or toFalse otherwise. Returns the component replacingiOldComponentNote:Part Number conflict will be resolvedautomatically.
- replace_product(i_old_component: Product, i_new_reference: Product, i_multi_instances: bool) Product ¶
Note
- CAA V5 Visual Basic Help (2020-06-11 12:40:47.360445))
- o Func ReplaceProduct(Product iOldComponent,Product iNewReference,boolean iMultiInstances) As ProductCreates a component which replace the given one.Parameters:iOldComponentThe component which will be replacediNewReferencethe reference whom the old copmponent will be reconnectediMultiInstancesParameter to set to True if all instances are to be replaced, or toFalse otherwise. Returns the component replacingiOldComponent