TechDraw "Вставить страницу по умолчанию"

From FreeCAD Documentation
Jump to navigation Jump to search
This page is a translated version of the page TechDraw PageDefault and the translation is 31% complete.
Outdated translations are marked like this.
Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎polski • ‎русский

TechDraw PageDefault.svg Вставить страницу по умолчанию

Системное название
Расположение в меню
TechDraw → Вставить страницу по умолчанию
Быстрые клавиши
Представлено в версии
См. также
Вставить страницу используя шаблон, Шаблоны TechDraw


The New Default tool creates a new Page object using the the template file specified in the TechDraw Preferences.

A4 LandscapeTD.svg

Default template that comes with TechDraw: A4 page in landscape orientation, with editable text fields



  • If a Page is marked as "do not keep updated" either through the KeepUpdated Property or by the setting in Preferences, it will ignore changes in the 3D model. You may notice anomalies (missing geometry, missing Dimension values, etc) in the appearance of the Page. These will correct themselves once the Page is updated with the Redraw Page tool. The Page will have this icon TechDraw Tree Page Unsync.svg in the tree while updating is suspended. This setting also affects the startup process. If the Page is marked "do not keep updated" it will not be drawn at program start.
  • If the default template is not specified in your user configuration file user.cfg, the tool will try:
Where $INSTALL_DIR is the directory where FreeCAD was installed, for example:




  • ДанныеProjection Type: Default projection type (First or Third Angle) for this Page.


  • ДанныеKeep Updated: If false, the Page is not updated with changes to the 3D model. Useful for complicated/slow drawings. See Notes.
  • ДанныеTemplate: A link to this Page's Template object.
  • ДанныеViews: A list of links to the Views on this Page.
  • ДанныеScale: Default scale for Views in this Page.
  • ДанныеNext Balloon Index: Auto-numbering for Balloons.




См. так же: TechDraw API и Основы составления скриптов FreeCAD.

The New Default tool can be used in macros and from the Python console by using the following functions:

page = FreeCAD.ActiveDocument.addObject('TechDraw::DrawPage','Page')
template = FreeCAD.ActiveDocument.addObject('TechDraw::DrawSVGTemplate','Template')
template.Template = templateFileSpec
page.Template = FreeCAD.ActiveDocument.Template
  • Creates a new Page in the current document

Editable text fields

See also: TechDraw Templates for more information on creating templates.

Once a new page has been created, its Template attribute holds an EditableTexts dictionary with the name of the editable fields (keys) and their textual values. Copy this dictionary to a variable, make changes, and then re-assign the dictionary to the EditableTexts attribute to see the changes.

page = FreeCAD.ActiveDocument.Page
texts = page.Template.EditableTexts

for key, value in texts.items():
    print("{0} = {1}".format(key, value))

texts["FC-Title"] = "The title of my page"
page.Template.EditableTexts = texts