56 lines
2.3 KiB
HTML
56 lines
2.3 KiB
HTML
<html><head><title>TechDrawGui API/en</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link type='text/css' href='wiki.css' rel='stylesheet'></head><body><h1>TechDrawGui API/en</h1></div>
|
|
|
|
<div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><hr/><div class="mw-parser-output"><p>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.
|
|
</p><p>See the <a href="TechDraw_API.html" title="TechDraw API">TechDraw API</a> for more functions.
|
|
</p><p>Example:
|
|
</p>
|
|
<pre>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) </pre>
|
|
<p><br />
|
|
</p>
|
|
<div class="api">
|
|
<div class="function"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Method.png" class="image"><img alt="Method.png" src="Method.png" width="16" height="16" /></a> <big><b>exportPageAsPdf</b></big> ( <i>pageObject, filePath</i> )</div>
|
|
<div class="description">
|
|
<p><small><b>Description</b>:</small> save a copy of pageObject in Pdf format to location filePath
|
|
</p><p><small><b>Returns</b>:</small> none
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<p><br />
|
|
</p>
|
|
<div class="api">
|
|
<div class="function"><a href="https://www.freecadweb.org/wiki/index.php?title=File:Method.png" class="image"><img alt="Method.png" src="Method.png" width="16" height="16" /></a> <big><b>exportPageAsSvg</b></big> ( <i>pageObject, filePath</i> )</div>
|
|
<div class="description">
|
|
<p><small><b>Description</b>:</small> save a copy of pageObject in Svg format to location filePath
|
|
</p><p><small><b>Returns</b>:</small> none
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<p><br />
|
|
</p><p><br />
|
|
Back to <a href="TechDraw_Module.html" title="TechDraw Module">TechDraw</a>.
|
|
</p>
|
|
<div style="clear:both"></div>
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div><div class="printfooter">
|
|
Online version: "<a dir="ltr" href="https://www.freecadweb.org/wiki/index.php?title=TechDrawGui_API/en&oldid=247928">http://www.freecadweb.org/wiki/index.php?title=TechDrawGui_API/en&oldid=247928</a>"</div>
|
|
<div id="catlinks" class="catlinks" data-mw="interface"></div><div class="visualClear"></div>
|
|
</div>
|
|
</div>
|
|
<div id="mw-navigation">
|
|
<h2>Navigation menu</h2>
|
|
|
|
</body></html> |