Description
Every TechDraw page is based on a Template object. The Template provides an area in the page background to insert views, symbols, and other annotation objects, and defines its paper size. Only elements within the drawing area will be rendered for export or printing.
The Template can also hold graphics like a frame defining the drawing area including index fields, folding marks, and optionally a title block that in turn contains fixed and editable texts. The title block can also be inserted separately as a symbol.
Templates, like symbols, are SVG files which can be created and modified outside of FreeCAD, either with an application such as Inkscape, or with a simple text editor. Both can contain editable text fields but they use different edit tools.
A new autofill tool (introduced in version 1.0) can automatically fill editable text fields in a template when it is inserted. This requires templates that use the new freecad:autofill attribute. The following attribute names are valid for autofill: "author", "date", "organization", "scale", "sheet", "title", "page_number", and "page_count".
Properties
See also: Property editor.
A Template object has the following properties:
Base
- DataOrientation (
Enumeration
): Portrait
or Landscape
.
Page Properties
- DataWidth (
Length
): Paper width in mm.
- DataHeight (
Length
): Paper height in mm.
- Data (Hidden)Editable Texts (
Map
): Key:Value list of editable texts in the template.
Template
- DataPage Result (
FileIncluded
): A copy of the original Template file including all changes to editable texts. This allows users who may not have a copy of the Template file to see the Page as intended. Not typically useful for end users.
- DataTemplate (
File
): A pointer to the copy of the original Template file which is incorporated into this *.FCStd file, or a filepath to a template accessible on the current machine. See the next paragraph for information on how to change the Template.
Select a different template file
To select a different template for a drawing:
- Locate the desired Page object in the Tree view.
- Expand the Page node if necessary.
- Select the Template object.
- In the Property editor click in the DataTemplate property field.
- Press the ... (ellipsis) button that appears.
- A file dialog opens the folder the current template is located in. If the Page was created in the current FreeCAD session this will be the default template folder (as set in the TechDraw Preferences).
- Optionally browse to another folder.
- Select a different template file.
- Press the OK button.
If you have modified a template file and want to update a Page created in the current FreeCAD session that uses this template, temporarily select a different file first, and then select the modified file again.
Custom Templates
A limited number of pre-formatted templates in various standard page sizes are included with FreeCAD. These are found in
$INSTALL_DIR/Mod/TechDraw/Templates/
Where $INSTALL_DIR
is the directory where FreeCAD was installed, for example
/usr/share/freecad/Mod/TechDraw/Templates/
Custom templates can also be specified as a default in the TechDraw Preferences.
See also How to make a custom TechDraw template, or, if you prefer script generated templates, TechDraw TemplateGenerator and Macro TemplateHelper.
Notes
- The library FreeCAD uses to process SVG only supports the svg-tiny specification. In particular: "SVG Tiny does not support gradients, transparency, clipping, masks, symbols, patterns, underline text, strike through text, vertical text, or SVG filter effects." (from Adobe Illustrator Help). Using these features in your custom template will cause problems in rendering.
- Svg transform clauses may cause problems in custom templates. See a Stackoverflow discussion on removing transform clauses in SVG files, especially if Inkscape used too many of them. But they can't be avoided if you need rotated text in your template.
- The xml:space="preserve" clause sometimes causes problems with text size and positioning. It is best to avoid/remove this clause from your custom template's SVG code.
- Templates work best when they contain no extraneous SVG code (called "garbage SVG" by some). There is a good article on removing garbage from SVG here. The article is in Russian.
TechDraw
- Pages: Insert Default Page, Insert Page using Template, Update template fields, Redraw Page, Print All Pages, Export Page as SVG, Export Page as DXF
- Views:
- TechDraw views: Insert View, Insert Broken View, Insert Section View, Insert Complex Section View, Insert Detail View, Insert Projection Group, Insert Clip Group, Insert SVG Symbol, Insert Bitmap Image, Share View, Turn View Frames On/Off, Project Shape
- Views from other workbenches: Insert Active View, Insert Draft Workbench Object, Insert BIM Workbench Object, Insert Spreadsheet View
- Stacking: Move view to top of stack, Move view to bottom of stack, Move view up one level, Move view down one level
- Dimensions: Insert Dimension, Insert Length Dimension, Insert Horizontal Dimension, Insert Vertical Dimension, Insert Radius Dimension, Insert Diameter Dimension, Insert Angle Dimension, Insert 3-Point Angle Dimension, Insert Area Annotation, Create Arc Length Dimension, Insert Horizontal Extent Dimension, Insert Vertical Extent Dimension, Create Horizontal Chain Dimensions, Create Vertical Chain Dimensions, Create Oblique Chain Dimensions, Create Horizontal Coordinate Dimensions, Create Vertical Coordinate Dimensions, Create Oblique Coordinate Dimensions, Create Horizontal Chamfer Dimension, Create Vertical Chamfer Dimension, Insert Balloon Annotation, Insert Axonometric Length Dimension, Insert Landmark Dimension, Dimension Repair, Link Dimension to 3D Geometry
- Hatching: Hatch Face using Image File, Apply Geometric Hatch to Face,
- Annotations: Insert Annotation, Add Leaderline to View, Insert Rich Text Annotation, Add Cosmetic Vertex, Add Midpoint Vertices, Add Quadrant Vertices, Add Centerline to Faces, Add Centerline between 2 Lines, Add Centerline between 2 Points, Add Cosmetic Line Through 2 points, Add Cosmetic Circle, Change Appearance of Lines, Show/Hide Invisible Edges, Add Welding Information to Leader, Add Surface Finish Symbol, Add Hole or Shaft Tolerances
- Extensions:
- Attributes and modifications: Select Line Attributes, Cascade Spacing and Delta Distance, Change Line Attributes, Extend Line, Shorten Line, Lock/Unlock View, Position Section View, Position Horizontal Chain Dimensions, Position Vertical Chain Dimensions, Position Oblique Chain Dimensions, Cascade Horizontal Dimensions, Cascade Vertical Dimensions, Cascade Oblique Dimensions, Calculate the area of selected faces, Calculate the arc length of selected edges, Customize format label
- Centerlines and threading: Add Circle Centerlines, Add Bolt Circle Centerlines, Add Cosmetic Thread Hole Side View, Add Cosmetic Thread Hole Bottom View, Add Cosmetic Thread Bolt Side View, Add Cosmetic Thread Bolt Bottom View, Add Cosmetic Intersection Vertex(es), Add an offset vertex, Add Cosmetic Circle, Add Cosmetic Arc, Add Cosmetic Circle 3 Points, Add Cosmetic Parallel Line, Add Cosmetic Perpendicular Line
- Dimensions: Insert '⌀' Prefix, Insert '□' Prefix, Insert 'n×' Prefix, Remove Prefix, Increase Decimal Places, Decrease Decimal Places
User documentation
- Getting started
- Installation: Download, Windows, Linux, Mac, Additional components, Docker, AppImage, Ubuntu Snap
- Basics: About FreeCAD, Interface, Mouse navigation, Selection methods, Object name, Preferences, Workbenches, Document structure, Properties, Help FreeCAD, Donate
- Help: Tutorials, Video tutorials
- Workbenches: Std Base, Assembly, BIM, CAM, Draft, FEM, Inspection, Material, Mesh, OpenSCAD, Part, PartDesign, Points, Reverse Engineering, Robot, Sketcher, Spreadsheet, Surface, TechDraw, Test Framework