How do i set multiple parameters as "Value can vary by group instance" in dynamo?

Hi,
I have made a script for making several project parameters at the same time, and it works great, as i can make as many as i want (atm up to 15). The only thing i am struggeling with is taht i also have scripts that fill out some of these parameters. But as i use grouping alot, and i want to keep these groups, i have to manually change all the parameters i make to “Value can vary by group instance”.
I found a python script that changed the value for me, but only named parameters
(Shared Parameter help: "Values can vary by group instance")

I’ve been trying to modify this script, but as i have no programming experience, and just started poking coding, i cant get it to work.
I cant get the script to read a list of strings to fill in the “paramName” (line 15)

I am not getting any errors running it, but it does not SetAllowVaryBetweenGroups either.

It would be easier if you uploaded the .dyn here, or at least upload the python code so we can change the specific parts that are wrong.

To start with, remove lines 15-17 and put in paramName = IN[0]
For line 24, change it to if definition.Name in paramName:

See if that works.

I will try that, tahnk you.
Here is the dyn file
Steg3_Prosjekt_Parametre.dyn (39.7 KB)

It runs with these changes, but it does not change the value. so reult is the same

That is probably because you are trying to run a script to create the parameters and modify them at the same time. The result is that you are searching for parameters before they exist, hence it does nothing.

Also the break line stops it from modifying anything but the first. Give me a second and I will give you a working script.

This one should work. I didn’t have some of the packages you had so I used a different one for creating the project parameter and just normal code blocks to clean up the parameter name list.

The important change is that the output of the create project parameter connects to the input of the python, so that the python script waits until after the parameters are created. And then the python script is fixed as well.
Steg3_Prosjekt_Parametre.dyn (39.3 KB)


Thank you so very much!
I copied ur changes into my script and as u say, it works perfectly.

No problem. If a post solves the issue, can you mark it as the solution?