Copy data from one parameter to family type name

Hi. I m trying to copy data from one text parameter to family type name. I created a Dynamo script, but I get a warning: “Warning: Element.SetParameterByName operation failed. The parameter’s storage type is not a string.”

I tryed as well the Element.SetName node, but it doesnt copy data from TFM-parameter to Type. Type name doesnt change.

What if you try to make it a string with the String from object node? and then pass it into name?

Thanx for reply. I tryed, but doesnt work.

This means that the input has to be something else than a string. Check the Storage Type of your parameter.

I guess that storage type for Type Name is Element Type. But I still dont know how to make my script work and if it is possible to push data to Type Name. Thanx though )

No, I think Type Name is Read Only, you will need to set the Type parameter instead…

Maybe this topic could give you the right direction?

Modified the script and it s working now. To change type parameter I had to use Duplicate node.
Here is the definition.