Add Yes/No instance parameter to family

Unfortunately doesn’t work.
I found this thread https://forum.dynamobim.com/t/create-type-parameters-in-dynamo/3200/4 and I was able to re-type the code so it works if I want to add ONE Type parameter. But if I need to add a list of Instance parameters (defined by string) it doesn’t work. I need to change the code but I am not familiar with Python

If you somehow could help me with that… :slight_smile:

import clr

clr.AddReference(“RevitServices”)
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument

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

par_name = IN[0]
par_type = ParameterType.YesNo
par_grp = BuiltInParameterGroup.PG_VISIBILITY
TransactionManager.Instance.EnsureInTransaction(doc)

OUT = doc.FamilyManager.AddParameter(par_name, par_grp, par_type, False)

TransactionManager.Instance.TransactionTaskDone()