How to rename a GraphicsStyle?

How to rename a GraphicsStyle?

attone
Observer Observer
507 Views
3 Replies
Message 1 of 4

How to rename a GraphicsStyle?

attone
Observer
Observer

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”.

attone_0-1635989872594.png

 

 

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:

attone_6-1635990161258.png

 

 

 

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:

 

attone_2-1635989872599.png

 

This is the exception:

attone_3-1635989872602.png

 

So I can’t delete this one. 

attone_4-1635989872604.png

 

 

 

At last, I try to replace the GraphicsStyle with the newly created one. It will throw a exception. The SubCategories is read-only

 

attone_5-1635989872604.png

Please Let me know if this is a solution.Thanks

 

0 Likes
508 Views
3 Replies
Replies (3)
Message 2 of 4

SONA-ARCHITECTURE
Advocate
Advocate

Hi , do you find a solution to rename GraphicsStyle?

Pierre NAVARRA
SONA-Architecture.
http://www.sona-architecture.com
https://fr.linkedin.com/in/pierre-navarra-62032a107
0 Likes
Message 3 of 4

SONA-ARCHITECTURE
Advocate
Advocate

I found a solution : 

First create a new GraphicsStyle cloned from the current to rename
Reassign all instances lines of the document to the cloned one

Delete the old one

Create a new GraphicStyle cloned from the precedent clone, but now, create with the original name.

Reassign all instances lines of the document 

Delete the first clone.

Pierre NAVARRA
SONA-Architecture.
http://www.sona-architecture.com
https://fr.linkedin.com/in/pierre-navarra-62032a107
0 Likes
Message 4 of 4

TripleM-Dev.net
Advisor
Advisor

Just rename the subcategory with the same name under the Lines main category, those are the linestyles (aka the GraphicStyle you mean)

 

GraphicsStyle is nothing more than a Category, as the top-level categories can't be renamed and some builtin sub-categories, but all other sub categories can be renamed.

And in the case of the LineStyles, it's the Lines Category.

0 Likes