Hi Everyone,
I am trying to update the values for Air terminals. I am getting an error at line 68, expected string but got a type. I am trying to resolve this and Meanwhile any help from anyone would be highly appreciated.
# Boilerplate text
import clr
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
# Current doc/app/ui
doc = DocumentManager.Instance.CurrentDBDocument
# Preparing input from dynamo to revit
rooms = UnwrapElement(IN[0])
param_names = IN[1]
param_values = IN[2]
room_count = len(rooms)
param_count = len(param_names)
outcomes = []
# Do some action in a Transaction
TransactionManager.Instance.EnsureInTransaction(doc)
for r in range(0,room_count):
outcomes_sub = []
for p in range(0,param_count):
try:
param_get = rooms[r].LookupParameter(param_names[p])
param_get.Set(param_values[r][p])
outcomes_sub.append(rooms[r])
except:
outcomes_sub.append(None)
outcomes.append(outcomes_sub)
TransactionManager.Instance.TransactionTaskDone()
# Preparing output to Dynamo
OUT = outcomes
Wokring on my side. Make sure all your parmater values are strings. Also make your element list structure match mine, no sublists, just the elements in one list.