Copy Family Name to Type Name

This is driving me Nuts… How do you Copy the Family Name to the Typ Parameter?
In other words I am tying to copy the Family Name to its Type Name.

There is only one Type per Family and the Instances placed in the project are also just one.

I looked up all the previous posts on this and cant wrap my head around them.
The closest I got to was someone asking how to copy the Type Mark to the Type Name but even that seems to be unresolved.

Thanks for lighing my bulb. Cheers, K

Family Name and Type Name are not behaving like regular parameters, AFAIK (sometimes they are readonly), so you have to work with them at the Element level. Basically, “Getting” and “Setting” Element.Name.

However, it is NOT always possible to set new names for certain categories/families/types. For example, Walls have preset family names like “Basic Wall”, “Curtain Wall”, “Stacked Wall”, and they cannot change, but you can change the type names.

When Elements support changing name, in python you can do either:

Element.Name.SetValue(famType,"newName")

or

famType.Name = "newName"

This is using IronPython engine, so if either of these conventions throw random errors, use the other one. The first one tends to work better.

1 Like