Author Topic: Change diagram type (icon)  (Read 5100 times)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Change diagram type (icon)
« on: December 22, 2010, 08:39:54 pm »
Hi all,
according to the documentation the Type attribute for a Diagram is read only. When creating a diagram it is possible to set the type in the AddNew with the second parameter (e.g. AddNew ("Diagram name", "Custom") to get the red lined directory like icon). Further it is possible to set the StyleEx of the diagram which will change the value shown at Diagram/Change Type from the context. But unlike this context menu the StyleEx will not change the Type accordingly!

So either StyleEx must change the icon (and Type) accordingly or Type must be read/write.

This is a bug, isn't it?

q

[edit] It appears that StyleEx silently ignores changes. "Reserved for Sparx Systems" according to docu. Nicely. Why do they publish their private interface? To confuse the users, I guess.

So in the end there are just two way: croak "Please change it manually" or to create a new diagram with cloned contents and delete the one in question. Any other solution?
« Last Edit: December 23, 2010, 01:18:06 am by qwerty »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Change diagram type (icon)
« Reply #1 on: December 23, 2010, 01:51:52 am »
There's always the solution with  Repository.Execute(SQLString)  ;)

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Change diagram type (icon)
« Reply #2 on: December 23, 2010, 02:56:22 am »
Hmm. Why have an API if I could do it in assembler too?

q