Thoughts about writing multiple parameter-values into multiple parameters of multiple elements

Hi all,

Whilst working on my Dynamo scripts for Revit I often need to fill multiple parameters for multiple elements. The parameter values that are associated with these parameters are always different from each other. For example unique object handles we use on our project.

To write these parameters I usually use a “setup” like this: (Because I couldn’t find a solution with list levels/ lacing)


However, I hate this. It is hard to maintain, needs a lot of nodes and is just an eyesore in general.

Since I have been dealing with this for a while I searched a bit around the forum today and found this topic where @Kulkul supplied some DesignScript code which seems to solve this issue, code seen below:

def wrap(e:var, par:var[], val:var[]){
e.SetParameterByName(par, val);
return = e;
};
wrap(e, p, v);

Now, returning to this topic:
Have any of you guys encountered this problem, and if so, how do/ did you deal with it?

List levels tend to do heavy lifting on many > many parameter scenarios.

In 6:05 onwards I show a unique value for list of parameter names approach using levels:

Thanks for the quick and very clear reply Gavin, thought I had checked that combo before, but I think I maybe missed the lacing. I’ll do some testing and come back to you.

Works perfect @GavinCrump , thanks a lot!

1 Like