Set parameter by name is not working for "type" any help out there?


#1

I have only been using dynamo for about 3 weeks on and off.

I am having a hard time changing the family type from an excel file read.
Can anyone see what I am doing wrong.

Thanks in advance for any help


#2

The error explains the problem. “The parameter’s storage type is not a string.”

I assume your input is the family type name. It needs to be the actual family type object.


#3

Hi @a.corriveau,

I think @Nick_Boyts is right.
You could try to place a “FamilyType.ByName” node between the “List.GetItemAtIndex” and “Element.SetParameterByName” nodes.

Kind regards,
Mark


#4

I think this might be easier to solve if you were to show what exactly you’re sending into element input.

Things I notice: you’re sending a list of strings into value. I don’t think that works. Considering that and the fact your input for the parametername is “Type”: are you trying to change-the-name-of/create family types with that, because you can’t do that via Element.SetParametByName. In fact that’s something I’ve been trying to pull off for a couple of days now but haven’t managed yet.


#5

Hi @PauLtus,

It is possible to set the Type parameter in this way, but you have to change the strings into FamilyTypes, as @Nick_Boyts mentioned above.

Kind regards,
Mark


#6

I would think so (although I wasn’t sure I’m not surprised you can give a string input into value), but I’m wondering what @Nick_Boyts is trying to achieve with it most of all.
As far as I know you can’t change the type name with that.