Hi,
I am working o Electrical project. I want create filled region on room boundary.
I used launch SNU utility for taking information for space boundary.
So I want to create Filled Region from space boundary. I am find out following python script from discussion for creating filled region from room boundary.
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
roomsList = UnwrapElement(IN[0])
filledRegionName = IN[1]
for fr in FilteredElementCollector(doc).OfClass(FilledRegionType):
if Element.Name.GetValue(fr) == filledRegionName:
filledRegion = fr
break
viewId = doc.ActiveView.Id
TransactionManager.Instance.EnsureInTransaction(doc)
regions =
for room in roomsList:
if room.Area > 0:
roomBoundaries = room.GetBoundarySegments(SpatialElementBoundaryOptions())
curveLoopList =
roomCurves = CurveLoop()
for roomBoundary in roomBoundaries:
for boundarySegment in roomBoundary:
roomCurves.Append(boundarySegment.Curve)
curveLoopList.Add(roomCurves)
region = FilledRegion.Create(doc,filledRegion.Id,viewId, curveLoopList)
regions.append(region)
TransactionManager.Instance.TransactionTaskDone()
OUT = regions
is this possible to used this script for creating Filled Region from space boundary or taking room boundary as areference from linked model.
Thanks,
Swapnil