Python Help SetAllowVaryBetweenGroups

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 :slight_smile: )

And the code:

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()

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!