Effective Output


Emojis 🥳

You can easily print emojis to the output window using the :emoji-shorthand: convention. To see all the shorthand options, launch the Emoji tool under pyRevit slideout.

Use the codes printed on the output for each emoji. For example the code below prints 👌

print(':OK_hand:')

Emojis are a feature of the output window so they are supported from any language or script that prints to the output window

Console.WriteLine(":OK_hand:");

Creating Clickable Element Links

The link maker from the output object, can be used to create clickable links on the output window. See documentation here.

from pyrevit import script

output = script.get_output()

# assuming element is an instance of DB.Element
print(output.linkify(element.Id))

Printing Tables

The table maker from the output object, can be used to create tables on the output window.

It has two methods:

print_table() which is based on markdown and supports markdown in the cell’s data strings. See documentation here.

print_html_table() which outputs HTML directly and allows more control over table formatting through CSS.