Is there a way to create a floor using Dynamo that consists of two outlines (one nested within the other)? When I use the Floor.ByOutlineTypeAndLevel node, the Floor.ByCurveLoops node, or similar nodes and input multiple outlines, it creates two separate floors instead.
I would greatly appreciate any ideas or suggestions.
I must be mis-remembering something. Was it just that the sketch mode wasn’t available? There was an issue with sketch-based elements for quite a while. I thought that only got fixed within the last few years. Maybe it’s just that the nodes don’t accept that structure?
EDIT: Maybe my statement wasn’t clear. I meant that the API only accepts a singular external boundary loop. You can provide multiple closed loops for multiple floor plates, but it does not allow for internal openings. Those have to be added as Floor Openings or Shafts separately.
I tried to do something cleaner in python script
with a list of ordered curves
but I still have to learn python, I’m not at the top yet (it must be better written for sure for someone who is proficient)
import sys
import clr
import System
from System.Collections.Generic import List
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import Curve,CurveLoop,Floor,Transaction,Level,Line,XYZ
doc = DocumentManager.Instance.CurrentDBDocument
ArrayCurves=IN[0]
floortype=UnwrapElement(IN[1])
level=UnwrapElement(IN[2])
structural=IN[3]
def c_loop_create(lst):
revc=Autodesk.Revit.DB.Curve
listCL=List[CurveLoop]()
for i in range(len(lst)):
a=List[revc]([c.ToRevitType() for c in lst[i]])
aL=CurveLoop.Create(a)
listCL.Add(aL)
return listCL
lslope=Line.CreateBound(XYZ(0,0,0),XYZ(1,0,0))
t=Transaction(doc,"Create Floors")
t.Start()
for i in ArrayCurves:
floor=Floor.Create(doc,c_loop_create(i),floortype.Id,level.Id,structural,lslope,0)
t.Commit()
OUT = "do"
thank you in advance, I had seen a post by Mr. Poupin (I couldn’t find it anymore), but as I had taken notes on the CurveLoop lists, it helped me a lot
thanks by the way