/

/

19-wall-splitter

/

/

19-wall-splitter

Day

19

pyRevit

Challenge

Day

19

pyRevit

Challenge

|

|

|

|

|

|

|

|

|

|

|

|

|

|

|

21-Day pyRevit Challenge

Mon

Tue

Wed

Thr

Fri

Sat

Sun

🔓CLICK HERE TO UNLOCK BONUS DAYS

Tool Of The Day:

"Wall Splitter"

Today we're going to select multi-layer walls and break them down into new individual walls to match the same wall geometry.

Today We're Practicing:

>>>

Exploring Element Attributes

>>>

Curve Offset⭐

>>>

Compound Structure⭐

>>>

Duplicatinjg Instances/Types ⭐

Let's Create

"Wall Splitter"

Using 7-Step PROCESS

Let's Create

"Wall Splitter"

Using 7-Step PROCESS

.

.

.

.

.

.

.

PLAN

Let's Split Some Walls…

Sometimes we want to break down our multi-layer walls into individual layers for very specific control.

So, the Goal for Today:

Create a tool that can look inside Wall Layers and create individual WallTypes that will be placed in exact same location as the layer in full selected WallType.

.

.

.

.

.

.

.

RESEARCH

Coding CheatSheet

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

Coding Blocks

Pick a Wall

Read Layer Information

Create New WalLType per layer

Offset the Wall Curve per Layer

9. Join All New Walls

Skip Membrane Layer

Read Wall Layers

Generate New Type Names

Get Existing / Create New WallType

Create a New Wall Instance (Duplicate)

Remove Hosted Elements

Pick a Wall

Read Wall Layers

Read Layer Information

Generate New Type Names

Create New WalLType per layer

Get Existing / Create New WallType

Offset the Wall Curve per Layer

Create a New Wall Instance (Duplicate)

9. Join All New Walls

Remove Hosted Elements

Skip Membrane Layer

Notes
EF-Notes:

🔸Curtain Wall

Curtain walls do not have CompoundStructure with layers and materials like regular walls do

🔸Copy Elements

When you copy elements you'll also inherit all parameter values. However, it will also copy hosted elements if any.

🔸Stacked Walls

Don't forget about stacked walls. You can also break them down into layers, however the Sweeps/Reveals will be trickers to reproduce if necessary.

🔸Join Layer Walls

If you have hosted elements in a wall that you split, you need to join your wall layers. This way the opening from hosted object can go through all joined walls. (if family allows)

.

.

.

.

.

.

.

RESEARCH

Coding CheatSheet

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

Coding Blocks

Pick a Wall

Read Wall Layers

Read Layer Information

Generate New Type Names

Create New WalLType per layer

Get Existing / Create New WallType

Offset the Wall Curve per Layer

Create a New Wall Instance (Duplicate)

9. Join All New Walls

Remove Hosted Elements

Skip Membrane Layer

Notes
EF-Notes:

🔸Curtain Wall

Curtain walls do not have CompoundStructure with layers and materials like regular walls do

🔸Copy Elements

When you copy elements you'll also inherit all parameter values. However, it will also copy hosted elements if any.

🔸Stacked Walls

Don't forget about stacked walls. You can also break them down into layers, however the Sweeps/Reveals will be trickers to reproduce if necessary.

🔸Join Layer Walls

If you have hosted elements in a wall that you split, you need to join your wall layers. This way the opening from hosted object can go through all joined walls. (if family allows)

.

.

.

.

.

.

.

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

Pick
Wall

card-background

5

Define New
Wall Curves

card-background

9

Delete
Original Wall

card-background

2

Read Wall Type
Layers/Materials

card-background

6

Create New
Walls (per layer)

card-background

3

Create Names
For New Types

card-background

7

Check Wall
Hosted Elements

card-background

4

Get Existing/Create
New Wall Types

card-background

8

Join
All Walls

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

Pick
Wall

card-background

5

Define New
Wall Curves

card-background

9

Delete
Original Wall

card-background

2

Read Wall Type
Layers/Materials

card-background

6

Create New
Walls (per layer)

card-background

3

Create Names
For New Types

card-background

7

Check Wall
Hosted Elements

card-background

4

Get Existing/Create
New Wall Types

card-background

8

Join
All Walls

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 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

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