Wall Sweep/reveal creation from dynamo

I’m trying to place some reveals in walls using a node from Data-shapes which is largely a python script calling the WallSweep.create method - it appears to be creating the sweeps well but I’m having a very tough time figuring out why the distance from the end of the walls is inconsistent. Testing in a clean project it works great, but when I got to a larger test/live project the reveals are placed at varying distances even after I filter the walls re: their placement direction. Any thoughts are welcome as to why this might be happening or how to get around it


This is the text from the Python Node

import clr
from Autodesk.Revit.DB import*
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]]
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)
wsi = WallSweepInfo(WallSweepType.Reveal,vertical)

#setting distance of sweep
wsi.Distance = dist

#creating wallsweep
ws =
for w in walls:

OUT = ws

Could you possibly post your .DYN file? it would be helpful to troubleshoot with. @Matt_Sweeney

@TomC this is kind of an old thread - i was never able to get this to work consistently with Dynamo - I ended up doing it with a C# macro and was able to get consistent results that way. However that create method for the sweeps was a little tricky.

I also don’t think i have that .dyn anymore as it never worked properly I didn’t keep it.

Yeah I noticed it was a year old, thought I might be able to help. I’ve yet to look at C# macros, I’ve been working through a similar project Dynamo project. Seems maybe I should go the macro route.