TechDraw PageTemplate: Difference between revisions

From FreeCAD Documentation
No edit summary
mNo edit summary
Line 3: Line 3:
<!--T:17-->
<!--T:17-->
{{Docnav
{{Docnav
|[[TechDraw_PageDefault|Default Page]]
|[[TechDraw_PageDefault|DefaultPage]]
|[[TechDraw_RedrawPage|Redraw Page]]
|[[TechDraw_RedrawPage|RedrawPage]]
|[[TechDraw_Module|TechDraw]]
|[[TechDraw_Module|TechDraw]]
|IconL=TechDraw_PageDefault.svg
|IconL=TechDraw_PageDefault.svg
Line 77: Line 77:
<!--T:18-->
<!--T:18-->
{{Docnav
{{Docnav
|[[TechDraw_PageDefault|Default Page]]
|[[TechDraw_PageDefault|DefaultPage]]
|[[TechDraw_RedrawPage|Redraw Page]]
|[[TechDraw_RedrawPage|RedrawPage]]
|[[TechDraw_Module|TechDraw]]
|[[TechDraw_Module|TechDraw]]
|IconL=TechDraw_PageDefault.svg
|IconL=TechDraw_PageDefault.svg

Revision as of 17:29, 26 April 2021

TechDraw PageTemplate

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

Description

The New Pick 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

  • DataProjection Type: Default projection type (First or Third Angle) for this Page.
  • DataScale: Default scale for Views in this Page.

Scripting

See also: TechDraw API 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.