Setting Multiple Parmaeters

I am trying to populate a Revit sheet scheduled from an excel file. I am using the Rhythm node Element.SetMultipleParameters. I have it working but it is only setting the first parameter.

Any help is much appreciated,

Sheet List

Are you feeding the parameter names in as one long string with comma separated values?

Steven,

 

Are you using an old version of Rhythm?

 

http://dynamobim.org/forums/topic/set-multiple-parameters-by-name-for-an-element/

 

Yes John the parameter names an in a single index separated with a comma. The values are are in a list with a sub list for each item to be changed.

I am using the version I downloaded about 3 weeks a go but I will check.

I will also verify that I revised the node. It’s been a little while and that may have been when I was having update issues.

Hi Steven,

I was hopping to leave the null’s so they would end up being blank cells in the Revit scheduled. I can remove them though and check if it fixes the problem.

 

Thanks for looking into it,

And also check your parameter’s storage types?

I went into the node and pulled out the code block. It is giving this warning

“Warning: Element.SetParameterByName operation failed.
No parameter found by that name.
Element.SetParameterByName operation failed.
No parameter found by that name.
Element.SetParameterByName operation failed.
No parameter found by that name.”

 

I double checked that every parameter was spelled correctly. I also ran it on each parameter individually and it worked. Only get this err when I try to run all of them at once. The code looks good to me but thats not saying much. I am not separating the parameter names correctly?

Thanks for all of your help guys,

Steven,

Remove the curly brace operator around the n1 variable. Since the String.Split node already puts the parameter names into a list the curly brace operator isnt needed (i think).

John,

Can you update your package.

tim

Set

This node was junk that I didn’t refine before uploading to the package. I actually don’t even know how it got in there.

I went ahead and fixed the node to take the parameter names and a list of the same length for values. If you do not give it a list of the same length you will have trouble. I will be removing this node from Rhythm in a few updates. For now I will leave it to see if it works for your needs.

Go ahead and download version 20160124 and it will be in there.

Tim- thanks for the suggestions. I revised the node, but I am removing it from future Rhythm releases because the amount of variables at hand are far too great.

 

  1. What if the user doesn't use two equal lists?
  2. What about lacing?
  3. What if the data at hand requires commas?
  4. What if the list from excel is not ordered correctly.
  5. And it goes on and on.

Thanks for the reply Tim and John,

After a long struggle I final got it to work. I packaged a new node John and attached it to this post. I think this is a good node and this way people will not have to go through what I did.

As far as what you said

  1. I think they should use two equal lists or a list with null values (if the lists are not equal this node will still not work)

  2. I tried this with lacing but could not get it to work so equal lists will be needed

  3. My updated node should solve the problems with commas because yes that would be a problem

  4. The ordering of lists is just list management. This is going to apply the value to its corresponding index parameterName

If you do remove the node thats cool I understand why but wanted to show you how I changed it. Think it solves most of the problems

Element.SetMultipleParametersByName

Elements

Just try Replication Guides.

Replication Guides? Is there a posting on how to better do what I did? Not sure what you mean sorry

Dynamo Language Manual

  1. Replication Guides

Are you referring to why dynamo needs the replicated elements?

 

Thank you for the Dynamo Language Manual I did not know about it. Still very new to dynamo and making the transition from grasshopper.

You can solve this issue with Replication Guides(Cartesian Replication) as Tim advised you.

" Cartesian replication controlled by Replication Guides

When there are multiple collections, we need to control how these are combined. With ‘cartesian’ replication, each member of one collection is evaluated with every member of the other collections, so that resulting collection is the ‘cartesian product’ of the input collections.

The order in which the cartesian product is created is controlled by ‘replication guides’ in the form <n>, which define the sequence of the replication operations. This must be a continuously increasing sequence of int’s starting at 1. This sequence is equivalent to the order of the nested for loops that would have had to be written in an Imperative script.

a = {1, 5 ,9};

b = {2, 4 };

c = a<1> + b<2>; // cartesian replication c = { { 3, 5 }, { 7, 9 }, { 11, 13 } }

d = a<2> + b<1>; // changing the sequence of replication guides changes the resulting collection } "

Hi Steven,

Below is and example of Replication Guides. Good luck!

 

Oops! haven’t noticed Organon already replied it. Better explanation than me

:D