Skip to content
KaiUR edited this page May 31, 2026 · 27 revisions

Pycatia Scripts Wiki

Welcome to the documentation for the Pycatia Scripts collection. These scripts automate common tasks in CATIA V5 using the pycatia (PyPI) Python library.


Requirements

Requirement Version
Python >= 3.10
pycatia >= 0.8.3 (>= 0.9.5 for Process scripts)
wxPython >= 4.2.5 (where required)
xlsxwriter (Process export scripts only)
CATIA V5 V5R32

Installation

See the Installation and Setup page for full instructions on setting up Python, pycatia, and configuring CATIA V5 to run scripts.


Script Categories

Scripts that work on Part, Product, Process, or Drawing documents.

Script Description
Copy Name and Colour Copies the name, colour, line weight and line type from one element to a selection of elements
Export Properties To CSV Exports standard and user-defined document properties to CSV
Find And Select By Name Find and select all elements whose names contain a search string
Hide Planes And Axis Systems Hides all planes and axis systems in the active document
Rename Hybrid Shapes Renames multiple selected hybrid shapes in one go
Replace Name Hybrid Shapes Find and replace text in the names of selected hybrid shapes
Reset Visual Properties Reset colour, line weight, line type and opacity of selected elements to CATIA defaults
Screenshot White Background Captures a white-background screenshot of the active 3D view to PNG
Swap Names Swap the names of two selected elements
Toggle Show Hide Geometric Set Toggle the visibility of a selected geometric set and all its children

Scripts that work on CATDrawing documents.

Script Description
Add Border And Title Block Adds an ISO 5457 border and title block to the active sheet of an open CATDrawing
Add Border And Title Block With Values Adds an ISO 5457 border and title block to the active sheet, with a dialog to enter field values
Batch CATDrawing To DXF Exports all CATDrawing files in a selected folder to DXF
Batch CATDrawing To PDF Exports all CATDrawing files in a selected folder to PDF
Create Drawing Border And Title Block Creates a new CATDrawing with an ISO 5457 border and ISO 7200-style title block for A0–A4 paper sizes
Create Drawing Border And Title Block With Values Creates a new CATDrawing with an ISO 5457 border and title block, with a dialog to enter field values
Export Drawing Dimensions To CSV Exports all dimensions from the active CATDrawing to CSV
Update All Drawing Views Forces an update of all views across all sheets in the active drawing document
Update Title Block From Properties Maps document properties to drawing title block text fields via a GUI dialog

Scripts that require an open CATPart document.

Script Description
Axis To Axis Keep History Moves hybrid shapes from one axis system to another, preserving parametric history
Axis To Axis Keep History And Structure Axis-to-axis transformation on all shapes in a geometric set, preserving history and structure
Axis To Axis Keep Name Moves hybrid shapes from one axis system to another, preserving names
Axis To Axis Keep Name And Structure Axis-to-axis transformation on all shapes in a geometric set, preserving names and structure
Batch Isolate Geometric Set Isolates every element in a geometric set as a datum in one operation
Check Duplicate Names In Geometric Set Scans a geometric set and reports any elements that share a name
Check Open Bodies Checks all solid bodies in the active part for open (zero-volume) geometry
Colour Code By Geometric Set Assigns a unique colour from an HSV palette to every shape in each child geometric set
Copy Geometric Set To New Part Copies a selected geometric set and all its contents into a new blank CATPart
Copy Parameters Between Parts Copies selected parameters from one open CATPart to another via a GUI dialog
Create Construction Planes Creates a series of evenly spaced offset planes from a reference plane
Create ISM OSM STEP Files Creates two STEP files from ISM and OSM surfaces
Create Spline From Coordinates Creates a GSD point set and spline from X Y (or X Y Z) coordinates loaded from a file or pasted into the dialog
Delete Deactivated Features Deletes all deactivated hybrid shapes inside a selected geometric set
Export 3D Annotations To CSV Exports all FTA 3D annotations from the active part to CSV
Export All Parameters To CSV Exports all parameters from the active part to CSV
Export Curve Lengths Surface Areas To CSV Exports curve lengths and surface areas from a geometric set to CSV
Export Geometric Set Structure To CSV Exports the full geometric set tree and its contents to CSV
Export Holes To CSV Exports all holes with type, diameter, depth, thread, and position to CSV
Export Mass CoG Inertia To CSV Exports mass, centre of gravity and inertia tensor from all solid bodies to CSV
Export Parameter Dependencies To CSV Exports all parameters with their formula dependencies to a CSV file
Export Points Axis and Geo Set To CSV Exports points from a geometric set to CSV relative to a selected axis
Export Points Axis and Geo Set To XYZ Exports points from a geometric set to XYZ relative to a selected axis
Export Points Geo Set To CSV Exports points from a geometric set to CSV relative to the absolute axis
Export Points Geo Set To XYZ Exports points from a geometric set to XYZ relative to the absolute axis
Export Sketch Constraints To CSV Exports all sketch constraints and dimensions from the active part to a CSV file
Extract Boundary Curves Extracts boundary edges of a selected surface as datum curves
IGES Export Curve Axis Exports curves as IGES after moving them to the absolute axis
Insert Points Catia Imports points from a TXT or CSV file into CATIA
Insert Points Catia Keep History Imports points from a TXT or CSV file into CATIA, preserving parametric history
Insert Points Catia With Names Imports named points from a TXT or CSV file into CATIA
Insert Points Catia With Names Keep History Imports named points from a TXT or CSV file into CATIA, preserving parametric history
Join Explicit No Connect Joins surfaces or curves without checking for connexity
Join Explicit No Connect Curve Joins curves without checking for connexity
Join Explicit No Connect Surface Joins surfaces without checking for connexity
List Properties To CSV Exports name, type, colour, line weight, line type and opacity for all shapes in a geometric set to CSV
Match Properties In Geometric Set Applies the visual properties of a source element to all shapes in a selected geometric set
Measure Curve With 3 Points As Circle Measures the radius of a curve by fitting a 3-point circle
Measure Curve With 3 Points As Circle Keep Con Same as above but keeps the construction geometry
Measure Radius Surface Measures the radius of a surface by intersection and 3-point circle
Measure Radius Surface Keep Con Same as above but keeps the construction geometry
Measure Radius Surface Keep Con Auto Edge Measures the radius of all border edges of a surface automatically, keeping construction geometry
Mirror Keep History Mirrors hybrid shapes while preserving parametric history
Mirror Keep History And Structure Mirrors all shapes in a geometric set, preserving history and structure
Mirror Keep Name Mirrors hybrid shapes while keeping the names
Mirror Keep Name And Structure Mirrors all shapes in a geometric set, preserving names and structure
Publish Hybrid Shapes In Geometric Set Publishes all hybrid shapes in a selected geometric set
Reorder Geometric Set Alphabetically Sorts all elements inside a geometric set alphabetically by name
Rotate Angle Keep History Rotates hybrid shapes by an angle around an axis, preserving parametric history
Rotate Angle Keep History And Structure Rotates all shapes in a geometric set by angle, preserving history and structure
Rotate Angle Keep Name Rotates hybrid shapes by an angle around an axis, preserving names
Rotate Angle Keep Name And Structure Rotates all shapes in a geometric set by angle, preserving names and structure
Rotate Three Points Keep History Rotates hybrid shapes using three points, preserving parametric history
Rotate Three Points Keep History And Structure Rotates all shapes in a geometric set using three points, preserving history and structure
Rotate Three Points Keep Name Rotates hybrid shapes using three points, preserving names
Rotate Three Points Keep Name And Structure Rotates all shapes in a geometric set using three points, preserving names and structure
Scale Keep History Scales hybrid shapes while preserving parametric history
Scale Keep History And Structure Scales all shapes in a geometric set, preserving history and structure
Scale Keep Name Scales hybrid shapes while keeping the names
Scale Keep Name And Structure Scales all shapes in a geometric set, preserving names and structure
Select By Colour Selects all shapes in a geometric set whose colour matches a chosen source element
Spline Through Points In Geometric Set Creates a spline through all points in a selected geometric set
Translate Direction Distance Keep History Translates hybrid shapes by direction and distance, preserving parametric history
Translate Direction Distance Keep History And Structure Translates all shapes in a geometric set by direction and distance, preserving history and structure
Translate Direction Distance Keep Name Translates hybrid shapes by a direction and distance, preserving names
Translate Direction Distance Keep Name And Structure Translates all shapes in a geometric set by direction and distance, preserving names and structure

Scripts that generate geometry from mathematical definitions or user-supplied coordinates.

Script Description
Custom Coordinate Airfoil Generator Generates a GSD point set and spline from user-supplied X Y (or X Y Z) coordinates loaded from a file or pasted into the dialog
Ellipse Generator Generates an ellipse as a point set and closed GSD spline from semi-major and semi-minor axes
Involute Gear Generator Generates a fully parametric involute spur gear
NACA 4 Digit Airfoil Generator Generates a NACA 4-digit series airfoil as a GSD point set and closed spline at a user-defined chord length and resolution
NACA 5 Digit Airfoil Generator Generates a NACA 5-digit series airfoil as a GSD point set and closed spline at a user-defined chord length and resolution
Plot 2D Function Plots y = f(x) as a GSD point set and spline from a user-entered math expression over a specified X range
Plot 3D Parametric Curve Plots a 3D parametric curve x(t), y(t), z(t) as a GSD point set and spline from user-entered expressions
Regular Polygon Generator Generates a regular polygon as vertices, edges, and a joined wire; supports custom plane and centre point selection
Sine Wave Curve Generator Generates a sine wave curve as a point set and GSD spline from amplitude, period, phase, and X range
Spring Generator Generates a parametric helical spring solid from user-defined parameters

Scripts that require an open CATProcess document.

Script Description
Check Operation Parameters Against Limits Checks all operation parameters against predefined min/max limits and flags violations
Export NC Program Names To CSV Exports all manufacturing program names and descriptions to CSV
Export Process Table Parameters Exports machining parameters from all operations to an Excel file
Export Resource List Exports the names of all resources in a process document to CSV
Export Tool List From Process Exports all cutting tools from a process document to Excel
Rename Operations From Tool Name Automatically renames each operation to match the assigned tool name

Scripts that require an open CATProduct document.

Script Description
Batch Instance Name Equal Part Number Sets every instance name in the active product tree to match its part number
Batch Rename Instances Batch renames all first-level instances with a configurable prefix, number, and suffix
BOM Export To CSV Exports a bill of materials from the active product to CSV
BOM Export With Materials Exports a bill of materials enriched with material name and mass to CSV
Check Missing Files Checks all component file references in the assembly for missing or broken links
Clash Detection Export Runs interference/clash detection on the active assembly and exports results to CSV
Export Assembly As STEP Exports the active product assembly as a single STEP file
Export Component Positions To CSV Exports the position matrix and translation of every component in the assembly to CSV
Save Child Parts To STEP Saves all child CATParts in a product to STEP files

Standalone utilities for managing the CATIA environment — no open document required.

Script Description
Backup CATIA Settings Zip up the CATSettings folder for selected CATIA V5 versions to a chosen backup location
Clear CATIA Temp Files Delete accumulated files from CATTemp and CATReport folders for selected CATIA V5 versions
Configure CATIA Version Settings Configure per-version settings paths and window titles for all installed CATIA V5 versions
Kill CATIA Processes Force-closes all running CATIA processes to clear stale COM registrations
Open CATIA Settings Folder Open the CATSettings folder for a selected CATIA V5 version in Windows Explorer
Reset CATIA Settings Delete the CATSettings folder for selected CATIA V5 versions to force a clean defaults reset
Restore CATIA Settings Restore a CATSettings folder from a zip backup created by Backup_CATIA_Settings.py
Set CATIA Environment Variable Add or update any key=value entry in CATIA V5 environment files for selected versions
Toggle CATIA No Start Document Add or remove CATNoStartDocument=yes in CATIA V5 environment files to control blank document on startup

Contributing

  • Writing Scripts — folder structure, header format, naming, persistent data pattern, and dialog conventions
  • Script Templates — copy-paste starting points for every document type and complexity level
  • Common Functions — reference helpers to copy into your script (geometric set navigation, datum creation, coordinate maths, file input)
  • CONTRIBUTING.md — full guidelines for submitting new scripts or reporting issues

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