Apply wall reveals in several walls

Hello all,

This is my first post in the forum and I am also new to Dynamo. I have tried to search in the forum but no luck.

What I want is simple. I have walls in my Revit model and I just want to create wall reveals on it.
I have tried to search a node for reveals with no luck. I can select the reveal type but don’t know what to do next.

Any idea?

Many thanks in advance.

In the image I have aplyed some reveals manually.

Hi @vuduchild
You’re lucky I was just working on this one ! :slight_smile:
here’s how I did it:


there is a first part to get the reveal type by name :

import clr
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Electrical import*
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.Elements)


doc = DocumentManager.Instance.CurrentDBDocument


collector = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Reveals)

traytype = [x for x in collector if x.ToDSType(True).Name == IN[0]]

OUT = traytype[0]

then the second part of the workflow is to create the reveals:

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import*
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager


doc = DocumentManager.Instance.CurrentDBDocument

if isinstance(IN[0],list):
	walls = [UnwrapElement(i) for i in IN[0]]
else:
	walls = [UnwrapElement(IN[0])]
wstype = ElementId(IN[1].Id)
sr = IN[2]
vertical = IN[3]

UIunit = Document.GetUnits(doc).GetFormatOptions(UnitType.UT_Length).DisplayUnits
dist = UnitUtils.ConvertToInternalUnits(IN[4],UIunit)

#creating wallsweepinfo
if not sr:
	wsi = WallSweepInfo(WallSweepType.Sweep,vertical)
else:
	wsi = WallSweepInfo(WallSweepType.Reveal,vertical)

#setting distance of sweep
wsi.Distance = dist

#creating wallsweep
TransactionManager.Instance.EnsureInTransaction(doc)
ws = []
for w in walls:
	ws.append(WallSweep.Create(w,wstype,wsi))
TransactionManager.Instance.TransactionTaskDone()



OUT = ws

where :
IN[0] = wall(s)
IN[1] = sweep/reveal type
IN[2] = false : sweep , true : reveal
IN[3] = false : horizontal , true : vertical
IN[4] = distance of sweep

I wrapped it in a node on the Data-Shapes package … could be easier to use for you :slight_smile:

9 Likes

Hello @Mostafa_El_Ayoubi,

Well, that looks amazing. Sorry for my ignorance, are those python code blocks?
I will try ASAP and let you know the results.

Many thanks

@Mostafa_El_Ayoubi Prodigious

2 Likes

Those are code blocks with some python code between quotes, which makes it a string. I then use Python from string nodes to interpret the code.

1 Like

Hello Mostafa.
I’m trying to make this node from Data-Shapes package work, but i can’t. I think it’s because of the sweep/reveal type. I’m using a code block node with the name of one of several sweep types i have created in Revit between quotes but i get nothing. No error messages, only null.
What is happening?
Please, i need some help.

1 Like

If you just installed packages, it happens, when seing null values without warnings, that you simply need to restart Dynamo

Thank you for your quick response but i have restarted not only Dynamo but the computer and it’s the same. I think i’m missing something …

Actually, it returns a null value but creates the reveals anyway

No in my case. There are no sweeps created.

I just used “Revit.Elements.Wall” instead of “Walls” before RemoveIfNot

I’ve just try it but not, i get the same elements than using “Wall”. That is only for discarding floors from room boundaries.
Do you get the sweeps using the same program than me?

Actually not, I get the sweep type by selecting a Revit element, then I use Element.GetType (from Wombat) with Element.Name

That’s ok. At last i’ve got it. Thank you very much.
Although i haven’t used Element.Name, only Element.Type. But that forces you to create manually a sweep. Doesn’t matter.
Now there is another problem; how could i make it select the correct face of the wall?

First I want to point out this strange issue with Element Name written with a point and the workaround that has been proposed:

For what concerns the question, it is possible that a reveal is automatically placed on the exterior face of the walls, you would need to check that

Yes, i have noticed that “WallSweepOnWall” node creates all sweeps on the exterior face of the wall. It would be nice to include a parameter for choosing the face where it will be created on.

You can try the Offset from Wall instance parameter, I think

That will be useful with regular profiles but not with more complex ones.
I will keep on trying to get it. I don’t know python programming, so if someone wants to help it would be great.

Hi @Manuel_Lopez1 ,
sorry for the late reply. Could you share a dummy file containing the wall sweep types you’re tyring to use?

Hello @Mostafa_El_Ayoubi,
I’m trying to get the skinting-boards by rooms. If i use wall sweeps i find some problems: first, i need to place them in the wall face that faces the room, so as i wrote before, your great node should include the option to choose the inner or outter wall face to place it. The second problem is that walls may run along several rooms and if i don’t want to place skirting-boards in those rooms i’d had to modify the length manually.
Other way to get this is creating “solids by sweep” and “direct shapes”, but it’s no longer possible to get the information by schedules.
If you have any suggestion it will be great.
Thanks in advance.

Rodapié biselado.rfa (280 KB)