TechDrawGui API: Difference between revisions

From FreeCAD Documentation
No edit summary
No edit summary
Line 27: Line 27:
{{APIFunction|exportPageAsSvg|pageObject, filePath|save a copy of pageObject in Svg format to location filePath|none}}
{{APIFunction|exportPageAsSvg|pageObject, filePath|save a copy of pageObject in Svg format to location filePath|none}}


Back to [[TechDraw_Module|TechDraw module]].
Back to [[TechDraw_Module|TechDraw]].


<!--T:4-->
<!--T:4-->

Revision as of 23:32, 2 February 2018

These functions are part of the TechDrawGui module 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 TechDraw.