TechDraw Templates: Difference between revisions

From FreeCAD Documentation
No edit summary
No edit summary
(26 intermediate revisions by 6 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
<translate>
<translate>
<!--T:27-->
__NOTOC__
{{Docnav
===Overview=== <!--T:10-->
|[[TechDraw_LineGroup|Line Groups]]
|[[TechDraw_Hatching|Hatching]]
|[[TechDraw_Module|TechDraw]]
|IconL=
|IconC=Workbench_TechDraw.svg
|IconR=
}}

</translate>
{{TOCright}}
<translate>
== Overview == <!--T:10-->


<!--T:11-->
<!--T:11-->
Every TechDraw Page is based on a Template. The Template controls paper size and contains all the "pre-printed" text and graphics of the page. The Template can also contain editable text fields for attributes like "Title", "Author", "Scale".
Every TechDraw page is based on a Template object. The Template controls paper size and contains fixed text graphics and text, for example, a page frame or border.

<!--T:22-->
The Template can also contain editable text fields for attributes like ''Title'', ''Subtitle'', ''Author'', ''Date'', ''Scale'', ''Weight'', ''Drawing number'' and ''Sheet''.


<!--T:12-->
<!--T:12-->
Templates are Svg files and are created and modified outside of FreeCAD.
Templates are [[SVG]] files which can be created and modified outside of FreeCAD, with an application such as [https://en.wikipedia.org/wiki/Inkscape Inkscape].


===Properties=== <!--T:13-->
== Properties == <!--T:13-->


<!--T:14-->
<!--T:14-->
Line 19: Line 34:
* {{PropertyData|Template}}: a) A pointer to the copy of the original Template file which is incorporated into this *.FCSTD file, or b) a filepath to a template accessible on the current machine. Use the file selection ellipsis (...) to change to a different template.
* {{PropertyData|Template}}: a) A pointer to the copy of the original Template file which is incorporated into this *.FCSTD file, or b) a filepath to a template accessible on the current machine. Use the file selection ellipsis (...) to change to a different template.


===Custom Templates=== <!--T:15-->
== Custom Templates == <!--T:15-->


<!--T:16-->
<!--T:16-->
A limited number of pre-formatted Templates in various page sizes are included with FreeCAD. Custom Templates can also be created and specified as a default in [[TechDraw_Preferences|Preferences]].
A limited number of pre-formatted templates in various standard page sizes are included with FreeCAD. These are found in


</translate>
<!--T:17-->
{{Code|code=
[[TechDraw_TemplateHowTo|How to make a custom TechDraw template]]
$INSTALL_DIR/Mod/TechDraw/Templates/
}}
<translate>


<!--T:23-->
Where {{incode|$INSTALL_DIR}} is the directory where FreeCAD was installed, for example


</translate>
<!--T:18-->
{{Code|code=
Back to [[TechDraw_Module|TechDraw]].
/usr/share/freecad/Mod/TechDraw/Templates/
}}
<translate>

<!--T:24-->
Custom templates can also be specified as a default in the [[TechDraw Preferences]].

<!--T:17-->
See also [[TechDraw_TemplateHowTo|How to make a custom TechDraw template]].


===Notes=== <!--T:19-->
== Notes == <!--T:19-->


<!--T:20-->
<!--T:20-->
Line 37: Line 66:


<!--T:9-->
<!--T:9-->
* Svg transform clauses '''will cause problems''' in custom templates. See a Stackoverflow discussion on [https://stackoverflow.com/questions/13329125/removing-transforms-in-svg-files removing transform clauses in SVG files].
[[Category:User Documentation]]

<!--T:29-->
* 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.

<!--T:30-->
* Templates work best when they contain no extraneous SVG code (called "garbage SVG" by some). There is a good article on [https://freecad-gost.ru/news/gost-templates-techdraw-09-01-2020/ removing garbage from SVG here]. The article is in Russian.

<!--T:28-->
{{Docnav
|[[TechDraw_LineGroup|Line Groups]]
|[[TechDraw_Hatching|Hatching]]
|[[TechDraw_Module|TechDraw]]
|IconL=
|IconC=Workbench_TechDraw.svg
|IconR=
}}

<!--T:21-->
{{TechDraw Tools navi}}

<!--T:25-->
{{Userdocnavi}}

</translate>
</translate>
<languages/>

Revision as of 16:01, 8 February 2020

Overview

Every TechDraw page is based on a Template object. The Template controls paper size and contains fixed text graphics and text, for example, a page frame or border.

The Template can also contain editable text fields for attributes like Title, Subtitle, Author, Date, Scale, Weight, Drawing number and Sheet.

Templates are SVG files which can be created and modified outside of FreeCAD, with an application such as Inkscape.

Properties

  • DataOrientation: Portrait or Landscape.
  • DataWidth: Paper width in mm.
  • DataHeight: Paper height in mm.
  • DataPage Result: 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: a) A pointer to the copy of the original Template file which is incorporated into this *.FCSTD file, or b) a filepath to a template accessible on the current machine. Use the file selection ellipsis (...) to change to a different template.

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.

Notes

  • TechDraw Templates are not entirely interchangeable with Drawing Templates. In general, Drawing templates will work in TechDraw, but there may be problems with editable text.
  • 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.