# Python Help SetAllowVaryBetweenGroups

**URL:** <https://forum.dynamobim.com/t/python-help-setallowvarybetweengroups/28153>\
**Category:** Developers\
**Created:** [November 7, 2018, 10:57am UTC](https://forum.dynamobim.com/t/python-help-setallowvarybetweengroups/28153 "2018-11-07T10:57:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johannes\_Meiners](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/johannes_meiners/32/9156_2.png) [@Johannes\_Meiners](https://forum.dynamobim.com/u/Johannes_Meiners)\
**Post date:** [November 7, 2018, 10:57am UTC](https://forum.dynamobim.com/t/python-help-setallowvarybetweengroups/28153/1 "2018-11-07T10:57:06Z")

</div>

We have a list of shared parameter names, and want to set “SetAllowVaryBetweenGroups” for all of them.  
We found a skript and modified it. It seems to work, but can someone confirm, that this is ok?  
( we are absolute beginners, and don´t want to destroy our models by this skript 🙂 )

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/4/743494a8d3c4848699cfb9b626ac211643a2d622.png)

And the code:

```auto
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
import Autodesk

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

TransactionManager.Instance.EnsureInTransaction(doc)

map = doc.ParameterBindings
iterator = map.ForwardIterator()

namelist = []
iterator.Reset()
while iterator.MoveNext():
	definition = iterator.Key
	definition.SetAllowVaryBetweenGroups(doc,1)

TransactionManager.Instance.TransactionTaskDone()
```

---

<div class="post-metadata">

**Author:** ![Konrad\_K\_Sobon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/konrad_k_sobon/32/8838_2.png) [@Konrad\_K\_Sobon](https://forum.dynamobim.com/u/Konrad_K_Sobon)\
**Post date:** [November 7, 2018, 1:57pm UTC](https://forum.dynamobim.com/t/python-help-setallowvarybetweengroups/28153/2 "2018-11-07T13:57:50Z")

</div>

I think you are missing chunks of the code here. I see an input into the Python node with parameter names, but I don’t see that being used anywhere in code. Please post full solution if we are to test it for you.

Cheers!
