Changing family parameters using Excel

Hello!
I’m not used to Dynamo yet. I’m trying to change the parameters of a family by an Excel sheet.
I can’t figure out what I’m doing wrong at Element.SetParameterByName. I get the following warning : no parameter found by that name. But I do have this parameter. I’ve tried many things without success.
I know that other people have already had this problem too, but I couldn’t find a solution at other topics.
Could someone help me, please?

Thank you.!

Capture|690x353

If your parameter is a type parameter you need to either use a custom node that takes type parameters or set the parameter value for the family type instead of the family instance.

1 Like

Nick, thank you for your answer.
What custom node can I use that would be different from Element.SetParameterByName?

Using the node " String from Object " before you connect to “value” input of Element.SetParameterByName node. hopefully it works.
dynamoBIm

Your workflow starts by manually selecting a type, so you can try to just bypass the all elements of type node and set the value directly.

However this will only accept one value, and will require that you select each family manually, and wire the correct value from your list accordingly. Assuming your excel file has a method for tracking which value goes to each type (ideally this would be something like the type name), you are likely better off by getting the parent family, pulling all types of that family, and wiring the resulting list (who’s depth and data structure should match the excel data) into the Element.SetParameterByName node.

Gotta crawl before you can sprint though. Get the hang of working with one item first, then move on to working with the list.

Tank you very much Jacob and Tony. However the problem still persists :frowning:

Can you show the error and a preview of the String from Object node?

The error is “no parameter found by that name”.
It seems that the elements from " All elements of family type" node do not contain the parameters of my family. The parameters that I can see at “Get family parameter” node.

Remove the all elements of family type as I directed before and the String from object node. Revit wants a number here not a string, and you are converting your number (13.6) into a string (“13.6”) so you might as well be sending it “Aardvark” and asking it to set “Ho” to that.

The "Get Family Parameter node indicates this in the dropdown.

The first part “Ho” is the name of the parameter. The second part (Type) indicates if it is an instance or a type parameter. The third part indicates what type of data the parameter wants. The (double) indicates it wants a number with a decimal.

  • (string) = text
  • (double) = number with a decimal
  • (int) = whole number
  • (id) = element

There are others and other stuff that you can learn by reading that drop down as well. I can’t recall but I think (R) means a parameter is read only or reporting… can’t remember which it is at the moment.

1 Like

Hello Jacob,

I removed the all elements of family type as you said. Now the node indicates my parameters in the dropdown, but I got a new error: the parameter’s storage type is not a string. How can I fix this?

Convert the string to a number. Search string to number in the library. Let me know if you can’t find it.

1 Like

Jacob! Thank you very much for your help! Now it is working perfectly!!

Great news. Please mark the most correct/helpful post as the solution so others can use the forum to find the answer faster next time out.