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

Pycatia Scripts Wiki

Welcome to the documentation for the Pycatia Scripts collection. These scripts automate common tasks in CATIA V5 using the pycatia 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
any-document/Copy Name and Colour Copies the name, colour, line weight and line type from one element to a selection of elements
any-document/Export Properties To CSV Exports standard and user-defined document properties to CSV
any-document/Find And Select By Name Find and select all elements whose names contain a search string
any-document/Hide Planes And Axis Systems Hides all planes and axis systems in the active document
any-document/Rename Hybrid Shapes Renames multiple selected hybrid shapes in one go
any-document/Replace Name Hybrid Shapes Find and replace text in the names of selected hybrid shapes
any-document/Reset Visual Properties Reset colour, line weight, line type and opacity of selected elements to CATIA defaults
any-document/Screenshot White Background Captures a white-background screenshot of the active 3D view to PNG
any-document/Swap Names Swap the names of two selected elements
any-document/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
drawing-document/Batch CATDrawing To DXF Exports all CATDrawing files in a selected folder to DXF
drawing-document/Batch CATDrawing To PDF Exports all CATDrawing files in a selected folder to PDF
drawing-document/Export Drawing Dimensions To CSV Exports all dimensions from the active CATDrawing to CSV
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
part-document/Axis To Axis Keep History Moves hybrid shapes from one axis system to another, preserving parametric history
part-document/Axis To Axis Keep History And Structure Axis-to-axis transformation on all shapes in a geometric set, preserving history and structure
part-document/Axis To Axis Keep Name Moves hybrid shapes from one axis system to another, preserving names
part-document/Axis To Axis Keep Name And Structure Axis-to-axis transformation on all shapes in a geometric set, preserving names and structure
part-document/Batch Isolate Geometric Set Isolates every element in a geometric set as a datum in one operation
part-document/Check Duplicate Names In Geometric Set Scans a geometric set and reports any elements that share a name
part-document/Check Open Bodies Checks all solid bodies in the active part for open (zero-volume) geometry
part-document/Colour Code By Geometric Set Assigns a unique colour from an HSV palette to every shape in each child geometric set
part-document/Copy Geometric Set To New Part Copies a selected geometric set and all its contents into a new blank CATPart
part-document/Copy Parameters Between Parts Copies selected parameters from one open CATPart to another via a GUI dialog
part-document/Create Construction Planes Creates a series of evenly spaced offset planes from a reference plane
part-document/Create ISM OSM STEP Files Creates two STEP files from ISM and OSM surfaces
part-document/Delete Deactivated Features Deletes all deactivated hybrid shapes inside a selected geometric set
part-document/Export 3D Annotations To CSV Exports all FTA 3D annotations from the active part to CSV
part-document/Export All Parameters To CSV Exports all parameters from the active part to CSV
part-document/Export Curve Lengths Surface Areas To CSV Exports curve lengths and surface areas from a geometric set to CSV
part-document/Export Geometric Set Structure To CSV Exports the full geometric set tree and its contents to CSV
part-document/Export Holes To CSV Exports all holes with type, diameter, depth, thread, and position to CSV
part-document/Export Mass CoG Inertia To CSV Exports mass, centre of gravity and inertia tensor from all solid bodies to CSV
part-document/Export Points Axis and Geo Set To CSV Exports points from a geometric set to CSV relative to a selected axis
part-document/Export Points Axis and Geo Set To XYZ Exports points from a geometric set to XYZ relative to a selected axis
part-document/Export Points Geo Set To CSV Exports points from a geometric set to CSV relative to the absolute axis
part-document/Export Points Geo Set To XYZ Exports points from a geometric set to XYZ relative to the absolute axis
part-document/Extract Boundary Curves Extracts boundary edges of a selected surface as datum curves
part-document/IGES Export Curve Axis Exports curves as IGES after moving them to the absolute axis
part-document/Insert Points Catia Imports points from a TXT or CSV file into CATIA
part-document/Insert Points Catia Keep History Imports points from a TXT or CSV file into CATIA, preserving parametric history
part-document/Insert Points Catia With Names Imports named points from a TXT or CSV file into CATIA
part-document/Insert Points Catia With Names Keep History Imports named points from a TXT or CSV file into CATIA, preserving parametric history
part-document/Join Explicit No Connect Joins surfaces or curves without checking for connexity
part-document/Join Explicit No Connect Curve Joins curves without checking for connexity
part-document/Join Explicit No Connect Surface Joins surfaces without checking for connexity
part-document/List Properties To CSV Exports name, type, colour, line weight, line type and opacity for all shapes in a geometric set to CSV
part-document/Match Properties In Geometric Set Applies the visual properties of a source element to all shapes in a selected geometric set
part-document/Measure Curve With 3 Points As Circle Measures the radius of a curve by fitting a 3-point circle
part-document/Measure Curve With 3 Points As Circle Keep Con Same as above but keeps the construction geometry
part-document/Measure Radius Surface Measures the radius of a surface by intersection and 3-point circle
part-document/Measure Radius Surface Keep Con Same as above but keeps the construction geometry
part-document/Measure Radius Surface Keep Con Auto Edge Measures the radius of all border edges of a surface automatically, keeping construction geometry
part-document/Mirror Keep History Mirrors hybrid shapes while preserving parametric history
part-document/Mirror Keep History And Structure Mirrors all shapes in a geometric set, preserving history and structure
part-document/Mirror Keep Name Mirrors hybrid shapes while keeping the names
part-document/Mirror Keep Name And Structure Mirrors all shapes in a geometric set, preserving names and structure
part-document/Publish Hybrid Shapes In Geometric Set Publishes all hybrid shapes in a selected geometric set
part-document/Reorder Geometric Set Alphabetically Sorts all elements inside a geometric set alphabetically by name
part-document/Rotate Angle Keep History Rotates hybrid shapes by an angle around an axis, preserving parametric history
part-document/Rotate Angle Keep History And Structure Rotates all shapes in a geometric set by angle, preserving history and structure
part-document/Rotate Angle Keep Name Rotates hybrid shapes by an angle around an axis, preserving names
part-document/Rotate Angle Keep Name And Structure Rotates all shapes in a geometric set by angle, preserving names and structure
part-document/Rotate Three Points Keep History Rotates hybrid shapes using three points, preserving parametric history
part-document/Rotate Three Points Keep History And Structure Rotates all shapes in a geometric set using three points, preserving history and structure
part-document/Rotate Three Points Keep Name Rotates hybrid shapes using three points, preserving names
part-document/Rotate Three Points Keep Name And Structure Rotates all shapes in a geometric set using three points, preserving names and structure
part-document/Scale Keep History Scales hybrid shapes while preserving parametric history
part-document/Scale Keep History And Structure Scales all shapes in a geometric set, preserving history and structure
part-document/Scale Keep Name Scales hybrid shapes while keeping the names
part-document/Scale Keep Name And Structure Scales all shapes in a geometric set, preserving names and structure
part-document/Select By Colour Selects all shapes in a geometric set whose colour matches a chosen source element
part-document/Spline Through Points In Geometric Set Creates a spline through all points in a selected geometric set
part-document/Translate Direction Distance Keep History Translates hybrid shapes by direction and distance, preserving parametric history
part-document/Translate Direction Distance Keep History And Structure Translates all shapes in a geometric set by direction and distance, preserving history and structure
part-document/Translate Direction Distance Keep Name Translates hybrid shapes by a direction and distance, preserving names
part-document/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.

Script Description
shape-generation/Involute Gear Generator Generates a fully parametric involute spur gear
shape-generation/Spring Generator Generates a parametric helical spring solid from user-defined parameters

Scripts that require an open CATProcess document.

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

Scripts that require an open CATProduct document.

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

Contributing

  • Writing Scripts — folder structure, header format, naming, and the persistent data pattern
  • Script Templates — copy-paste starting points for every document type and complexity level
  • 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