Change View Types Names to Upper

Hello, I’ve been trying to make a script to change to uppercase the names of types of a view type, but I have gotten to a dead end, an error message saying that elements are “read-only”. Suppose you have types of Floor Plans, such as “Site”, “Enlarged”, etc. How can I rename those types of floor plans to uppercase, to be “SITE”, “ENLARGED”?

This is what I have done so far. The two first nodes are from Konrad’s Archi-lab package.

Alfredo, this is because Revit sees the view names in caps as the same name and rejects the change. Try doing this natively in the software and you will get the same result.

I would recommend to change them to something else first and then rename them to the name you want in the end. For example you could rename “Site” to “Site(1)” first, and finally rename “Site(1)” to “SITE” and so on.

Hi, Rafael,

Thanks, I’m going to try that.

Edit: I tried that. I even isolated one view type, not a list, and tried to change the name of one view type, but that didn’t work. Is it not possible?

Alfredo

You have to use the “SetName” method, which in the example below I am showing from the Clockwork package. Family Type names are not editable via the “SetParameterByName” as they are not considered to be the same as a regular parameter value because it has to be unique.

The script would be as shown below:

1 Like

Thanks, Rafael, I’m going to try with that node, Set Name

Bingo! Thanks Rafael, this works. Interesting how you used “GetParameterValueByName” twice, next to each other, to get “Type” first, then to get “Type Name”. Thank you very much for your help.