I am trying to create dynamo to delete unwanted project parameters from revit model.
I have prepared below dynamo script, but it is not working.
Could you please help me?
FYI: I am using Dynamo 1.2 & Revit 2015.
Thank you for your co-operation.
Deleter Project Parameter_WIP.dyn
That nodes needs Elements currently you’re feeding strings to it.
Hint: Use element types and get the parameterelements from it and filter parameterelement by parameter name.
Thank you for your quick response.
I could not find out ‘ParameterElement’ in ‘Element Type’ node. Refer below image.
Could you please help me to resolve this issue?
Thank you in advance.
@nileshkatkar1983in , try this;
# dynamo version - 1.3.2
#(should be fine with 1.3.x or 2.x.x versions too)
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
elements = IN
# params id
todelete = 
# check/make list
if not isinstance(elements, list):
elements = [elements]
# collect parameters
parameters = FilteredElementCollector(doc).OfClass(ParameterElement).ToElements()
# loop input params
for elem in elements:
# loop existing params
for param in parameters:
# if name found
if param.Name == elem:
# append id to delete list
# start transaction
# delete from document
res = [doc.Delete(i) for i in todelete]
# end transaction
OUT = res
Thank you for your replay.
I am using Revit 2015 & Dynamo 1.2, So shall i use this updated package in Dynamo 1.2?
Could you please upload here Dynamo graph?
Because i tried to use your Python script but no luck (Might be i am doing something wrong).
Thank for your quick reply.
I used dynamo graph to delete lighting fixture project parameters.
But it is showing warning.
Please refer below image.
@nileshkatkar1983in, you are having Revit API Class (ParameterElement) Importing Error,so here is updated version (another way of importing classes) remove-project-parameters.dyn (2.7 KB)
. Try this one and let’s see if Ok or not.
Thank you for your efforts.
I run updated script but is showing warning.
Refer below image.
I am sorry but I dont support Revit 2015 anymore. My nodes will most likely not work while they are build to support Revit 2017 as minimum. It can support Dynamo 1.2, there is a post how to do this in the forum somewhere.
Many thanks for your efforts.