Console API/de: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 20: Line 20:
{{APIFunction|SetStatus|string|Set the stats for either Log, Msg, Wrn or Error for an observer| }}
{{APIFunction|SetStatus|string|Set the stats for either Log, Msg, Wrn or Error for an observer| }}


{{Userdocnavi{{#translation:}}}}
[[Category:API{{#translation:}}]]
[[Category:API{{#translation:}}]]
[[Category:Poweruser Documentation{{#translation:}}]]


{{clear}}
{{clear}}

Revision as of 20:55, 27 February 2020

(November 2018) Diese Information kann unvollständig und veraltet sein. Für die letzte API siehe die (engl.) autogenerierte API-Dokumentation.

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.

Beispiel:

import FreeCAD
FreeCAD.Console.PrintMessage("Hello World!\n")


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.

PrintError(string)

Description: Prints an error message to the output

Returns: nothing

PrintLog(string)

Description: Prints a log message to the output

Returns: nothing

PrintMessage(string)

Description: Prints a message to the output

Returns: nothing

PrintWarning(string)

Description: Prints a warning to the output

Returns: nothing

SetStatus(string)

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

Returns: