Report view/it: Difference between revisions

From FreeCAD Documentation
(Created page with "{{Emphasis|Vedere anche:}} API TechDraw e Nozioni di base sugli script di FreeCAD.")
(Created page with "La vista report mostra i messaggi della classe interna {{incode|Console}} di FreeCAD. * {{incode|FreeCAD.Console.PrintMessage("text")}}, stampa qualsiasi tipo di messaggio inf...")
Line 15: Line 15:
{{Emphasis|Vedere anche:}} [[TechDraw API/it|API TechDraw]] e [[FreeCAD Scripting Basics/it|Nozioni di base sugli script di FreeCAD]].
{{Emphasis|Vedere anche:}} [[TechDraw API/it|API TechDraw]] e [[FreeCAD Scripting Basics/it|Nozioni di base sugli script di FreeCAD]].


The report view displays messages from the internal FreeCAD {{incode|Console}} class.
La vista report mostra i messaggi della classe interna {{incode|Console}} di FreeCAD.
* {{incode|FreeCAD.Console.PrintMessage("text")}}, print any sort of informative message, that doesn't imply any misbehavior; for example, print the coordinates of points, the result of a distance calculation, the number of vertices in a shape, etc. By default, in black color.
* {{incode|FreeCAD.Console.PrintMessage("text")}}, stampa qualsiasi tipo di messaggio informativo, che non implica alcun comportamento scorretto; ad esempio, stampa le coordinate dei punti, il risultato di un calcolo della distanza, il numero di vertici in una forma, ecc. Per impostazione predefinita, in colore nero.
* {{incode|FreeCAD.Console.PrintWarning("text")}}, print messages that are intended to warn the user about strange behavior in the application. Warnings should be shown when some functionality is missing but the software still works acceptably. By default, in yellow color.
* {{incode|FreeCAD.Console.PrintWarning("text")}}, stampa i messaggi che hanno lo scopo di avvisare l'utente di comportamenti strani nell'applicazione. Gli avvisi sono mostrati quando mancano alcune funzionalità ma il software funziona ancora in modo accettabile. Di default, in colore giallo.
* {{incode|FreeCAD.Console.PrintError("text")}}, print messages that are intended to be error messages, that is, when a critical component is missing that makes a certain operation fail. By default, in red color.
* {{incode|FreeCAD.Console.PrintError("text")}}, stampa i messaggi di errore, vale a dire quando manca un componente critico che fa fallire una determinata operazione. Di default, in colore rosso.
* {{incode|FreeCAD.Console.PrintLog("text")}}, print messages that are going into the logs. These messages could be anything that is valuable to troubleshoot a problem in the future by reading the logs, for example, starting or closing a workbench. By default, in blue color.
* {{incode|FreeCAD.Console.PrintLog("text")}}, stampa i messaggi che vanno anche nei registri. Questi messaggi possono essere utili in seguito per risolvere un problema leggendo i registri, ad esempio quando si avvia o si chiude un ambiente. Di default, in colore blu.


These functions can be used from the [[Python console|Python console]] directly, or from [[Macros|macros]] and custom workbenches.
These functions can be used from the [[Python console|Python console]] directly, or from [[Macros|macros]] and custom workbenches.

Revision as of 17:25, 23 November 2019

Introduzione

La Vista report è un pannello che mostra i messaggi di testo dei processi di FreeCAD.

Alcune proprietà della vista, come il colore del testo, possono essere configurate nell'editor delle preferenze.

Vista report che mostra i messaggi quando FreeCAD è appena stato avviato.

Messagi

Vedere anche: API TechDraw e Nozioni di base sugli script di FreeCAD.

La vista report mostra i messaggi della classe interna Console di FreeCAD.

  • FreeCAD.Console.PrintMessage("text"), stampa qualsiasi tipo di messaggio informativo, che non implica alcun comportamento scorretto; ad esempio, stampa le coordinate dei punti, il risultato di un calcolo della distanza, il numero di vertici in una forma, ecc. Per impostazione predefinita, in colore nero.
  • FreeCAD.Console.PrintWarning("text"), stampa i messaggi che hanno lo scopo di avvisare l'utente di comportamenti strani nell'applicazione. Gli avvisi sono mostrati quando mancano alcune funzionalità ma il software funziona ancora in modo accettabile. Di default, in colore giallo.
  • FreeCAD.Console.PrintError("text"), stampa i messaggi di errore, vale a dire quando manca un componente critico che fa fallire una determinata operazione. Di default, in colore rosso.
  • FreeCAD.Console.PrintLog("text"), stampa i messaggi che vanno anche nei registri. Questi messaggi possono essere utili in seguito per risolvere un problema leggendo i registri, ad esempio quando si avvia o si chiude un ambiente. Di default, in colore blu.

These functions can be used from the Python console directly, or from macros and custom workbenches.

Example messages in the report view: a general message, a warning, an error, and a logged message.

Actions

Right click on the report view shows some commands:

  • Options: logging, warning, error, redirect Python output, redirect Python errors, go to end.
  • Copy: stores the selected text in the clipboard for later pasting; it is disabled if nothing is selected.
  • Select all: selects all text in the report view.
  • Clear: erases all messages in the report view. This is useful if you want to troubleshoot a tool that prints messages to the report view, and want to be sure there are no old messages from previous tools.
  • Save as: save the messages in the report view to a text file.

Template:Interface/it