Skip to content

Navigation Menu

Sign in
Sign up

Rename Operations From Tool Name

KaiUR edited this page May 21, 2026 · 4 revisions

Rename Operations From Tool Name

File: Process_Document_Scripts/Rename_Operations_From_Tool_Name.py
Version: 1.0
Document Type: CATProcess


Description

Cycles through all manufacturing programs in the active process document and renames each operation to match the name of the tool assigned to it via the preceding tool change. Duplicate operation names within the same program are disambiguated by appending an incrementing number. Keeps the process tree readable and consistent.


Requirements

Requirement Value
Python >= 3.10
pycatia >= 0.9.5
wxPython Not required
Open document CATProcess with tool changes and operations

Usage

  1. Open a CATProcess document in CATIA
  2. Run the script — no user input is required
  3. All operations are renamed and a count of renames is printed to the console

Example

Before:

Program.1
 ToolChange (10mm Ball Nose)
 Sweeping.1
 Sweeping.2
 ToolChange (6mm Ball Nose)
 Sweeping.3

After:

Program.1
 ToolChange (10mm Ball Nose)
 10mm Ball Nose.1
 10mm Ball Nose.2
 ToolChange (6mm Ball Nose)
 6mm Ball Nose.1

Notes

  • Requires pycatia >= 0.9.5
  • Operations with no preceding tool change are left unchanged
  • The tool name used is taken from the resource assigned to the tool change, with any extra information in brackets stripped
  • The numbering suffix resets for each new program

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

AltStyle によって変換されたページ (->オリジナル) /