Changing names of GraphicStyle

Hey community small dynamo question from someone just getting my feet wet.

How would someone rename the line styles and annotation symbols in their project?

Example: “xxx – Thin Lines” –> “Thin Lines – xxx”

I have been able to do this with family names, but having some issues with line styles and annotation symbols.

Really appreciate any help.

2015-02-13 16_52_33-Dynamo

Not going to work - the Revit API says: “This element does not support assignment of a user-specified name…”

There are a few Graphic Styles that are system styles, so like Andreas was saying its not going to work. I think Thin Lines, Wide Lines, Medium Lines are just a few of the un-changable and un-removeable ones.

The method doesn’t seem to work for user created graphic styles as well. I think it’s just a bug of the API…

Thanks for the input. Any thoughts on an alternative method.

We have our company abbreviations in many annotations (symbols like “CompanyName-North Arrow” and “CompanyName-Foundation Lines”) and with a company name change I’m trying to find a way to change them in all ongoing projects. I’m also using the opportunity to move our CompanyName from the front of the title to the end.








I wanted to share what I have found in response to the original question: changing lines styles and generic annotations.

Lines styles --> no solution yet, even custom line styles

Generic Annotations --> instead of using the “Graphic Style” type, each subcategory has to be modified the same way we modified the detail components, (e.g. wall tags, floor tags)

Attached is the current solution