When you change the primitive in the style - it fails to display the name of the diagram element

Hello all!

I set up in my plugin to create new format styles. However, after I specify the primitive, for example, IStyle.PRIMITIVE_SHAPE_TYPE_RECTANGLE for the style, its setting automatically sets Text: Custom instead of the default Text: Name. Therefore, when I apply this style - the names of the diagram elements are not displayed. I need to manually change the Text parameter and re-save the style. I still do not understand how to switch this property back to Text: Name.

Please help me to solve this problem.

Hi Starpes,

Thank you for your post. I have forwarded your case to our team to study and let you know when there are any updates.

Best regards,
Jick Yeung

Hi Starpes,

Please call:
IStyle.setCustomText(…)

by providing any of the followings as parameter:
“${name}”
“${taggedValue=MyTag}”
“AnyText”

Best regards,
Jick Yeung

Oh, Jick, thank you so much!
It really works!

You are welcome. Wish you a happy weekend. :grinning_face_with_smiling_eyes: