Add parameters to family instance Revit 2016 Dynamo 1.3

Hi i need to add one parameter or a list of parameters to all door families.
This was solved in this thread for Revit 2015. But this solution did not work in Revit 2016.

My result is null.

Is there another way to do it or to correct this workflow?

Are you trying to add parameter in a family file or a project file?

I try to add parameters in a family file.

Ok try this. The workflow extracts data from the shared parameter file and allows you select what shared parameter groups and how the parameter should be grouped in the family. The Documents.AddSharedParamsToFamily Node is from a package called Dyn_SharedParamTesting

Here is the Python Code

#Copyright (c) mostafa el ayoubi
#Data-Shapes 2016

import clr
from Autodesk.Revit.DB import*
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from Autodesk.Revit.UI import *

doc = DocumentManager.Instance.CurrentDBDocument
uidoc = DocumentManager.Instance.CurrentUIDocument
app = doc.Application


app.SharedParametersFilename  =IN[0]
spfile = app.OpenSharedParameterFile()
gr = spfile.Groups
defp = [g.Definitions for g in gr]
defflat = [x for l in defp for x in l]
defflatname = [x.Name for x in defflat]
defgrname = [x.Name for x in gr]


OUT = defflat , defflatname , defp , defgrname

Thx u for your help.
Where do you select the Family where the parameters are added?

Error: The current Document is not a Family Document

Ok…this works only if u select the family and open the family editor…but it adds the parameter to the “type parameter”
but i need them in the normal parameter list:
Im happy over any batch solution for Revit2016 or 2017.

You have IsInstance set to false. That creates a type parameter. If you want an instance parameter you need to set that input to true.

your are right!

But i need a solution that works for all door families…and this only works if u dont need to open the family editor. Any idea how this works?

Batch automation then? Have you looked into this:

well…cant find anything usefull on your link. But im not a pro in Dynamo yet…this can be the issue

If you want a few new parameters in your project, you could import shared parameters into your project parameters and apply them to doors. So all your doors in the project get this shared parameter.


If you need this to be done in Dynamo there will also be a way

this old post from Kulkul help me to get what i want:)