83 lines
3.6 KiB
HTML
83 lines
3.6 KiB
HTML
<html><head><title>Console API</title><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><link type='text/css' href='wiki.css' rel='stylesheet'></head><body><h1>Console API</h1></div>
|
|
|
|
<div id="mw-content-text" lang="en" dir="ltr" class="mw-content-ltr"><div class="mw-parser-output"><p>This module is contained inside the FreeCAD module and contains methods to send text to FreeCAD's output console and status bar. The messages will have different color if they are message, warning or error.
|
|
</p><p>Example:
|
|
</p>
|
|
<pre>import FreeCAD
|
|
FreeCAD.Console.PrintMessage("Hello World!\n") </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>GetStatus</b></big> ( <i>"Log" or "Msg" or "Wrn" or "Err"</i> )</div>
|
|
<div class="description">
|
|
<p><small><b>Description</b>:</small> Get the status for either Log, Msg, Wrn or Error for an observer
|
|
</p><p><small><b>Returns</b>:</small> a status string.
|
|
</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>PrintError</b></big> ( <i>string</i> )</div>
|
|
<div class="description">
|
|
<p><small><b>Description</b>:</small> Prints an error message to the output
|
|
</p><p><small><b>Returns</b>:</small> nothing
|
|
</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>PrintLog</b></big> ( <i>string</i> )</div>
|
|
<div class="description">
|
|
<p><small><b>Description</b>:</small> Prints a log message to the output
|
|
</p><p><small><b>Returns</b>:</small> nothing
|
|
</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>PrintMessage</b></big> ( <i>string</i> )</div>
|
|
<div class="description">
|
|
<p><small><b>Description</b>:</small> Prints a message to the output
|
|
</p><p><small><b>Returns</b>:</small> nothing
|
|
</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>PrintWarning</b></big> ( <i>string</i> )</div>
|
|
<div class="description">
|
|
<p><small><b>Description</b>:</small> Prints a warning to the output
|
|
</p><p><small><b>Returns</b>:</small> nothing
|
|
</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>SetStatus</b></big> ( <i>string</i> )</div>
|
|
<div class="description">
|
|
<p><small><b>Description</b>:</small> Set the stats for either Log, Msg, Wrn or Error for an observer
|
|
</p><p><small><b>Returns</b>:</small>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<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=Console_API&oldid=133198">http://www.freecadweb.org/wiki/index.php?title=Console_API&oldid=133198</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> |