Console API: Difference between revisions
No edit summary |
|||
Line 1: | Line 1: | ||
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: |
|||
このモジュールはFreeCADモジュール内部に含まれ、FreeCADの出力用コンソールとステータスバーにテキストを送信するためのメソッドが含まれています。メッセージ、警告、エラーの場合にはメッセージ文字列が異なる色になります。サンプル: |
|||
import FreeCAD |
import FreeCAD |
||
FreeCAD.PrintMessage("Hello World!\n") |
FreeCAD.PrintMessage("Hello World!\n") |
||
{{APIFunction |
{{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 |
{{APIFunction|PrintError|string|Prints an error message to the output|nothing}} |
||
{{APIFunction |
{{APIFunction|PrintLog|string|Prints a log message to the output|nothing}} |
||
{{APIFunction |
{{APIFunction|PrintMessage|string|Prints a message to the output|nothing}} |
||
{{APIFunction |
{{APIFunction|PrintWarning|string|Prints a warning to the output|nothing}} |
||
{{APIFunction |
{{APIFunction|SetStatus|string|Set the stats for either Log, Msg, Wrn or Error for an observer| }} |
||
{{languages |
{{languages | {{es|Console_API/es}} {{it|Console_API/it}} }} |
||
[[Category:API |
[[Category:API]] |
Revision as of 10:21, 11 January 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.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: