TechDrawGui API: Difference between revisions
Wandererfan (talk | contribs) (Created page with "<translate> <!--T:1--> 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...") |
Wandererfan (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
<!--T:1--> |
<!--T:1--> |
||
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. |
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|TechDraw API]] for more functions. |
|||
<!--T:2--> |
<!--T:2--> |
||
Line 25: | 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]]. |
|||
<!--T:4--> |
<!--T:4--> |
Revision as of 23:29, 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)
Description: save a copy of pageObject in Pdf format to location filePath
Returns: none
Description: save a copy of pageObject in Svg format to location filePath
Returns: none
Back to TechDraw module.