# Set parameter of batch of families in directory

**URL:** <https://forum.dynamobim.com/t/set-parameter-of-batch-of-families-in-directory/76720>\
**Category:** Revit\
**Tags:** revit, clockwork, dynamo\
**Created:** [May 19, 2022, 7:09pm UTC](https://forum.dynamobim.com/t/set-parameter-of-batch-of-families-in-directory/76720 "2022-05-19T19:09:14Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![waqar.a.khan949](https://avatars.discourse-cdn.com/v4/letter/w/2bfe46/32.png) [@waqar.a.khan949](https://forum.dynamobim.com/u/waqar.a.khan949)\
**Post date:** [May 19, 2022, 7:09pm UTC](https://forum.dynamobim.com/t/set-parameter-of-batch-of-families-in-directory/76720/1 "2022-05-19T19:09:15Z")

</div>

Hi,

I am trying to change the value of built in parameters such as (Always vertical, Work Plane Based) of a batch of families in a directory.

Following is my graph

 ![Fix Always Vertical & Work Plane 2_2022-05-19_09-06-19](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/1/e1c55abbf91ef17c998619165b786de6b54bd0a1.png)

2nd attempt:

 ![t2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/3/f35b5b09d6b9474f82832468da71048153f8ae8d.png)

Getting Error:  
\*\*Warning: Element.SetParameterByName operation failed. \*\*  
**Attempt to modify the model outside of transaction.**

How to fix this issue or achieve the goal? Any help will be appreciated. Thank you!

---

<div class="post-metadata">

**Author:** ![SeanP](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/seanp/32/42560_2.png) [@SeanP](https://forum.dynamobim.com/u/SeanP)\
**Post date:** [May 20, 2022, 1:12am UTC](https://forum.dynamobim.com/t/set-parameter-of-batch-of-families-in-directory/76720/2 "2022-05-20T01:12:10Z")

</div>

Check this and should get you going in the right direction.

> [@Is it possible to change the Room Calculation Point for all families in a project?](https://forum.dynamobim.com/t/is-it-possible-to-change-the-room-calculation-point-for-all-families-in-a-project/40193/7):
>
> Had a play on my flight back to Toronto - This one will remove the need for List.UniqueItems slight_smile import clr clr.AddReference("RevitServices") from RevitServices.Persistence import DocumentManager from RevitServices.Transactions import TransactionManager clr.AddReference("RevitAPI") import Autodesk from Autodesk.Revit.DB import \* doc = DocumentManager.Instance.CurrentDBDocument # Collecting all placed Family Instances collector = FilteredElementCollector(doc).OfClass(FamilyInstance)…

---

<div class="post-metadata">

**Author:** ![GavinNicholls](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gavinnicholls/32/190442_2.png) [@GavinNicholls](https://forum.dynamobim.com/u/GavinNicholls)\
**Post date:** [May 20, 2022, 1:56am UTC](https://forum.dynamobim.com/t/set-parameter-of-batch-of-families-in-directory/76720/3 "2022-05-20T01:56:19Z")

</div>

As mentioned via Twitter dm the issue here I think is you’re using nodes which attempt to deal with elements at project level and not documents in background. [Orchid](https://github.com/erfajo/OrchidForDynamo/issues) might help here, or Python if you’re savvy with it.

---

<div class="post-metadata">

**Author:** ![waqar.a.khan949](https://avatars.discourse-cdn.com/v4/letter/w/2bfe46/32.png) [@waqar.a.khan949](https://forum.dynamobim.com/u/waqar.a.khan949)\
**Post date:** [May 20, 2022, 8:48am UTC](https://forum.dynamobim.com/t/set-parameter-of-batch-of-families-in-directory/76720/4 "2022-05-20T08:48:10Z")

</div>

Don’t want to use python node.

---

<div class="post-metadata">

**Author:** ![waqar.a.khan949](https://avatars.discourse-cdn.com/v4/letter/w/2bfe46/32.png) [@waqar.a.khan949](https://forum.dynamobim.com/u/waqar.a.khan949)\
**Post date:** [May 20, 2022, 8:48am UTC](https://forum.dynamobim.com/t/set-parameter-of-batch-of-families-in-directory/76720/5 "2022-05-20T08:48:58Z")

</div>

Can you help me find the solution. It should be easy but can’t find the problem

---

<div class="post-metadata">

**Author:** ![GavinNicholls](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gavinnicholls/32/190442_2.png) [@GavinNicholls](https://forum.dynamobim.com/u/GavinNicholls)\
**Post date:** [May 20, 2022, 9:16am UTC](https://forum.dynamobim.com/t/set-parameter-of-batch-of-families-in-directory/76720/6 "2022-05-20T09:16:49Z")

</div>

It’s not that easy, if it was then surely my tips would be followable easily ;). Look into [Orchid](https://github.com/erfajo/OrchidForDynamo/issues) as a starting point, if I find time I’ll come back to this one.

---

<div class="post-metadata">

**Author:** ![SeanP](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/seanp/32/42560_2.png) [@SeanP](https://forum.dynamobim.com/u/SeanP)\
**Post date:** [May 20, 2022, 10:23am UTC](https://forum.dynamobim.com/t/set-parameter-of-batch-of-families-in-directory/76720/7 "2022-05-20T10:23:10Z")

</div>

Then chances are you don’t want to find a solution. Your request is fairly complicated and most likely will require some python to achieve.

You may find just the right combo of nodes, but it’s probably going to be messy. As @GavinNicholls said, [Orchid](https://github.com/erfajo/OrchidForDynamo/issues) will be your best bet probably, but that has its own limitations too.

---

<div class="post-metadata">

**Author:** ![waqar.a.khan949](https://avatars.discourse-cdn.com/v4/letter/w/2bfe46/32.png) [@waqar.a.khan949](https://forum.dynamobim.com/u/waqar.a.khan949)\
**Post date:** [May 20, 2022, 10:36am UTC](https://forum.dynamobim.com/t/set-parameter-of-batch-of-families-in-directory/76720/8 "2022-05-20T10:36:06Z")

</div>

@SeanP , I am not too good with Python in dynamo so I try to stick with nodes but anyhelp in python will also be appreciated.

Tried another approach but in this case everything works and it shows the parameter is changing in dynamo but when I open the file it is still the same.

 ![Fix Always Vertical & Work Plane 4_2022-05-20_12-35-27](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/6/c60bc618c8a5f0af9a4e2912554d6e426da0cea8.png)

---

<div class="post-metadata">

**Author:** ![GavinNicholls](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gavinnicholls/32/190442_2.png) [@GavinNicholls](https://forum.dynamobim.com/u/GavinNicholls)\
**Post date:** [May 20, 2022, 11:56am UTC](https://forum.dynamobim.com/t/set-parameter-of-batch-of-families-in-directory/76720/9 "2022-05-20T11:56:54Z")

</div>

After looking around the Revit API Docs it looks like these parameters are not accessible in the family editor environment via the Revit API (which document background open/close relies on). They can be read at project level but aren’t available as parameters to the family manager class.

I believe these parameters can only be set to a family object at the project level, see below.

 ![family](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/d/fd35536a88a868bc91f5497116f82ba3d8f4a276.png)

---

<div class="post-metadata">

**Author:** ![waqar.a.khan949](https://avatars.discourse-cdn.com/v4/letter/w/2bfe46/32.png) [@waqar.a.khan949](https://forum.dynamobim.com/u/waqar.a.khan949)\
**Post date:** [May 20, 2022, 12:09pm UTC](https://forum.dynamobim.com/t/set-parameter-of-batch-of-families-in-directory/76720/10 "2022-05-20T12:09:59Z")

</div>

Thank you for your response. I actually want to do this for a batch of families in a directory. I have created 2 other versions

1. For 1 famiy - works ok
2. For familes in project - works ok
3. For families in directory - Stuck here!

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [May 20, 2022, 12:20pm UTC](https://forum.dynamobim.com/t/set-parameter-of-batch-of-families-in-directory/76720/11 "2022-05-20T12:20:37Z")

</div>

Yes the same experience here 😉
