TechDrawGui API: Difference between revisions

From FreeCAD Documentation
(Improve code and links)
No edit summary
Line 2: Line 2:
<translate>
<translate>
<!--T:1-->
<!--T:1-->
These functions are part of the [[TechDraw Workbench]] and can be used in scripts and macros or from the python interpreter, once the <code>TechDrawGui</code> module has been imported.
These functions are part of the [[TechDraw Workbench]] and can be used in scripts and macros or from the [[Python]] interpreter, once the <code>TechDrawGui</code> module has been imported.


<!--T:5-->
<!--T:5-->

Revision as of 04:54, 27 October 2018

These functions are part of the TechDraw Workbench and can be used in scripts and macros or from the Python interpreter, once the TechDrawGui module has been imported.

See the TechDraw API for more functions.

Example:

import FreeCAD
import TechDrawGui

p = FreeCAD.ActiveDocument.Page

f = "/home/localuser/myPdfDirectory/savePage.pdf"
TechDrawGui.exportPageAsPdf(p, f)

f = "/home/localuser/mySvgDirectory/savePage.svg"
TechDrawGui.exportPageAsSvg(p, f)


exportPageAsPdf(pageObject, filePath)

Description: save a copy of pageObject in PDF format to location filePath

Returns: none

exportPageAsSvg(pageObject, filePath)

Description: save a copy of pageObject in SVG format to location filePath

Returns: none

Back to the TechDraw Workbench.