How to rename a GraphicsStyle?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi Guys
I have encounter a problem which I don’t know how to solve. I am clueless right now.
I need to rename GraphicsStyle. For example, I want to change the name “LH-A-modi” to “modi”.
First, I simply set the name of a GraphicsStyle to a new name, but it throwed a exception. I can’t assign a new name to a GraphicsStyle.
This is the exception:
Secondly, I create a new GraphicsStyle with a specified name, then I delete the old one. It work fine with the unused ones. If some elements have used the GraphicsStyle, it will throw a exception.
This is how I coded:
This is the exception:
So I can’t delete this one.
At last, I try to replace the GraphicsStyle with the newly created one. It will throw a exception. The SubCategories is read-only
Please Let me know if this is a solution.Thanks