Product Structure |
Adding a New Product |
![]() |
This macro shows you how to create a simple product structure containing two parts. It assumes that the CATDocView has been initialized so that it references the path leading to the two part documents, CAAPstPad1_1.CATPart and CAAPstPad1_2.CATPart The macro creates a new Product document and retrieves its root product. Next, it retrieves the product collection under the root product. A new product is then added to which is associated a new master shape representation from an existing external Part document. This same process is repeated for a second new product. Here is an image of the resulting product structure:
|
|||||
![]() |
CAAPstAddNewProduct is launched in CATIA [1]. No previously opened document is needed. CAAPstAddNewProduct.CATScript is located in the CAAScdPstUseCases module. Execute macro (Windows only).
|
|||||
![]() |
CAAPstAddNewProduct includes five steps:
Prolog
A new Product document is created using the Adding a New Product
A new product is added to the collection using the Assigning a Master Shape Representation to the New Product
Using the Adding a Second New Product
A second new product is added to the collection in the same way as the first. The new product is also assigned a part number and name which will allow its identification in the product structure tree. Assigning a Master Shape Representation to the Second New Product
Using the |
[Top]
This use case has shown how to create a simple product structure containing two parts. Specifically, it has illustrated using:
Add
method of the Documents object
to create a new Product document.Product
property of the ProductDocument object to
retrieve the root product of the document.Products
property of the Product object to
retrieve the product collection.AddNewProduct
method of the Products
object to add a new product to the collection.AddMasterShapeRepresentation
method of the
Product object to add a new part under an existing product.[Top]
[1] | Replaying a macro |
[Top] |
Copyright © 2001, Dassault Systèmes. All rights reserved.