Customize Borders and Title Blocks in FreeCAD TechDraw

Customizing borders and title blocks in FreeCAD's TechDraw Workbench allows you to generate professional, standard-compliant technical drawings tailored to your organization's specific requirements. Because FreeCAD uses standard Scalable Vector Graphics (SVG) files for all TechDraw templates, you can modify existing layouts, adjust margin borders, add company logos, and configure dynamic, editable text fields using any vector graphics editor like Inkscape.

Understanding FreeCAD TechDraw Templates

FreeCAD TechDraw templates are composed of plain SVG files containing:

  • Geometry: Vector paths, lines, and rectangles defining the page border, margin guides, and title block grid.
  • Static Content: Fixed text labels (such as "Drawn By:", "Date:", or "Sheet:") and static graphic elements like corporate logos.
  • Editable Fields: Dynamic text elements flagged with custom XML attributes that allow FreeCAD users to click and edit values directly within the 3D program.

Step 1: Locate or Export a Base Template

The fastest way to create a custom template is to modify an existing one included with FreeCAD:

  1. Navigate to the FreeCAD template directory:
    • Windows: C:\Program Files\FreeCAD <version>\data\Mod\TechDraw\Templates\
    • Linux: /usr/share/freecad/Mod/TechDraw/Templates/ (or via Flatpak/Snap equivalent directories)
    • macOS: /Applications/FreeCAD.app/Contents/Resources/Mod/TechDraw/Templates/
  2. Select a base template that matches your desired page size and orientation (e.g., A4_Landscape_TD.svg or A3_Landscape_TD.svg).
  3. Copy the file to a dedicated, writable folder on your computer to avoid permission issues and prevent updates from overwriting your work.

Step 2: Edit Layout and Borders in Inkscape

Open your copied SVG file in an SVG editor like Inkscape:

  1. Adjust Borders and Grid Lines: Use the rectangle and line tools to draw your outer border, inner margin lines, and title block frame. Lock the outer paper dimension layer so you do not accidentally shift the document bounds.
  2. Add Static Graphics: Import your company logo (preferably in vector format: SVG or converted paths). Position it within the designated area inside the title block.
  3. Format Fixed Labels: Add standard static text labels such as "TITLE", "DRAWING NO.", "SCALE", and "REVISION". Ensure these labels use common system fonts (like Arial, Helvetica, or osifont) so they render consistently across different workstations.

Step 3: Define Editable Text Fields

For FreeCAD to recognize a text element as a fillable field, you must add the proprietary freecad:editable attribute in the SVG code.

  1. Create a dummy text item in Inkscape where the user input should appear (e.g., type AUTHOR_NAME).
  2. Open Inkscape's XML Editor (Edit > XML Editor or Ctrl + Shift + X).
  3. Select the text element in your drawing; it will automatically highlight the corresponding <text> node in the XML Editor.
  4. In the XML Editor's attribute panel:
    • Set the attribute name to: freecad:editable
    • Set the attribute value to a clear description, such as: Author
    • Click Set.
  5. Repeat this process for all necessary dynamic fields (e.g., Title, Date, Scale, SheetNumber, Revision).
  6. Ensure each text node has standard text anchor formatting (left, center, or right aligned) to prevent text from overflowing title block cells when typed in FreeCAD.

Step 4: Save the Template

  1. In Inkscape, go to File > Save As....
  2. Select **Plain SVG (*.svg)** instead of Inkscape SVG. This strips proprietary Inkscape tags and prevents rendering issues inside FreeCAD.

Step 5: Configure and Use the Template in FreeCAD

  1. Open FreeCAD and switch to the TechDraw Workbench.
  2. Go to Edit > Preferences > TechDraw > General.
  3. Under the Files section, set the Default Template path to your newly saved custom SVG file.
  4. To test your template, create a new TechDraw page using the Insert Page using Template icon.
  5. In the Tree view, expand the newly created Page object.
  6. Click on the green editable markers on the drawing canvas, or select the Template object in the Tree view and adjust the fields directly in the Data tab under the Properties panel.