-
Notifications
You must be signed in to change notification settings - Fork 0
Manage Tooling Catalog
File: Process_Document_Scripts/Manage_Tooling_Catalog.py
Version: 1.0
Document Type: None — CATIA must be running, but no document need be open
A grid (spreadsheet) editor for CATIA NC tooling catalogs. Pick a resource chapter (NC_TOOLS, NC_INSERTS, NC_TOOL_ASSEMBLIES, NC_CORRECTORS) and a tool-type family, and that family's real CATIA keyword columns load into an editable grid. Tools are rows: add, duplicate, delete, edit cells inline, and add extra keyword columns.
The whole tree is saved as a single CSV in CATIA's batch-catalog format, and the .catalog is built from it. CATIA exposes no automation to edit an existing .catalog in place, so the CSV is the source of truth and the catalog is rebuilt from it each time.
The catalog is written with the full NC_RESOURCES tree — every resource chapter and every tool family, whether or not it holds any tools — as a hand-built tooling catalog has.
| Requirement | Value |
|---|---|
| Python | >= 3.10 |
| pycatia | >= 0.10.0 |
| wxPython | Required |
| xlsxwriter | Not required |
| Open document | None — CATIA running is enough |
| CATIA macros | Must be permitted; Build runs a generated macro |
- Start CATIA — no document needs to be open
- Run the script
- Choose a chapter and a tool family from the dropdowns
- Edit tools in the grid:
- Add Row / Duplicate Row / Delete Row
- Add Column to add a keyword the family list is missing
-
Browse CATPart Path (or double-click a
CATPart Pathcell) to link the part that physically represents the tool
- Save CSV writes the whole tree in CATIA's batch-catalog format
- Load CSV reads a saved catalog CSV back into the grid
-
Build Catalog creates the
.catalog
The built catalog has the standard tooling layout:
NC_RESOURCES
├── NC_TOOLS
│ ├── MfgDrillTool
│ ├── MfgEndMillTool
│ └── ... (all tool families)
├── NC_INSERTS
├── NC_TOOL_ASSEMBLIES
└── NC_CORRECTORS
Empty chapters and empty families are still created, so the catalog is complete and ready to be filled later.
Keyword types are taken from the batch catalogs CATIA ships in <CATIA>\win_b64\startup\Manufacturing\Samples. CATIA types dimensional keywords with unit tokens, not Real:
| Type token | Meaning | Example keyword |
|---|---|---|
mm |
Length | MFG_NOMINAL_DIAM |
deg |
Angle | MFG_MAX_PLNG_ANG |
s |
Time | MFG_MAX_MIL_TIME |
m_mn |
Velocity | MFG_VC_ROUGH |
mm_mn |
Linear feed rate | MFG_MAX_FEEDRATE |
mm_turn |
Angular feed rate | MFG_SZ_ROUGH |
String / Integer / Boolean
|
— |
MFG_NAME, MFG_TOOL_NUMBER, MFG_BALL_TYPE
|
Keywords not covered by CATIA's samples fall back to a unit-aware guess based on the keyword name.
-
Dropdowns on keywords with a fixed value set (
MFG_WAY_OF_ROT,MFG_MACH_QUALITY,MFG_COMPOSITION,MFG_TOOTH_MAT) and on boolean keywords (TRUE/FALSE). The list opens on a single click. - CATPart Path column with a file browser, for the part that physically represents the tool or assembly.
- Families whose keyword lists may be incomplete are flagged in the window with a warning — use Add Column to fill the gaps.
-
Build runs a generated macro. Calling
CreateCatalogFromcsvover COM from Python produces a catalog rooted at an emptyChapter.1with the real tree unreachable inside it, even though CATIA reports success. The identical call made from a CATScript running inside CATIA produces the correct catalog. The script therefore writes a small.CATScriptto%TEMP%\catia_macros\and asks CATIA to run it viaSystemService.ExecuteScript. This is a CATIA behaviour, not a pycatia one — it reproduces with rawwin32comand with CATIA's own shipped sample CSV. - CATPart Path is not written to the catalog CSV. It is not a CATIA keyword, so it is carried in the app's own CSV only. Save reports how many values were left out.
-
Load accepts catalogs saved by earlier runs, including files written before the
Keywords/Typesrow labels were added. - Settings (last CSV, last folders) are stored in
%APPDATA%\pycatia_scripts\Manage_Tooling_Catalog\.
Getting Started
Contributing
- Copy Name and Colour
- Export Properties To CSV
- Find And Select By Name
- Hide Planes And Axis Systems
- Rename Hybrid Shapes
- Replace Name Hybrid Shapes
- Reset Visual Properties
- Screenshot White Background
- Swap Names
- Toggle Show Hide Geometric Set
- Add Border And Title Block
- Add Border And Title Block With Values
- Batch CATDrawing To DXF
- Batch CATDrawing To PDF
- Create Drawing Border And Title Block
- Create Drawing Border And Title Block With Values
- Export Drawing Dimensions To CSV
- Update All Drawing Views
- Update Title Block From Properties
- Update Title Block Headings
- Axis To Axis Keep History
- Axis To Axis Keep History And Structure
- Axis To Axis Keep Name
- Axis To Axis Keep Name And Structure
- Batch Isolate Geometric Set
- Check Duplicate Names In Geometric Set
- Check Open Bodies
- Colour Code By Geometric Set
- Copy Geometric Set To New Part
- Copy Parameters Between Parts
- Create Construction Planes
- Create Spline From Coordinates
- Create ISM OSM STEP Files
- Delete Deactivated Features
- Delete Hidden Elements In Geometric Set
- Export 3D Annotations To CSV
- Export All Parameters To CSV
- Export Curve Lengths Surface Areas To CSV
- Export Geometric Set Structure To CSV
- Export Holes To CSV
- Export Mass CoG Inertia To CSV
- Export Parameter Dependencies To CSV
- Export Points Axis and Geo Set To CSV
- Export Points Axis and Geo Set To XYZ
- Export Points Geo Set To CSV
- Export Points Geo Set To XYZ
- Export Sketch Constraints To CSV
- Extract Boundary Curves
- IGES Export Curve Axis
- Insert Points Catia
- Insert Points Catia Keep History
- Insert Points Catia With Names
- Insert Points Catia With Names Keep History
- Join Explicit No Connect
- Join Explicit No Connect Curve
- Join Explicit No Connect Surface
- List Properties To CSV
- Match Properties In Geometric Set
- Measure Curve With 3 Points As Circle
- Measure Curve With 3 Points As Circle Keep Con
- Measure Radius Surface
- Measure Radius Surface Keep Con
- Measure Radius Surface Keep Con Auto Edge
- Mirror Keep History
- Mirror Keep History And Structure
- Mirror Keep Name
- Mirror Keep Name And Structure
- Publish Hybrid Shapes In Geometric Set
- Reorder Geometric Set Alphabetically
- Rotate Angle Keep History
- Rotate Angle Keep History And Structure
- Rotate Angle Keep Name
- Rotate Angle Keep Name And Structure
- Rotate Three Points Keep History
- Rotate Three Points Keep History And Structure
- Rotate Three Points Keep Name
- Rotate Three Points Keep Name And Structure
- Scale Keep History
- Scale Keep History And Structure
- Scale Keep Name
- Scale Keep Name And Structure
- Select By Colour
- Spline Through Points In Geometric Set
- Translate Direction Distance Keep History
- Translate Direction Distance Keep History And Structure
- Translate Direction Distance Keep Name
- Translate Direction Distance Keep Name And Structure
- Custom Coordinate Airfoil Generator
- Ellipse Generator
- Hole Size Test Plate Generator
- Involute Gear Generator
- NACA 4 Digit Airfoil Generator
- NACA 5 Digit Airfoil Generator
- Plot 2D Function
- Plot 3D Parametric Curve
- Regular Polygon Generator
- Sine Wave Curve Generator
- Spring Generator
- Check Operation Parameters Against Limits
- Export NC Program Names To CSV
- Export Process Table Parameters
- Export Resource List
- Export Tool List From Process
- Manage Program Names And Comments
- Manage Tooling Catalog
- Rename Operations From Tool Name
- Batch Instance Name Equal Part Number
- Batch Rename Instances
- BOM Export To CSV
- BOM Export With Materials
- Check Missing Files
- Clash Detection Export
- Export Assembly As STEP
- Export Component Positions To CSV
- Save Child Parts To STEP
- Save Child Parts To STL
- Backup CATIA Settings
- Clear Script Settings
- Clear CATIA Temp Files
- Configure CATIA Version Settings
- Kill CATIA Processes
- Open CATIA Settings Folder
- Reset CATIA Settings
- Restore CATIA Settings
- Set CATIA Environment Variable
- Toggle CATIA No Start Document
Legal