Skip to content

Navigation Menu

Sign in
Sign up

Replace Name Hybrid Shapes

KaiUR edited this page May 21, 2026 · 4 revisions

Replace Name Hybrid Shapes

File: Any_Document_Scripts/Replace_Name_Hybrid_Shapes.py
Version: 1.1
Document Type: Part, Product, or Process


Description

A find-and-replace tool for hybrid shape names. Select multiple hybrid shapes, enter a search string and a replacement string, and the script replaces all occurrences of the search string in each shape's name. Shapes whose names do not contain the search string are left unchanged.


Requirements

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

Usage

  1. Open a Part, Product, or Process document containing hybrid shapes
  2. Run the script
  3. A CATIA selection prompt appears — select all the hybrid shapes you want to process, then click OK
  4. A Find and Replace dialog appears:
    • Find what: enter the text to search for
    • Replace with: enter the replacement text
  5. Click Replace All
  6. All occurrences of the search text in the selected shapes' names are replaced

Example

Original Name Find Replace Result
Surface_ISM_Left ISM OSM Surface_OSM_Left
Surface_ISM_Right ISM OSM Surface_OSM_Right
Curve_Top ISM OSM Curve_Top (unchanged)

Notes

  • The search is case-sensitive
  • All occurrences within a single name are replaced, not just the first
  • Shapes whose names do not contain the search string are silently skipped
  • If a boundary reference (Selection_) is selected instead of the hybrid shape directly, the script renames 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

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