# How to delete multiple family parameter from inside the project

**URL:** <https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802>\
**Category:** Developers\
**Tags:** revit, python, dynamo\
**Created:** [October 3, 2018, 9:11pm UTC](https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802 "2018-10-03T21:11:05Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![shrawanram](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/shrawanram/32/57521_2.png) [@shrawanram](https://forum.dynamobim.com/u/shrawanram)\
**Post date:** [October 3, 2018, 9:11pm UTC](https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802/1 "2018-10-03T21:11:05Z")

</div>

I have 50 mechanical equipment inside the project.  
I am trying to delete all listed parameter of all families from inside the project.

THis script works fine inside the family . How to workable from projects also.

Need help.

Thank you.

![Capture](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/3/1/31949388874a3dba61f20eae9c0a12ac18492a30.png) project.

[REMOVE PARAMETER From project.dyn](https://forum.dynamobim.com/uploads/short-url/iKLLDOf3XNHVKk0tlMRWKnfA3mQ.dyn) (2.6 KB)

---

<div class="post-metadata">

**Author:** ![Jonathan.Olesen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jonathan.olesen/32/44242_2.png) [@Jonathan.Olesen](https://forum.dynamobim.com/u/Jonathan.Olesen)\
**Post date:** [October 4, 2018, 8:58pm UTC](https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802/2 "2018-10-04T20:58:43Z")

</div>

I would advice looking towards the Orchid package which have tons of nodes for working with families instead of using a custom python script written to work on active document 🙂

---

<div class="post-metadata">

**Author:** ![shrawanram](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/shrawanram/32/57521_2.png) [@shrawanram](https://forum.dynamobim.com/u/shrawanram)\
**Post date:** [October 4, 2018, 9:19pm UTC](https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802/3 "2018-10-04T21:19:52Z")

</div>

@Jonathan.Olesen I found orchid package very useful but remove parameter works fine just inside Family.  
Cannot delete from the projects to all family parameter.

Do you have any idea .

Thank you.

---

<div class="post-metadata">

**Author:** ![CVestesen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/cvestesen/32/56704_2.png) [@CVestesen](https://forum.dynamobim.com/u/CVestesen)\
**Post date:** [October 5, 2018, 4:25am UTC](https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802/4 "2018-10-05T04:25:24Z")

</div>

You can visit [www.revitapidocs.com](http://www.revitapidocs.com) and check for a method to delete the project parameters unless someone in here can remember it :-).

EDIT: Try have a look at this tread. It is written in C#.  
[https://forums.autodesk.com/t5/revit-api-forum/deleting-a-non-shared-project-parameter/td-p/5975020](https://forums.autodesk.com/t5/revit-api-forum/deleting-a-non-shared-project-parameter/td-p/5975020)

---

<div class="post-metadata">

**Author:** ![MJB-online](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mjb-online/32/24884_2.png) [@MJB-online](https://forum.dynamobim.com/u/MJB-online)\
**Post date:** [October 5, 2018, 6:59am UTC](https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802/5 "2018-10-05T06:59:36Z")

</div>

Hi @shrawanram,

I’m not exactly sure what you have in mind, but maybe the “Orchid” node below can help you.

 ![OpenFamilyDocumentFromProject](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/c/9c983fb7e8d4d2cf8eb7e59baedbfdaeb39c00ef.png)

**EDIT: the picture above is updated (initialy forgot the “Element.ElementType” node).**

Kind regards,  
Mark

---

<div class="post-metadata">

**Author:** ![Mark.Ackerley](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mark.ackerley/32/79310_2.png) [@Mark.Ackerley](https://forum.dynamobim.com/u/Mark.Ackerley)\
**Post date:** [October 5, 2018, 8:28am UTC](https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802/6 "2018-10-05T08:28:26Z")

</div>

Hi,

If you haven’t found a better approach yet, you might consider this…

It deletes parameters from multiple families in a folder.

You might need to save out your project families and then reload them.

Hope that’s useful,

Mark

[FamilyParameterDelete.dyn](https://forum.dynamobim.com/uploads/short-url/34QaO5CBf4x9iYjTlFnXlDishsZ.dyn) (6.9 KB)

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/4/940085c52d46cd482918bffeeb794ff493535191.png)

---

<div class="post-metadata">

**Author:** ![shrawanram](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/shrawanram/32/57521_2.png) [@shrawanram](https://forum.dynamobim.com/u/shrawanram)\
**Post date:** [October 8, 2018, 6:20pm UTC](https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802/7 "2018-10-08T18:20:47Z")

</div>

@MJB-online

I got Error message on Beaker Package

 ![asd](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/e/9e86851f9b53f65a9ca64f8d931c01a9e524f712.png)  
Warning: One or more of the input types are not matching. Couldn’t find a version of GetFamilyDocument that takes arguments of type (\_\_array)

and for orchid package:  
Warning: Parameter.Delete operation failed.  
Please run this command in a family document.

---

<div class="post-metadata">

**Author:** ![shrawanram](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/shrawanram/32/57521_2.png) [@shrawanram](https://forum.dynamobim.com/u/shrawanram)\
**Post date:** [October 8, 2018, 6:21pm UTC](https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802/8 "2018-10-08T18:21:50Z")

</div>

@CVestesen  
Thank you. But still too high level for beginners.

---

<div class="post-metadata">

**Author:** ![shrawanram](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/shrawanram/32/57521_2.png) [@shrawanram](https://forum.dynamobim.com/u/shrawanram)\
**Post date:** [October 8, 2018, 8:00pm UTC](https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802/11 "2018-10-08T20:00:32Z")

</div>

@erfajo

just trying,  
Do you have any nodes that works for inside project ?

---

<div class="post-metadata">

**Author:** ![MJB-online](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mjb-online/32/24884_2.png) [@MJB-online](https://forum.dynamobim.com/u/MJB-online)\
**Post date:** [October 9, 2018, 11:57am UTC](https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802/13 "2018-10-09T11:57:14Z")

</div>

@shrawanram, I forgot to mention the “Element.ElementType” node, so i updated the picture above.  
@erfajo, I didn’t know you had a similar node (you’re package keeps getting better 👍).

Kind regards,  
Mark

---

<div class="post-metadata">

**Author:** ![shrawanram](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/shrawanram/32/57521_2.png) [@shrawanram](https://forum.dynamobim.com/u/shrawanram)\
**Post date:** [October 9, 2018, 6:15pm UTC](https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802/16 "2018-10-09T18:15:03Z")

</div>

@MJB-online  
Just remind you that i am working on Project not in revit family.

i GOT ERROR IN PARAMETER.DELETE NODE (ORCHID)

 ![POST%202](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/0/90b59de0ee50f7e833fe40c26d195097533c9d41.png)

```
**Warning: Parameter.Delete operation failed.**
 **Value cannot be null.**
 **Parameter name: familyParameter**

```

Any help will be appreciated.  
Thank you.

---

<div class="post-metadata">

**Author:** ![shrawanram](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/shrawanram/32/57521_2.png) [@shrawanram](https://forum.dynamobim.com/u/shrawanram)\
**Post date:** [October 9, 2018, 9:28pm UTC](https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802/17 "2018-10-09T21:28:11Z")

</div>

@erfajo  
I will put some issue in github .

Hope it will solved soon.  
Thank you.

---

<div class="post-metadata">

**Author:** ![MJB-online](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mjb-online/32/24884_2.png) [@MJB-online](https://forum.dynamobim.com/u/MJB-online)\
**Post date:** [October 10, 2018, 7:21am UTC](https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802/18 "2018-10-10T07:21:44Z")

</div>

@shrawanram,

- I know you are in working in project environment (me to, and it works fine for me).
- When i am testing Dynamo graphs that open families (in background), i frequently **restart** Revit and Dynamo.
- When you want to edit 366 families, you also need to create a list with 366 filenames for input of the “Document.SaveAs” node (not just one).

---

<div class="post-metadata">

**Author:** ![shrawanram](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/shrawanram/32/57521_2.png) [@shrawanram](https://forum.dynamobim.com/u/shrawanram)\
**Post date:** [October 10, 2018, 7:41pm UTC](https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802/19 "2018-10-10T19:41:32Z")

</div>

@MJB-online

is there any other way to do it ?  
it will make me 366 save as node for family. ?

---

<div class="post-metadata">

**Author:** ![Mark.Ackerley](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mark.ackerley/32/79310_2.png) [@Mark.Ackerley](https://forum.dynamobim.com/u/Mark.Ackerley)\
**Post date:** [October 11, 2018, 11:10am UTC](https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802/20 "2018-10-11T11:10:45Z")

</div>

Hey,

This works for me…

It runs from the project, saves out the families, edits their parameters then reloads them.

The only quirk is that I couldn’t get my Orchid File Load to work. This might be something to do with my setup.

Hope that helps,

Mark

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/4/44c0f9676e9be11b6f5c48c96b6d523ce9c4b9c8.png) [FamilyParameterDelete-2.dyn](https://forum.dynamobim.com/uploads/short-url/nXeA7tmtjd2SfpM0qWV3vDlNZ5c.dyn) (23.8 KB)

---

<div class="post-metadata">

**Author:** ![shrawanram](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/shrawanram/32/57521_2.png) [@shrawanram](https://forum.dynamobim.com/u/shrawanram)\
**Post date:** [October 12, 2018, 6:30pm UTC](https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802/22 "2018-10-12T18:30:27Z")

</div>

Dont know what causing this error  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/3/036888393404951e00cc5c8d9417f14218df7d47.png)  
@Mark.Ackerley

---

<div class="post-metadata">

**Author:** ![Mark.Ackerley](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mark.ackerley/32/79310_2.png) [@Mark.Ackerley](https://forum.dynamobim.com/u/Mark.Ackerley)\
**Post date:** [October 12, 2018, 10:02pm UTC](https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802/23 "2018-10-12T22:02:52Z")

</div>

That’s a new one to me! Is it a clockwork node? Perhaps message the package creator?

Sorry,

Mark

---

<div class="post-metadata">

**Author:** ![Jonathan.Olesen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jonathan.olesen/32/44242_2.png) [@Jonathan.Olesen](https://forum.dynamobim.com/u/Jonathan.Olesen)\
**Post date:** [October 13, 2018, 7:49am UTC](https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802/24 "2018-10-13T07:49:07Z")

</div>

Think your error is that the all elements of category node you’re using is returning a function as you have not supplied it with enough information to run…

---

<div class="post-metadata">

**Author:** ![shrawanram](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/shrawanram/32/57521_2.png) [@shrawanram](https://forum.dynamobim.com/u/shrawanram)\
**Post date:** [October 25, 2018, 4:43pm UTC](https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802/26 "2018-10-25T16:43:17Z")

</div>

@erfajo That would be helpful for me .  
Can you share ?

---

<div class="post-metadata">

**Author:** ![jean](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jean/32/188752_2.png) [@jean](https://forum.dynamobim.com/u/jean)\
**Post date:** [October 26, 2018, 9:32am UTC](https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802/27 "2018-10-26T09:32:48Z")

</div>

hi @shrawanram, you can use this script to delete project parameters by their names.

> ![delete-params](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/4/d49c94574d97f2afa610df420876d1e26cdd39b5.gif)

```
#(should be fine with 1.3.x or 2.x.x versions)

import clr

clr.AddReference('RevitAPI')
clr.AddReference("RevitServices")

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

# input[0]
elements = IN[0]
# 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
			todelete.append(param.Id)

# start transaction
TransactionManager.Instance.EnsureInTransaction(doc)
# delete from document
res = [doc.Delete(i) for i in todelete]
# end transaction				
TransactionManager.Instance.TransactionTaskDone()

OUT = res

```

[Next page](https://forum.dynamobim.com/t/how-to-delete-multiple-family-parameter-from-inside-the-project/26802.md?page=2)
