-
Notifications
You must be signed in to change notification settings - Fork 0
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)
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.
| Requirement | Value |
|---|---|
| Python | >= 3.10 |
| pycatia | >= 0.8.3 |
| wxPython | Required |
| Open document | None required |
- Run the script from any open CATIA session
- A dialog opens — select the paper size
- Click OK — a new CATDrawing is created with the border and title block on the background view
| 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 |
ISO 5457 margins applied to all paper sizes:
| Edge | Margin |
|---|---|
| Left (binding) | 20 mm |
| Top | 10 mm |
| Right | 10 mm |
| Bottom | 10 mm |
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.
- 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
Getting Started
Contributing
- Copy Name and Colour
- Export Properties To CSV
- Find And Select By Name
- Hide Planes And Axis Systems
- Rename Hybrid Shapes
- Replace Name Hybrid Shapes
- Reset Visual Properties
- Screenshot White Background
- Swap Names
- Toggle Show Hide Geometric Set
- Add Border And Title Block
- Add Border And Title Block With Values
- Batch CATDrawing To DXF
- Batch CATDrawing To PDF
- Create Drawing Border And Title Block
- Create Drawing Border And Title Block With Values
- Export Drawing Dimensions To CSV
- Update All Drawing Views
- Update Title Block From Properties
- Update Title Block Headings
- Axis To Axis Keep History
- Axis To Axis Keep History And Structure
- Axis To Axis Keep Name
- Axis To Axis Keep Name And Structure
- Batch Isolate Geometric Set
- Check Duplicate Names In Geometric Set
- Check Open Bodies
- Colour Code By Geometric Set
- Copy Geometric Set To New Part
- Copy Parameters Between Parts
- Create Construction Planes
- Create Spline From Coordinates
- Create ISM OSM STEP Files
- Delete Deactivated Features
- Delete Hidden Elements In Geometric Set
- Export 3D Annotations To CSV
- Export All Parameters To CSV
- Export Curve Lengths Surface Areas To CSV
- Export Geometric Set Structure To CSV
- Export Holes To CSV
- Export Mass CoG Inertia To CSV
- Export Parameter Dependencies To CSV
- Export Points Axis and Geo Set To CSV
- Export Points Axis and Geo Set To XYZ
- Export Points Geo Set To CSV
- Export Points Geo Set To XYZ
- Export Sketch Constraints To CSV
- Extract Boundary Curves
- IGES Export Curve Axis
- Insert Points Catia
- Insert Points Catia Keep History
- Insert Points Catia With Names
- Insert Points Catia With Names Keep History
- Join Explicit No Connect
- Join Explicit No Connect Curve
- Join Explicit No Connect Surface
- List Properties To CSV
- Match Properties In Geometric Set
- Measure Curve With 3 Points As Circle
- Measure Curve With 3 Points As Circle Keep Con
- Measure Radius Surface
- Measure Radius Surface Keep Con
- Measure Radius Surface Keep Con Auto Edge
- Mirror Keep History
- Mirror Keep History And Structure
- Mirror Keep Name
- Mirror Keep Name And Structure
- Publish Hybrid Shapes In Geometric Set
- Reorder Geometric Set Alphabetically
- Rotate Angle Keep History
- Rotate Angle Keep History And Structure
- Rotate Angle Keep Name
- Rotate Angle Keep Name And Structure
- Rotate Three Points Keep History
- Rotate Three Points Keep History And Structure
- Rotate Three Points Keep Name
- Rotate Three Points Keep Name And Structure
- Scale Keep History
- Scale Keep History And Structure
- Scale Keep Name
- Scale Keep Name And Structure
- Select By Colour
- Spline Through Points In Geometric Set
- Translate Direction Distance Keep History
- Translate Direction Distance Keep History And Structure
- Translate Direction Distance Keep Name
- Translate Direction Distance Keep Name And Structure
- Custom Coordinate Airfoil Generator
- Ellipse Generator
- Hole Size Test Plate Generator
- Involute Gear Generator
- NACA 4 Digit Airfoil Generator
- NACA 5 Digit Airfoil Generator
- Plot 2D Function
- Plot 3D Parametric Curve
- Regular Polygon Generator
- Sine Wave Curve Generator
- Spring Generator
- Check Operation Parameters Against Limits
- Export NC Program Names To CSV
- Export Process Table Parameters
- Export Resource List
- Export Tool List From Process
- Manage Program Names And Comments
- Manage Tooling Catalog
- Rename Operations From Tool Name
- Batch Instance Name Equal Part Number
- Batch Rename Instances
- BOM Export To CSV
- BOM Export With Materials
- Check Missing Files
- Clash Detection Export
- Export Assembly As STEP
- Export Component Positions To CSV
- Save Child Parts To STEP
- Save Child Parts To STL
- Backup CATIA Settings
- Clear Script Settings
- Clear CATIA Temp Files
- Configure CATIA Version Settings
- Kill CATIA Processes
- Open CATIA Settings Folder
- Reset CATIA Settings
- Restore CATIA Settings
- Set CATIA Environment Variable
- Toggle CATIA No Start Document
Legal