Skip to content

List Properties To CSV

KaiUR edited this page May 22, 2026 · 4 revisions

List Properties To CSV

File: Part_Document_Scripts/List_Properties_To_CSV.py
Version: 1.1
Document Type: Part


Description

Exports the name, geometry type and visual properties of every hybrid shape in a selected geometric set (recursively including all child sets) to a CSV file. Useful for auditing visual styles, generating a reference style sheet, or comparing properties across parts.

The CSV is saved next to the CATPart. If the document has not been saved, the file is written to the Downloads folder instead.


Requirements

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

Usage

  1. Open a CATPart document containing a geometric set
  2. Run the script
  3. A CATIA selection prompt appears — select the geometric set to export
  4. The script iterates all shapes recursively and writes the CSV
  5. The output path is printed to the console on completion

CSV Columns

Column Description
Geometric Set Full path of the containing set (e.g. Surfaces/ISM)
Name Shape name
Type Geometry type name from GeometricalFeatureType enum (e.g. Point, Curve, Line, Circle, Surface, Plane, Solid_Volume)
R / G / B Real colour components (0–255), or N/A if undefined
Line Weight Human-readable weight (e.g. 1.0mm), or N/A if undefined
Line Type Human-readable type (e.g. Solid, Dashed), or N/A if undefined
Opacity Transparency level (e.g. 100%, 50%), or N/A if undefined

Line Weight Values

Index Weight
1 0.13 mm
2 0.35 mm
3 0.7 mm
4 1.0 mm
5 1.4 mm
6 2.0 mm
7 2.3 mm
8 2.6 mm
9–55 0.13 mm (custom slots)

Line Type Values

Index Name
1 Solid
2 Dashed
3 Long Dash
4 Dash-Dot
5 Dash-Double Dot
6 Dotted
7 Long Dash-Dot

Notes

  • Geometry type is resolved using the GeometricalFeatureType enum; unknown values are written as Unknown(<int>)
  • Properties with status catVisPropertyUnDefined (e.g. line weight on a point) are written as N/A
  • The output filename follows the pattern <PartName>_<SetName>_Properties.csv

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