Setting multiple parameters with different values for multiple elements


I’m trying to find out how to change the values of a fixed set of parameter from a bunch of elements. The values vary per element. For instance, change the “Mark” and “Comments” from each selected element to “Win 1” & “Comm 1” for element 1, “Win 2” & “Comm 2” for element 2, …

I found on the forum this code block that worked fine,

<span style=“color: #309130;”>//Designscript method to write to the appropriate COBie parameter</span>
el1<<span style=“color: #2585e5;”>1</span>><<span style=“color: #2585e5;”>3</span>>.SetParameterByName(params<<span style=“color: #2585e5;”>2</span>>,vals<<span style=“color: #2585e5;”>2</span>><<span style=“color: #2585e5;”>3</span>>);




Two questions:

  1. What does this script mean, and more particular what is the function of <1> and <2> and <3>.

  2. Anyone knows how this can get working with the Element.SetParameterByName node? It doesn’t seems to work well in my example below. Neither with List.Map routines.

I’m pretty sure there is a good node solution for it, but I really don’t see it myself at the moment. Anyone suggestions?

Dynamo file: Multiple parameter setting

Revit Test file: Windows


Thanks a lot !




Here is a Node solution using List.Combine

File: Multiple-parameter-setting.dyn



As for the replication guides, while I am quite fascinated by what they can do, I won’t be able to properly explain how they work.

The Dynamo Language Syntax section in the Dynamo Primer seems to have the beginnings of an explanation.

However, I picked up the basics from the Dynamo Language Guide

Below, I’ve posted crude examples of varying outputs (using replication guides) for a basic operation (a+b).

Hope this helps explain the power of replication guides in negotiating different list structures.

File: ReplicationGuides.dyn