Console API: Difference between revisions

From FreeCAD Documentation
No edit summary
(Undo revision 16054 by Htsubota (Talk))
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/jp|GetStatus|"Log" または "Msg" または "Wrn" または "Err"|LogMsgWrn、Wrnのいずれかのステータスを監視用に取得します。|ステータス文字列}}
{{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/jp|PrintError|string|出力にエラーメッセージをプリントします。|なし}}
{{APIFunction|PrintError|string|Prints an error message to the output|nothing}}
{{APIFunction/jp|PrintLog|string|出力にログメッセージをプリントします。|なし}}
{{APIFunction|PrintLog|string|Prints a log message to the output|nothing}}
{{APIFunction/jp|PrintMessage|string|出力にメッセージをプリントします。|なし}}
{{APIFunction|PrintMessage|string|Prints a message to the output|nothing}}
{{APIFunction/jp|PrintWarning|string|出力に警告をプリントします。|なし}}
{{APIFunction|PrintWarning|string|Prints a warning to the output|nothing}}
{{APIFunction/jp|SetStatus|string|LogMsgWrn、Wrnのいずれかのステータスを監視用に設定します。| }}
{{APIFunction|SetStatus|string|Set the stats for either Log, Msg, Wrn or Error for an observer| }}


{{languages/jp | {{en|Console_API}} {{es|Console_API/es}} {{it|Console_API/it}} }}
{{languages | {{es|Console_API/es}} {{it|Console_API/it}} }}


[[Category:API/jp]]
[[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")
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:

Available translations of this page: