Shared Parameter help: "Values can vary by group instance"

We need to create more than 100 new shared parameter, we are able to create then from excel with this:

but the last step we need, is to set “values can vary by groupe instance” to true.
We found this skript here : Shared Parameter: Values can vary by group instance
PNG

can someone help us to change this so that is takes a list of parameter names as input and change all parameters in this list to “values can vary by groupe instance” to true?
As we don´t know about python we are lost :slight_smile:

Thank´s to all,
Johannes

Please post the python as preformatted text, or post the dyn with the python in it. This will help others help you as they won’t have to retype all the code from scratch.

Hope this helps:

import clr

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

paramName = ‘Türen’;

namelist =
iterator.Reset()
while iterator.MoveNext():
definition = iterator.Key
namelist.append(definition.Name)
if definition.Name == paramName:
definition.SetAllowVaryAcrossGroups(doc,1)
break

TransactionManager.Instance.TransactionTaskDone()

1 Like

Hey,

I’m not able to get it working, but I think Erik might be interested in adding this funcationality to the Orchid package…

If you raise an issue here:


he might help :slight_smile:

Hopefully that’s useful,

Mark

Did anyone come up with a solution for this? The Python code works great if adding one parameter and you specify the parameter name but I’m looking to add list of parameters that’s pulled from an Excel file.

Unfortunately I’m still very new to Python so I’m not sure how to adjust the code.

Another thought was to create a list from each of my original lists and use that new list to add the parameters and repeat that process for the length of my original list. I’m not even sure if that’s possible but just a thought.

Found it here

Oops. Found it here

https://forum.dynamobim.com/t/add-shared-parameters-to-some-families-orchid-package/21254/11

Have to use levels