Skip to content

Swap Names

KaiUR edited this page May 21, 2026 · 3 revisions

Swap Names

File: Any_Document_Scripts/Swap_Names.py
Version: 1.0
Document Type: Part, Product, or Process


Description

Swaps the names of two selected elements. Useful when rebuilding geometry in a different order or correcting accidentally transposed names without having to remember both names and type them manually.


Requirements

Requirement Value
Python >= 3.10
pycatia >= 0.8.3
Open document Part, Product, or Process

Usage

  1. Open a Part, Product, or Process document
  2. Run the script
  3. A CATIA selection prompt appears — click the first element
  4. A second prompt appears — click the second element
  5. The two names are swapped

Notes

  • If a boundary reference (Selection_) is selected instead of the hybrid shape directly, the script swaps the name of the parent object

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