/

/

16-crash-n-clash

/

/

16-crash-n-clash

Day

16

pyRevit

Challenge

Day

16

pyRevit

Challenge

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

21-Day pyRevit Challenge

Mon

Tue

Wed

Thr

Fri

Sat

Sun

Tool Of The Day:

"Crash-n-Clash"

BIM is awesome until something clashes and start to crash our project deadline…

So let's create a custom Crash-n-Clash tool to find your project clashes before they cause any project crashes.

Today We're Practicing:

>>>

Intersection Filters (Slow/Quick)✨

>>>

Element BoundingBox

>>>

pyrevit Output Table

Let's Create

"Crash n Clash"

Using 7-Step PROCESS

Let's Create

"Crash n Clash"

Using 7-Step PROCESS

.

.

.

.

.

.

.

PLAN

🫳No Clashes - No Project Crashes…

You heard the stories of what happens when something is n ot coordinated and clashes on site. Maybe you even experienced it first hand…

So, the Goal for Today:

Create a Crash-n-Clash tool to help us find intersecting elements so we can find and fix them on time right inside of Revit.

We're not replacing Naviswork workflows. Instead, we're making Revit more powerful.

.

.

.

.

.

.

.

RESEARCH

Coding CheatSheet

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

Coding Blocks

Get All Pipes

Create BoundingBox Filter

Apply Filters to FEC

Get Element BoundingBox

Create Element Intersection Filter

Get All Pipes

Get Element BoundingBox

Create BoundingBox Filter

Create Element Intersection Filter

Apply Filters to FEC

Revit API Docs
pyRevit Dev Docs


In-Depth Filters:

Notes

🔸BoundingBox Filter

BoundingBox is a quick filter but it's less precise. It can create situations where you'll get elements that do not intersect.

Usually because they're at an angle that makes their BoundingBox expand beyond element to contain it.

🔸Quick/Slow Filter

When possible apply quick filters before you apply slow filter to your collector to improve perfomance.

🔸ElementINtersectsElementFilter Note

There are certain categories that won't work with this filter. Therefore you'd need to extract the geometry yourself and use SolidIntersectsElementFilter by providing geometry.

.

.

.

.

.

.

.

RESEARCH

Coding CheatSheet

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

Coding Blocks

Get All Pipes

Get Element BoundingBox

Create BoundingBox Filter

Create Element Intersection Filter

Apply Filters to FEC

Revit API Docs
pyRevit Dev Docs


In-Depth Filters:

Notes

🔸BoundingBox Filter

BoundingBox is a quick filter but it's less precise. It can create situations where you'll get elements that do not intersect.

Usually because they're at an angle that makes their BoundingBox expand beyond element to contain it.

🔸Quick/Slow Filter

When possible apply quick filters before you apply slow filter to your collector to improve perfomance.

🔸ElementINtersectsElementFilter Note

There are certain categories that won't work with this filter. Therefore you'd need to extract the geometry yourself and use SolidIntersectsElementFilter by providing geometry.

.

.

.

.

.

.

.

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 Main Elements
(e.g. Pipes)

card-background

2

Create
Intersection Filters

card-background

3

Get Intersecting
Elements

card-background

4

Crash-n-Clash
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

Get Main Elements
(e.g. Pipes)

card-background

2

Create
Intersection Filters

card-background

3

Get Intersecting
Elements

card-background

4

Crash-n-Clash
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

Refactored: Single Workset

.

.

.

.

.

.

.

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: Single Workset

.

.

.

.

.

.

.

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

Final Code

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