Console API: Difference between revisions
m (correction du code "FreeCAD.Console.PrintMessage("Hello World!\n")") |
|||
Line 2: | Line 2: | ||
import FreeCAD |
import FreeCAD |
||
FreeCAD.PrintMessage("Hello World!\n") |
FreeCAD.Console.PrintMessage("Hello World!\n") |
||
{{APIFunction|GetStatus|"Log" or "Msg" or "Wrn" or "Err"|Get the status for either Log, Msg, Wrn or Error for an observer|a status string.}} |
{{APIFunction|GetStatus|"Log" or "Msg" or "Wrn" or "Err"|Get the status for either Log, Msg, Wrn or Error for an observer|a status string.}} |
||
{{APIFunction|PrintError|string|Prints an error message to the output|nothing}} |
{{APIFunction|PrintError|string|Prints an error message to the output|nothing}} |
Revision as of 15:19, 7 March 2013
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. Example:
import FreeCAD FreeCAD.Console.PrintMessage("Hello World!\n")
Description: Get the status for either Log, Msg, Wrn or Error for an observer
Returns: a status string.
Description: Set the stats for either Log, Msg, Wrn or Error for an observer
Returns: