TechDraw PageTemplate: Difference between revisions

From FreeCAD Documentation
No edit summary
Tag: Manual revert
(MenuLocation)
Line 14: Line 14:
{{GuiCommand
{{GuiCommand
|Name=TechDraw PageTemplate
|Name=TechDraw PageTemplate
|MenuLocation=TechDraw → Insert Page using Template
|MenuLocation=TechDraw → Page → Insert Page using Template
|Workbenches=[[TechDraw_Workbench|TechDraw]]
|Workbenches=[[TechDraw_Workbench|TechDraw]]
|SeeAlso=[[TechDraw_PageDefault|TechDraw PageDefault]], [[TechDraw_Templates|TechDraw Templates]]
|SeeAlso=[[TechDraw_PageDefault|TechDraw PageDefault]], [[TechDraw_Templates|TechDraw Templates]]

Revision as of 08:28, 24 July 2023

TechDraw PageTemplate

Menu location
TechDraw → Page → Insert Page using Template
Workbenches
TechDraw
Default shortcut
None
Introduced in version
-
See also
TechDraw PageDefault, TechDraw Templates

Description

The TechDraw PageTemplate tool creates a new Page object using the template file selected from a dialog.

The starting directory for the dialog can be specified in the TechDraw Preferences.

One of the templates that comes with TechDraw: A4 ISO 7200_Pep, page in landscape orientation, with editable text fields

Usage

Properties

See TechDraw PageDefault.

Scripting

See also: Autogenerated API documentation and FreeCAD Scripting Basics.

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

templateFileSpec = QtGui.QFileDialog.getOpenFileName(self.baseWidget,
                                                     dialogCaption, 
                                                     dialogDir,
                                                     dialogFilter)
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.

See the information in Insert Default Page to programmatically change the editable text fields in a page template.