Hi all,
Is it possible to add wall sweeps and reveal through RiR?
I couldn’t find any solutions based on the available components.
Hi almeidaandre,
Currently there are no native components for dealing with Wall Sweep workflows, it is scriptable and we do have a feature request logged.
You can try the Create WallSweep components in the funBIM Package.
However, this was developed for Rhino7, I don’t know if it is suitable for Rhino8.
@almeidaandre You can use the following code
import clr
clr.AddReference('System.Core')
clr.AddReference('RhinoInside.Revit')
clr.AddReference('RevitAPI')
clr.AddReference('RevitAPIUI')
import rhinoscriptsyntax as rs
import Rhino
import Grasshopper
import RhinoInside
from RhinoInside.Revit import Revit, Convert
from Autodesk.Revit import DB
from RhinoInside.Revit.Convert.Geometry import GeometryEncoder
from Autodesk.Revit.DB import FilteredElementCollector
from Autodesk.Revit.DB import BuiltInCategory,WallSweepInfo
doc = Revit.ActiveDBDocument
collector = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_Cornices).WhereElementIsElementType()
sweep_types = collector.ToElements()
sweep_type = sweep_types[0]
if GO == 1:
wall_sweep_info = WallSweepInfo(False, WallSweepType.Sweep)
wall_sweep_info.Distance = 1.0
wall_sweep_info.IsInside = True
wall_sweep_info.IsFlip = False
t = DB.Transaction(doc, "Create Wall Sweep")
t.Start()
try:
wall_sweep = WallSweep.Create(Wall, sweep_type.Id, wall_sweep_info)
t.Commit()
except Exception as e:
t.RollBack()
raise e