Search code examples
visual-studio-2017catia

Visual Studio CATIA Product Creation


I am trying to create a product using visual studio in CATIA. I have imported all the required references like INFITF MECMOD ProductStructureTypeLib. I have written a small code to create a product. It is working fine according to the code but instead of creating product. it is asking me to enter product name in catia window.

Code written so far.

Dim documents1 as documents
documents1=catiafile.documents

Dim productdocument1 as productdocument
productdocument1=documents1.add("Product")

Solution

  • It's caused by a CATIA setting. If the setting is activated then users are prompted to enter a document name whenever a new document is created.

    To disable the setting:

    1. Launch CATIA.
    2. Open the settings window by Tools > Options.
    3. In the settings tree on the left select Infrastructure > Product Structure
    4. In the right part of the settings window switch to the tab Product Structure.
    5. Disable the option Part Number > Manual Input.
    6. Close the settings window with OK.