Resources
Summary
pyRevit Outputs
Let's continue exploring pyRevit Dev Docs and look at pyRevit Outputs.
This provides a lot of different examples to create better outputs for the users. We can structure our data in tables or charts, create linkable elements and even make it much better looking by using markdown or HTML prints.
But to use them, we need to import script module from pyrevit and use get_output() like this:
Let's go through it and test different options we get, but before we do, we need to get an output instance from pyRevit.
Linkify - Crete Linkable Element
This is by far the most impressive thing in pyRevit output in my opinion.
It allows us to create a clickable object in the menu that can:
select the element
open a view
and even find where element is the best visible, and zoom on it.
Let's explore how to use it in multiple examples:
It's very simple to use, we need to provide ElementId or a list of ElementIds and a title. And this will create this clickable badge that can:
Select an Element
Find and Zoom to Element on a plan
Open a View (if View provided)
Let's create a few examples
Linkify Single Elements
Let's start by creating linkify for a single element.
We will simply get all_views
and all_walls
and create output prints for them.
Linkify - Multiple Elements (List Warning Elements)
…
Table - List Elements with Warnings
…
Print Markdown
…
Print HTML
…
Print Code
…
Progress Bar - Output Window
…
Progress Bar - Application
…
Logging Messages in Output
…
Visualize Data - Charts
…
pyRevit Output Examples
…
Summary
…
HomeWork
Now it's time for you to create your own reports with what you've learnt in this lesson.
👀 Have a look at your previous tools, and think where you could improve them by adding a more appealing outputs. Users will certainly appreciate it a lot.
😉 Bonus point for sharing your forms with the community
⌨️ Happy Coding!