/

/

08-warnings-snitch

/

/

08-warnings-snitch

Day

08

pyRevit

Challenge

Day

08

pyRevit

Challenge

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

21-Day pyRevit Challenge

Mon

Tue

Wed

Thr

Fri

Sat

Sun

Tool Of The Day:

"The Warnings Snitch"

Watch Bonus Training:
- Follow pyRevit FastTrack Setup
- Watch P.R.O.C.E.S.S. Masterclass

If you had to solve warnings in Revit then you know how painful to use the default menu… It's 2026 and we still follow a workaround to just select warning elements… This has to stop!

So let's make our own tool for finding Warning Elements.

Today We're Practicing:

>>>

Warnings in Revit API

>>>

Sort With Dictionary

>>>

pyRevit Forms

>>>

pyRevit Linkify

>>>

pyRevit Print Table

Let's Create

"The Warnings Snitch"

Using 7-Step PROCESS

Let's Create

"The Warnings Snitch"

Using 7-Step PROCESS

.

.

.

.

.

.

.

PLAN

Warnings suck in Revit…

Autodesk gave us a menu with barely any functionality. We can't even select anything…

It's very inefficient.
And frankly, we deserve better!

So, The Goal for Today:

Create a tool to help us quickly find and select warning elements. We'll also create UI form to select warning types to avoid creating infinite table…

And it's best if we create an interactive report with warnings sorted by description and ability to quickly select warning elements.

It might sound like a small tool, but it can save a lot of hours in the long run.

.

.

.

.

.

.

.

RESEARCH

Coding CheatSheet

Here's everything you might need for today's challenge.

Coding Blocks

1. Get Warnings

3. Sort Warnings by Description

5. Create Linkify Object

7. pyRevit - Print Table

2. Read Warnings Info

4. Get Failing + Additional Elements

6. pyrevit SelectFromList

1. Get Warnings

2. Read Warnings Info

3. Sort Warnings by Description

4. Get Failing + Additional Elements

5. Create Linkify Object

6. pyrevit SelectFromList

7. pyRevit - Print Table

Notes

🔸Failing vs Additional Elements

You'll notice that we gather both Failing and Additional warning elements. That's because certain warning types return empty Failing elements, but you'll find what you need as additional elements. (I just forgot which warning it was…)

.

.

.

.

.

.

.

RESEARCH

Coding CheatSheet

Here's everything you might need for today's challenge.

Coding Blocks

1. Get Warnings

2. Read Warnings Info

3. Sort Warnings by Description

4. Get Failing + Additional Elements

5. Create Linkify Object

6. pyrevit SelectFromList

7. pyRevit - Print Table

Notes

🔸Failing vs Additional Elements

You'll notice that we gather both Failing and Additional warning elements. That's because certain warning types return empty Failing elements, but you'll find what you need as additional elements. (I just forgot which warning it was…)

.

.

.

.

.

.

.

OUTLINE

Step-by-Step Plan

Break down logic of the tool idea into smaller chunks so it's easier to brainstorm, find hidden steps and code.

1

Get
Warnings

card-background

5

Create Interactive Report (Linkify)

card-background

2

Sort Elements
By Warnings Type

card-background

3

UI Form:
Select W.Type

card-background

4

Get Warning
Elements

card-background

.

.

.

.

.

.

.

OUTLINE

Step-by-Step Plan

Break down logic of the tool idea into smaller chunks so it's easier to brainstorm, find hidden steps and code.

1

Get
Warnings

card-background

5

Create Interactive Report (Linkify)

card-background

2

Sort Elements
By Warnings Type

card-background

3

UI Form:
Select W.Type

card-background

4

Get Warning
Elements

card-background

NB!

TRY BUILDING
THIS TOOL YOURSELF
DON'T RUSH TO SOLUTION

Unless… You're a Beginner


According to GENERATION EFFECT

The Harder You Work, The Deeper It'll be Wired in Your Brain

NB!

TRY BUILDING
THIS TOOL YOURSELF
DON'T RUSH TO SOLUTION

Unless… You're a Beginner


According to GENERATION EFFECT

The Harder You Work, The Deeper
It'll be Wired in Your Brain

.

.

.

.

.

.

.

CODE

Code Quick-n-Dirty.

The Goal is to create a proof of concept. Don't try to make it perfect. Skip steps if necessary. Keep it ugly. Keep it slow. JUST. MAKE. IT. WORK…

Proof Of Concept

To create proof of concept we can skip a few steps. We only need to focus on absolute minimum to see the desired result.

In this case:

  • Get Warnings

  • Iterate over them (for-loop)

  • Read Warning Description

  • Get Warning Elements

  • Create Simple Report (Linkify)

As you can see we're skipping big steps (Sorting, UI-Form) so we can focus on the basics until we can see partial result. Only then we want to focus on all steps.

The goal is to verify:

a) You can do it
b) It's actually useful

The rest we can fix during refactoring.

SCRIPT: PROOF OF CONCEPT

.

.

.

.

.

.

.

CODE

Code Quick-n-Dirty

The Goal is to create a proof of concept. Don't try to make it perfect. Skip steps if necessary. Keep it ugly. Keep it slow. JUST. MAKE. IT. WORK…

Proof Of Concept

To create proof of concept we can skip a few steps. We only need to focus on absolute minimum to see the desired result.

In this case:

  • Get Warnings

  • Iterate over them (for-loop)

  • Read Warning Description

  • Get Warning Elements

  • Create Simple Report (Linkify)

As you can see we're skipping big steps (Sorting, UI-Form) so we can focus on the basics until we can see partial result. Only then we want to focus on all steps.

The goal is to verify:

a) You can do it
b) It's actually useful

The rest we can fix during refactoring.

SCRIPT: PROOF OF CONCEPT

.

.

.

.

.

.

.

EDIT

Refactor Everything

Once proof-of-concept works - we can focus on all steps to make everything more structured, optimized and easier to read.

REFACTOR CODE

REFACTORED CODE

.

.

.

.

.

.

.

EDIT

Refactor Everything

Once proof-of-concept works - we can focus on all steps to make everything more structured, optimized and easier to read.

REFACTOR CODE

REFACTORED CODE

.

.

.

.

.

.

.

STRESS-TEST

Time To Break It!

Don't rush sharing your tools.

Try breaking it before your team does it… You don't want to hear how your tools fails at the cost of your reputation.

https://www.loom.com/share/d9a77a1949f54c95a90ec1778062c575

#1 - Ensure Warning in Project

#2 - Ensure User Input

AI Prompt - Stress Test

.

.

.

.

.

.

.

SHIP

Submit Your Code.

Congratulations! Another tool is complete.

Now let's reflect on what we've learnt and submit your code to keep track of your progress.

.

.

.

.

.

.

.

SHIP

Submit Your Code.

Congratulations! Another tool is complete.

Now let's reflect on what we've learnt and submit your code to keep track of your progress.

Time To Celebrate

Share Your Win On LinkedIn
With #pyRevitChallenge

I'll Embed You Here!


Below it's just a placeholder for now…

© 2023-2026 EF Learn Revit API

© 2023-2026 EF Learn Revit API

© 2023-2026 EF Learn Revit API