Answers for "get level dynamo revit"

0

get level dynamo revit

import clr

clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager

doc = DocumentManager.Instance.CurrentDBDocument

#Preparing input from dynamo to revit
names = IN[0]

#Do some action in a Transaction
levels = []

fec = FilteredElementCollector(doc).OfClass(Level).ToElements()

for l in fec:
	for n in names:
		if l.Name == n:
			levels.Add(l)
OUT = levels
Posted by: Guest on August-14-2021

Browse Popular Code Answers by Language