Report view

From LabRPS Documentation
Revision as of 16:52, 26 October 2024 by LabRPS (talk | contribs) (→‎Messages)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

The Report view is a panel that shows text messages from LabRPS processes and tools. It is available in the menu View → Panels → Report view.

Certain properties of this panel, like color of the text and whether to display it automatically on warnings or errors, can be configured in the General → Report view tab of the Preferences Editor.

LabRPS Report view.png

The report view showing messages when LabRPS has just started.

Messages

See also: LabRPS Scripting Basics.

The report view displays messages from the internal LabRPS Console class.

  • LabRPS.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.
  • LabRPS.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.
  • LabRPS.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.
  • LabRPS.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.

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

LabRPS Report view example.png

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

Actions

Right clicking the report view opens a context menu with the following commands:

  • Options:
    • Display message types: see Preferences Editor.
    • Show output window on: idem.
    • Redirect Python output: idem.
    • Redirect Python errors: idem.
    • Go to end: if checked the report view will scroll to the bottom when a new message is added.
  • 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.