/

/

07-tagless-shamelist

/

/

07-tagless-shamelist

Day

07

pyRevit

Challenge

Day

07

pyRevit

Challenge

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

21-Day pyRevit Challenge

Mon

Tue

Wed

Thr

Fri

Sat

Sun

Tool Of The Day:

"Tagless Shame List"

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

Remember how last time you sent out your plans and then you started noticing missing tags?
But it's already too late…

So how about we create a tool that can help us find missing Door/Window tags in selected views, so we can make this check in just a few minutes?

Today We're Practicing:

>>>

How to Find Missing Tags

>>>

Getting Elements with Collector

>>>

Python list comprehensions

>>>

Reading Properties/Methods

>>>

pyRevit Linkify

Let's Create

"Tagless Shame List"

Using 7-Step PROCESS

Let's Create

"Tagless Shame List"

Using 7-Step PROCESS

.

.

.

.

.

.

.

PLAN

Shame… Shame… Shame…

If you're tired of wasting time opening your views one by one and manually playing "Where's Waldo" with your tags… Then how about we automate this step with a single click?

So, The Goal for Today's Tool:

Create a tool where we can select views and it will find all Doors/Windows with missing tags and generate a simple interactive Report(Shame List) so we can quickly find and fix it.

.

.

.

.

.

.

.

RESEARCH

Coding CheatSheet

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

Coding Blocks

Get Active View

Get Elements & Tags

Create Linkify Object

API Changes - Execute dfifferent code

pyRevit form - Select Views

Get Tagged Elements from Tag

Get Type/Famiyl from Instance

Get Active View

pyRevit form - Select Views

Get Elements & Tags

Get Tagged Elements from Tag

Create Linkify Object

Get Type/Famiyl from Instance

API Changes - Execute dfifferent code

Revit API Docs
  1. doc.ActiveView Property

  2. FilteredElementCollector Constructor

  3. IndependantTag.GetTaggedLocalElementIds Method

  4. Element.GetTypeId Method

  5. Document.GetElement Method

  6. FamilySymbol Class / Family Class

pyRevit Dev Docs
Extra Resources
Notes

🔸Find Untagged Elements?

There are different ways to find it.

We'll get a list of all elements in a view, and then we'll find a list of all tagged elements in a view (based on available tags) and then we just need to find the difference between these lists.

.

.

.

.

.

.

.

RESEARCH

Coding CheatSheet

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

Coding Blocks

Get Active View

pyRevit form - Select Views

Get Elements & Tags

Get Tagged Elements from Tag

Create Linkify Object

Get Type/Famiyl from Instance

API Changes - Execute dfifferent code

Revit API Docs
  1. doc.ActiveView Property

  2. FilteredElementCollector Constructor

  3. IndependantTag.GetTaggedLocalElementIds Method

  4. Element.GetTypeId Method

  5. Document.GetElement Method

  6. FamilySymbol Class / Family Class

pyRevit Dev Docs
Extra Resources
Notes

🔸Find Untagged Elements?

There are different ways to find it.

We'll get a list of all elements in a view, and then we'll find a list of all tagged elements in a view (based on available tags) and then we just need to find the difference between these lists.

.

.

.

.

.

.

.

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

UI:
Select Views

card-background

2

Get
Elements & Tags

card-background

3

Find
Missing Tags

card-background

4

Create
Simple Report

card-background

1

UI:
Select Views

card-background

3

Find
Missing Tags

card-background

2

Get
Elements & Tags

card-background

4

Create
Simple Report

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

UI:
Select Views

card-background

2

Get
Elements & Tags

card-background

3

Find
Missing Tags

card-background

4

Create
Simple Report

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

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

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

And now we're going to refactor the code.

The base of the script will stay the same but we'll make sure that we can select multiple views and it can generate reports for each view individually. This way we can be even more produtive.

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

And now we're going to refactor the code.

The base of the script will stay the same but we'll make sure that we can select multiple views and it can generate reports for each view individually. This way we can be even more produtive.

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

Ensure UI Selection

Solution #1

API Changes (2022+) - GetTaggedLocalElementIds

Solution #2

AI Prompt

Lastly, let's make sure that we don't have any changes in different Revit versions due to API changes.


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