Console API/it: Difference between revisions

From FreeCAD Documentation
(Created page with "Esempio:")
(Created page with "{{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/it|PrintError|strin...")
Line 8: Line 8:




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


[[Category:API]]
[[Category:API]]

Revision as of 18:23, 16 November 2014

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.

Esempio:

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


GetStatus ( "Log" o "Msg" o "Wrn" o "Err" )

Descrizione: Ottiene lo stato di Log, Msg, Wrn o Error per un osservatore

Restituisce: una stringa di stato.


PrintError ( string )

Descrizione: Stampa un messaggio di errore nell'output

Restituisce: nulla


PrintLog ( string )

Descrizione: Stampa un messaggio di log nell'output

Restituisce: nulla


PrintMessage ( string )

Descrizione: Stampa un messaggio nell'output

Restituisce: nulla


PrintWarning ( string )

Descrizione: Stampa un messaggio di avviso nell'output

Restituisce: nulla


SetStatus ( string )

Descrizione: Imposta lo stato di Log, Msg, Wrn o Error per un osservatore

Restituisce: