Is it possible to make an integer parameter blank by setting it as null?
Have a look at this thread: Reset / Set Parameter to Empty / Blank / Null - #15 by sovitek
1 Like
Open the custom node, copy the contents, switch back to the main workspace and paste them into it. Wire them up and see if you get a meaningful error.
I had to convert it to Cpython but i get an error on line 26
# Copyright(c) 2018, Dimitar Venkov
# @5devene, dimitar.ven@gmail.com
# www.badmonkeys.net
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import ElementId
clr.AddReference('RevitServices')
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
def tolist(x):
if hasattr(x,'__iter__'): return x
else : return [x]
inv = ElementId.InvalidElementId
items = tolist(IN[0])
param = IN[1]
OUT = []
TransactionManager.Instance.EnsureInTransaction(doc)
for i in items:
itm = None
par = i.InternalElement.LookupParameter(param)
if par is not None:
try:
par.Set(inv)
itm = i
except:
pass
OUT.append(itm)
TransactionManager.Instance.TransactionTaskDone()
Can’t help without you showing the error, but if I had to guess it expects a list of elements, you are providing a single element.