Skip to content

BOM Export With Materials

KaiUR edited this page May 21, 2026 · 3 revisions

BOM Export With Materials

File: Product_Document_Scripts/BOM_Export_With_Materials.py
Version: 1.0
Document Type: Product


Description

Recursively traverses the active CATProduct assembly tree and exports a full bill of materials enriched with material and mass data. For each component the script attempts to read the applied material name and calculated mass via the Product Analyse interface. The result is a hierarchical BOM CSV showing the assembly structure with material information alongside standard BOM fields.


Requirements

Requirement Value
Python >= 3.10
pycatia >= 0.8.3
Open document Product

Usage

  1. Open a CATProduct in CATIA (with materials applied to part bodies for full data)
  2. Run the script
  3. The CSV is saved next to the CATProduct file (or to ~/Downloads if unsaved)

Output

CSV file: <ProductName>_BOM_Materials.csv

Column Content
Level Depth in the assembly tree (1 = direct child of root)
Part Number Component part number
Instance Name Component instance name
Description Component definition/description
Nomenclature Component nomenclature field
Mass_kg Calculated mass in kilograms
Material Applied material name
File Name Component file name

Notes

  • Mass and material require a material to be applied to the CATPart body in CATIA
  • If no material is applied the Material column shows N/A
  • If mass cannot be calculated the Mass_kg column shows N/A
  • The assembly is activated to terminal nodes and set to Design Mode before reading, to ensure all data is accessible
  • This script extends product-document/BOM Export To CSV with material and mass columns

Home


Getting Started


Contributing


Any Document Scripts


Drawing Document Scripts


Part Document Scripts


Shape Generation Scripts


Process Document Scripts


Product Document Scripts


Utility Scripts


Legal

Clone this wiki locally