Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

CATIA Macro to insert product/part without link 1

AbhishekChavan

Automotive
Mar 2, 2025
4
Hello,

I am writing a macro to insert a part/product under a root product without having a link to it's source file.

Usually we do that with powercopy or catalog but I do not have EKL License to use this functionalities through code.

If I do it with the usual AddComponent Method from Product.Products it will still have the link with source directory and any change I made will be saved back there.

To avoid that we will save it another directory with Save Management. But, I want to avoid this method as there are many components during the process and I don't want to save it again and again in different directories.

Any help here will be useful.

Thank you.
 
Replies continue below

Recommended for you

You can use Documents.NewFrom() method to get PartDocument or ProductDocument, this doesn't have link with the original document, then get PartDocument.Product or ProductDocument.Product, then use AddComponent() .
 
Hi qiushui,

Thank you for the help.

I tried with the above method and it is working fine now. I can simultaneously call multiple parts and make changes in each instance without affecting the source file or other instances. I just need to rename the previous instance to a unique name before calling the next instance.
 

Part and Inventory Search

Sponsor