Skip to content

Update Title Block From Properties

KaiUR edited this page May 21, 2026 · 2 revisions

Update Title Block From Properties

File: Drawing_Document_Scripts/Update_Title_Block_From_Properties.py
Version: 1.0
Document Type: Drawing (CATDrawing) with an associated Part or Product


Description

Reads all text elements from the active drawing sheet's background view and regular views, reads document properties from the first open CATPart or CATProduct in the session, and presents a mapping dialog. Each title block text field can be mapped to any available property. On confirmation the selected property values are written into the corresponding text elements.


Requirements

Requirement Value
Python >= 3.10
pycatia >= 0.8.3
wxPython Required
Open document CATDrawing + at least one open CATPart or CATProduct

Usage

  1. Open a CATDrawing in CATIA
  2. Ensure the associated CATPart or CATProduct is also open
  3. Run the script
  4. The mapping dialog appears with all title block text fields and available properties
  5. Select the property to map to each text field
  6. Click OK — the text fields are updated immediately

Dialog

The dialog shows a two-column list:

  • Text Item — the name of the text element in the drawing
  • Map to Property — dropdown with all available standard and user-defined properties from the model

Rows where no mapping is selected are left unchanged.


Notes

  • Only the active sheet is processed — other sheets are not modified
  • Text elements are identified by their CATIA object name, not their displayed text
  • Both background view text and foreground view text are included
  • Properties are read from the first open CATPart or CATProduct found in the session; if none is open the script exits with an error
  • The drawing is not saved automatically after updating

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