Book a Demo

Author Topic: Changing default toolbox for diagram  (Read 5670 times)

kepNCI

  • EA User
  • **
  • Posts: 127
  • Karma: +1/-0
    • View Profile
Changing default toolbox for diagram
« on: November 10, 2012, 05:25:15 am »
Can one change the default toolbox associated with an existing diagram?(or change its type of diagram from Deployment to the custom deployment diagram, which I would assume would also change its default toolbox?)

I have some deployment diagrams that were created before we started to use a custom deployment diagram which has a custom toolbox. I do not want to redo the existing diagrams, but it would be nice if I could effectively change their default toolbox to the custom toolbox rather than the Deployment toolbox so that I do not have to use the "More tools..."  (Ya, I'm lazy).

Karl

g.makulik

  • EA User
  • **
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: Changing default toolbox for diagram
« Reply #1 on: November 10, 2012, 05:50:48 am »
You could try changing the type of your older diagrams to your new custom diagram type (if you didn't try this already).

HTH
Günther
Using EA9.3, UML2.3, C++, linux, my brain, http://makulik.github.com/sttcl/

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Changing default toolbox for diagram
« Reply #2 on: November 10, 2012, 06:31:05 am »
You need to adapt t_diagram.styleex so it contains
Code: [Select]
MDGDgm=<MDG>::<mdg-dia-name>;DefaultLang=<MDG>;
q.
« Last Edit: November 10, 2012, 06:31:34 am by qwerty »

kepNCI

  • EA User
  • **
  • Posts: 127
  • Karma: +1/-0
    • View Profile
Re: Changing default toolbox for diagram
« Reply #3 on: November 10, 2012, 08:12:22 am »
I thought changing the diagram type would be the answer, but I could not find the option when I right clicked the diagram in the browser. I just noticed that the option is under the Dagram menu. So I changed the diagram type to my NCI diagram and all appears well. Still need to do that for all of the diagrams

I currently do not understand Q's solution, but maybe I will not need it.

Thanks Gunther and Q.

g.makulik

  • EA User
  • **
  • Posts: 355
  • Karma: +0/-0
    • View Profile
Re: Changing default toolbox for diagram
« Reply #4 on: November 10, 2012, 08:47:47 pm »
I think q's answer shows how you could automate this by issuing an SQL UPDATE statement on the diagram objects selected directly in the database. BUT you should do this very carefully, being sure that it will affect only the diagrams you want to change.

HTH
Günther
Using EA9.3, UML2.3, C++, linux, my brain, http://makulik.github.com/sttcl/

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Changing default toolbox for diagram
« Reply #5 on: November 10, 2012, 09:49:12 pm »
Günther is right. The StyleEx property contains all the settings as semi-colon separated list. You need to add above string to the diagram you want to change. You can also try to change EADiagram.StyleEx in the API. I faintly remember having some trouble with that. So maybe the SQL update might be necessary.

q.