Console API

From FreeCAD Documentation
Jump to: navigation, search

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎日本語 • ‎română
(October 2019) Do not edit this page. The information is incomplete and outdated. For the latest API, see the autogenerated API documentation, or generate the documentation yourself, see Source documentation.


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")


Method.png GetStatus("Log" or "Msg" or "Wrn" or "Err")

Description: Get the status for either Log, Msg, Wrn or Error for an observer

Returns: a status string.

Method.png PrintError(string)

Description: Prints an error message to the output

Returns: nothing

Method.png PrintLog(string)

Description: Prints a log message to the output

Returns: nothing

Method.png PrintMessage(string)

Description: Prints a message to the output

Returns: nothing

Method.png PrintWarning(string)

Description: Prints a warning to the output

Returns: nothing

Method.png SetStatus(string)

Description: Set the stats for either Log, Msg, Wrn or Error for an observer

Returns: