TechDraw PageTemplate: Difference between revisions

From FreeCAD Documentation
('TechDraw Insert Default Page' is an over-correction.)
No edit summary
Line 3: Line 3:
<!--T:17-->
<!--T:17-->
{{Docnav
{{Docnav
|[[TechDraw PageDefault|Insert Default Page]]
|[[TechDraw_PageDefault|Insert Default Page]]
|[[TechDraw_RedrawPage|Redraw Page]]
|[[TechDraw_RedrawPage|Redraw Page]]
|[[TechDraw_Module|TechDraw]]
|[[TechDraw_Module|TechDraw]]
Line 16: Line 16:
|MenuLocation=TechDraw → Insert Page using Template
|MenuLocation=TechDraw → Insert Page using Template
|Workbenches=[[TechDraw_Module|TechDraw]]
|Workbenches=[[TechDraw_Module|TechDraw]]
|SeeAlso=[[TechDraw_PageDefault|Insert Default Page]], [[TechDraw_Templates|TechDraw Templates]]
|SeeAlso=[[TechDraw_PageDefault|TechDraw Insert Default Page]], [[TechDraw_Templates|TechDraw Templates]]
}}
}}


Line 25: Line 25:


<!--T:9-->
<!--T:9-->
The starting directory for the dialog can be specified in the [[TechDraw Preferences|TechDraw Preferences]].
The starting directory for the dialog can be specified in the [[TechDraw_Preferences|TechDraw Preferences]].


</translate>
</translate>
Line 37: Line 37:


<!--T:11-->
<!--T:11-->
* Press the {{Button|[[Image:TechDraw PageTemplate.svg|16px]] [[TechDraw PageTemplate|Insert Page using Template]]}} button
* Press the {{Button|[[Image:TechDraw PageTemplate.svg|16px]] [[TechDraw_PageTemplate|Insert Page using Template]]}} button


==Properties== <!--T:5-->
==Properties== <!--T:5-->
Line 48: Line 48:


<!--T:13-->
<!--T:13-->
{{Emphasis|See also:}} [[TechDraw API|TechDraw API]] and [[FreeCAD Scripting Basics|FreeCAD Scripting Basics]].
{{Emphasis|See also:}} [[TechDraw_API|TechDraw API]] and [[FreeCAD_Scripting_Basics|FreeCAD Scripting Basics]].


<!--T:14-->
<!--T:14-->
The New Pick tool can be used in [[macros|macros]] and from the [[Python|Python]] console by using the following functions:
The New Pick tool can be used in [[Macros|macros]] and from the [[Python|Python]] console by using the following functions:
</translate>
</translate>
{{Code|code=
{{Code|code=
Line 70: Line 70:


<!--T:20-->
<!--T:20-->
{{Emphasis|See also:}} [[TechDraw Templates|TechDraw Templates]] for more information on creating templates.
{{Emphasis|See also:}} [[TechDraw_Templates|TechDraw Templates]] for more information on creating templates.


<!--T:21-->
<!--T:21-->

Revision as of 21:51, 22 November 2020

TechDraw PageTemplate

Menu location
TechDraw → Insert Page using Template
Workbenches
TechDraw
Default shortcut
None
Introduced in version
-
See also
TechDraw Insert 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.