Console API/de

From FreeCAD Documentation
This page is a translated version of the page Console API and the translation is 60% complete.
(Oktober 2019) Bearbeite diese Seiten nicht. Die Informationen sind unvollständig und veraltet. Die neueste API findest Du in der autogenerierten API-Dokumentation oder generiere die Dokumentation selbst, siehe Quelldokumentation.

Diese Modul ist im FreeCAD-Module integriert und enthält Methoden, um Text auf der FreeCAD-Ausgabe-Konsole und Statuszeile auszugeben. Die Ausgaben haben eine unterschiedliche Farbe, abhängig von Meldung, Warnung oder Fehler.

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: