Copy all parameter values from one Family instance to another

let’s say we have one family instance populated with values, than we place a new instance of that type and we want to copy all parameter values (likely to be instance parameters only) from one to the other. Is there a direct way to accomplish this with get and set parameter value by name?

 

 

and what if we want to copy all parameters from one list of instances to another list of new instances?

Beware of the Element.GetParameterValueByName node as it has issues:

Sounds like the most robust solution would be through Python (can’t really help there!). Knowing the Revit API is becoming more and more important.

Here’s the most elegant solution I can think of right off hand. I may publish this in my Rhythm package.

GetValue.SetToOthers?

2015-04-28_10h50_10

Thanks John, your solution got me part of the way. But I don’t see how to copy All parameters from Multiple elements with this method.

I really want to take a Two equal length lists of elements, and copy all instance parameters from one list of elements to the other. I’m sure this should be easy in Dynamo… but I just can’t crack it myself at the moment.

I also think that Dimitar’s code below could almost get me there, but I can’t see how to flip this around and feed a complete list of instance parameters to the SetParameterByName code block (copied from other thread):

Hi Neil,

That should be doable with some replication guides. Have a look at the below example:

2015-04-08_18-40-47

You can extract all the instance parameters of that element with the “Element.Parameters” node. That will give you parameter elements, so you’ll have to extract the name of the parameter from that with either “Element.Name” or with some string management. Once you have those, you should be able to proceed as usual with the Get/Set nodes.
Some problems that I see with this work flow is that some of the parameters are read-only and that will lead to a few errors. You might also get a lot of duplicate mark errors.
You can omit the DS lacing by using one of the list combinators like “List.Combine”

2015-04-30_09-20-37

2015-04-30_09-21-53

2015-04-30_09-45-31

Since it’s imperative to filter out read-only parameters, I added a new node for that purpose to package Clockwork (up on the package manager now). Here’s a sample workflow how you would propagate all writable instance parameters of a given family instance to all other placed instances of the same type. (Note that I am using Dynamo 0.7.5 so as to not be affected by the bug Dave mentions above…)

PropagateParameters

I would have loved to use this parameter query with a 3dView, but since it is a familySystem, it won`t work. What else I could use to select all the 3dview from a Revit document, then filter them…?3dViews-select

another work around could be select, family elements within the project by a project parameter.

However when I use the node Element.parameters from the family type node, they would not get picked…any hints

P.s. ( Seats are divided in group, by a parameter field related to the level in order to let me to schedule them- they are the 2000 seats…)

Hi Andreas, Element.GetParameterValueByName still has issues in 0.7.5 when it comes to levels, at least in my tests. I updated the GitHub issue. Note how some levels report the name while others report the element ID as an integer (or text string?).

This is still not really working for me. I am trying to take two equal length lists of elements, and copy all of the Instance writeable parameters from one to the other. I would have thought it would be relatively easy in Dynamo :slight_smile: Anyway, please see below for my progress. My first problem is that I can only seem to get it to work on one Element at a time, when I try to expand to a list of elements various things don’t work (like the Clockwork ReadOnly check). No doubt this is because I don’t understand how to Map things properly when I have a list of Elements, and sublists of Parameters… The other thing that isn’t working is the GetParameter node - as a workaround to the 0.8 issue, the one I am using successfully gets values as Strings, but obviously this doesn’t really work because I can’t push Length and Yes/No values into the target element (because they are strings).

I appreciate any thoughts you may have. Thanks!

copy parameters node

This tactic over here http://dynamobim.com/forums/topic/applying-parameter-values-through-nested-lists/ actually helped. Still have some errors but it is progressing.

getset

 

Hi Luke, you cannot directly pass a list for input port parameterName. You have to use a List.Map node or a series of them to process lists when nodes don’t accept lists (have I said “lists” enough times?!). It would be fantastic to have nodes that accept both; Dynamo would be so much more user friendly.

Anyway, here’s what you need to do I think. In this example I have a list of objects (Rooms) and a list of parameters I want to retrieve. Basically the function just gets more complex and you nest other List.Map nodes as required. Hope I’m explaining this correctly and it helps in some way.

Mapping

Or…2015-05-08_16h29_04

Hey John , I can’t see the node Element.Getmultipleparametervalue ? is it no longer there in 0.8 ?

 

Hello to the Dynamo community. I would appreciate some help with this question, related to this conversation. I have noticed a limitation in “ElementGetParameterValueByName”. It seems to work fine except for those parameters included in the Identity Data group of families, such as “Model”, “Description”, “URL”, “Keynote” and others in that group. Well, that’s exactly what I needed, the Description parameter. I want to write a workflow that gets all the values of the Description parameter of the Specialty Equipment category, and changes the values from lowercase to uppercase. I can do it with other parameters, but when I try with the “Description” parameter (or any other parameter of that group) the script cannot read the values. Is this a limitation of this node? Is there another way to get that value?

 

EDIT: …and, by the way, how did you guys manage to change your avatar here? I have tried several times to upload an image, but my profile does not update. :frowning:

Hi Alferdo,

For your first question, see graph below, Regarding managing Avatar work is under progress. Good Luck!

Well, thanks to this forum, I learned about the usefulness of custom packages. I loaded “Rythm”, and it contained the 2 nodes that solved the problem that I was describing above. Here I am sharing the solution: Change Description Parameter Text to UpperCase or LowerCase Change Description Parameter Text to UpperCase or LowerCase

…and, I don’t know what happened to my previous message. Sorry, it’s my first time here. I was expressing my gratitude to Kulkul for posting a solution to my questions. Thank you very much again.

I am having the same problem here. I want a generic family with 3d text as parameters to obtain the information of the room that it lies within. is this possible?

 

I tried a few of these methods only to scrap them and start over. I am trying to select the Room Bounding parameter in a wall (for now- eventually certain wall types) and i can grab almost every single other parameter except that one. I am starting to think it is one of those system/default issues that it may be unselectable. Has anyone stumbled on something like this?

 

Thank you!