Console API/it: Difference between revisions

From FreeCAD Documentation
m (correction du code "FreeCAD.Console.PrintMessage("Hello World!\n")")
(Updating to match new version of source page)
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.
=Console_API/it=


Example:
Questo modulo è contenuto all'interno del modulo di FreeCAD e contiene i metodi per inviare messaggi di testo per l'output della console di FreeCAD e della barra di stato. I messaggi hanno colore diverso secondo se sono messaggio di avviso o di errore.<br>
<pre>
Esempio:
import FreeCAD
FreeCAD.Console.PrintMessage("Hello World!\n")
</pre>


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


{{APIFunction/it|GetStatus|"Log" o "Msg" o "Wrn" o "Err"|Ottiene lo stato di Log, Msg, Wrn o Error per un osservatore|una stringa di stato.}}
{{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/it|PrintError|string|Stampa un messaggio di errore nell'output|nulla}}
{{APIFunction|PrintError|string|Prints an error message to the output|nothing}}
{{APIFunction/it|PrintLog|string|Stampa un messaggio di log nell'output|nulla}}
{{APIFunction|PrintLog|string|Prints a log message to the output|nothing}}
{{APIFunction/it|PrintMessage|string|Stampa un messaggio nell'output|nulla}}
{{APIFunction|PrintMessage|string|Prints a message to the output|nothing}}
{{APIFunction/it|PrintWarning|string|Stampa un messaggio di avviso nell'output|nulla}}
{{APIFunction|PrintWarning|string|Prints a warning to the output|nothing}}
{{APIFunction/it|SetStatus|string|Imposta lo stato di Log, Msg, Wrn o Error per un osservatore| }}
{{APIFunction|SetStatus|string|Set the stats for either Log, Msg, Wrn or Error for an observer| }}


[[Category:API]]
{{languages/it | {{en|Console_API}} {{es|Console_API/es}} }}


{{clear}}
[[Category:API/it]]
<languages/>

Revision as of 21:19, 11 November 2014

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.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: