API w konsoli

From FreeCAD Documentation
Jump to navigation Jump to search
This page is a translated version of the page Console API and the translation is 100% complete.
(Październik 2019) Nie edytuj tych stron. Informacje są niekompletne i nieaktualne. Najnowsze API można znaleźć w automatycznie generowana dokumentacja API, lub wygenerować dokumentację samodzielnie, śledząc dokument Dokumentacja źródłowa.

Ten moduł jest zawarty wewnątrz modułu FreeCAD i zawiera metody do wysyłania tekstu do konsoli wyjściowej i paska stanu programu FreeCAD. Wiadomości będą miały różny kolor, w zależności od tego czy będą to komunikaty, ostrzeżenia czy błędy.

Przykład:

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


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

Description: Uzyskaj status Log, Msg, Wrn lub Error dla obserwatora

Returns: ciąg komunikatu stanu

Method.png PrintError(string)

Description: Wyświetla na wyjściu komunikat o błędzie

Returns:

Method.png PrintLog(string)

Description: Wyświetla na wyjściu komunikat dziennika

Returns:

Method.png PrintMessage(string)

Description: Wyświetla na wyjściu komunikat

Returns:

Method.png PrintWarning(string)

Description: Wyświetla na wyjściu ostrzeżenie

Returns:

Method.png SetStatus(string)

Description: Ustaw statystyki Log, Msg, Wrn lub Error dla obserwatora

Returns: