Console API/es: Difference between revisions

From FreeCAD Documentation
(Created page with "Console API")
No edit summary
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<languages/>
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.
{{VeryImportantMessage|(October 2019) Do not edit this page. The information is incomplete and outdated. For the latest API, see the [https://www.freecadweb.org/api autogenerated API documentation], or generate the documentation yourself, see [[Source documentation|Source documentation]].}}

Este módulo está contenido en el módulo de FreeCAD y contiene métodos para enviar texto a la consola de salida de FreeCAD y a la barra de estado. Los mensajes tendrán diferente color si son mensajes, advertencias o errores.


Ejemplo:
Example:
{{Code|code=
<pre>
import FreeCAD
import FreeCAD
FreeCAD.Console.PrintMessage("Hello World!\n")
FreeCAD.Console.PrintMessage("Hello World!\n")
}}
</pre>




{{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/es|GetStatus|"Log" o "Msg" o "Wrn" o "Err"|Obtiene el estado de Log, Msg, Wrn o Error para un observador|una cadena de texto de estado.}}
{{APIFunction|PrintError|string|Prints an error message to the output|nothing}}
{{APIFunction/es|PrintError|string|Imprime un mensaje de error en la salida|nada}}
{{APIFunction|PrintLog|string|Prints a log message to the output|nothing}}
{{APIFunction/es|PrintLog|string|mprime un mensaje de log en la salida|nada}}
{{APIFunction|PrintMessage|string|Prints a message to the output|nothing}}
{{APIFunction/es|PrintMessage|string|mprime un mensaje en la salidat|nada}}
{{APIFunction|PrintWarning|string|Prints a warning to the output|nothing}}
{{APIFunction/es|PrintWarning|string|mprime una advertencia en la salida|nada}}
{{APIFunction|SetStatus|string|Set the stats for either Log, Msg, Wrn or Error for an observer| }}
{{APIFunction/es|SetStatus|string|Establece el estado de Log, Msg, Wrn o Error para un observador| }}

[[Category:API]]


{{Userdocnavi{{#translation:}}}}
[[Category:API{{#translation:}}]]
[[Category:Poweruser Documentation{{#translation:}}]]
{{clear}}
{{clear}}
<languages/>

Latest revision as of 15:39, 15 January 2021

(October 2019) Do not edit this page. The information is incomplete and outdated. For the latest API, see the autogenerated API documentation, or generate the documentation yourself, see Source documentation.

Este módulo está contenido en el módulo de FreeCAD y contiene métodos para enviar texto a la consola de salida de FreeCAD y a la barra de estado. Los mensajes tendrán diferente color si son mensajes, advertencias o errores.

Ejemplo:

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


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

Descripción: Obtiene el estado de Log, Msg, Wrn o Error para un observador

Devuelve: una cadena de texto de estado.


PrintError ( string )

Descripción: Imprime un mensaje de error en la salida

Devuelve: nada


PrintLog ( string )

Descripción: mprime un mensaje de log en la salida

Devuelve: nada


PrintMessage ( string )

Descripción: mprime un mensaje en la salidat

Devuelve: nada


PrintWarning ( string )

Descripción: mprime una advertencia en la salida

Devuelve: nada


SetStatus ( string )

Descripción: Establece el estado de Log, Msg, Wrn o Error para un observador

Devuelve: