Skip to content

Create Drawing Border And Title Block

KaiUR edited this page Jun 3, 2026 · 2 revisions

Create Drawing Border And Title Block

File: Drawing_Document_Scripts/Create_Drawing_Border_And_Title_Block.py
Version: 1.1
Document Type: None required (creates a new CATDrawing)


Description

Creates a new CATDrawing document and populates its background view with a standard ISO 5457 border and an ISO 7200-inspired title block. A dialog lets the user choose the paper size before the drawing is created.

The border follows ISO 5457 margins (left = 20 mm, top / right / bottom = 10 mm) for all paper sizes. The title block is 180 mm × 55 mm and is placed at the lower-right corner of the border. Each data field is created as a named, empty text item so that the Update Title Block From Properties script can fill in values from linked model properties automatically.


Requirements

Requirement Value
Python >= 3.10
pycatia >= 0.8.3
wxPython Required
Open document None required

Usage

  1. Run the script from any open CATIA session
  2. A dialog opens — select the paper size
  3. Click OK — a new CATDrawing is created with the border and title block on the background view

Paper Sizes

Option Width (mm) Height (mm)
A0 Landscape 1189 841
A1 Landscape 841 594
A2 Landscape 594 420
A3 Landscape 420 297
A4 Landscape 297 210
A4 Portrait 210 297

Border

ISO 5457 margins applied to all paper sizes:

Edge Margin
Left (binding) 20 mm
Top 10 mm
Right 10 mm
Bottom 10 mm

Title Block Layout

The title block is 180 mm wide × 55 mm tall and is placed at the lower-right corner of the border. It contains five rows (bottom to top):

Row Height Columns Named fields
Drawn By / Date / Approved 10 mm 60 / 60 / 60 mm Drawn_By, Date, Approved
Scale / Sheet / Revision 10 mm 60 / 60 / 60 mm Scale, Sheet, Revision
Part Number / Material 10 mm 120 / 60 mm Part_Number, Material
Title 15 mm Full width Title
Company Name 10 mm Full width (centred) Company

Each row contains a small field-name label (2 mm font) and an empty named value text (3.5 mm or 5 mm font). The named value texts can be populated later using Update Title Block From Properties.


Notes

  • The new drawing is left unsaved — save it manually after reviewing the result
  • Font sizes and margins follow ISO conventions but can be adjusted directly in the script constants at the top of the file
  • The projection symbol (first/third angle) is not drawn automatically — add it manually to the background view after creation
  • If the script is run on a sheet that already has content, it creates a new document rather than modifying the existing one

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