Author Topic: A way to create a text based class/template?  (Read 1542 times)

jplusip

  • EA User
  • **
  • Posts: 69
  • Karma: +0/-0
    • View Profile
A way to create a text based class/template?
« on: July 26, 2014, 12:47:07 am »
What I mean is this:


I would like to have a model element that I would have in a library that users could drag from the library, onto their diagram, and have an instance of these annotations appear on their diagram (where each instance will have the information filled in). However, if I make any changes to the parent model element in the library, those changes would propagate throughout the model.

Is this doable in Sparx EA?
(And before anyone brings it up, I know the Diagram type is in the top-left, this is just how I was instructed to make this).
« Last Edit: July 26, 2014, 12:48:06 am by jplusip »

qwerty

  • EA Guru
  • *****
  • Posts: 9575
  • Karma: +167/-148
  • I'm no guru at all
    • View Profile
Re: A way to create a text based class/template?
« Reply #1 on: July 26, 2014, 05:27:43 am »
If you want those labels to appear you need to write a script or an add-in. There is nothing out of the box to create that appearance.

q.

jplusip

  • EA User
  • **
  • Posts: 69
  • Karma: +0/-0
    • View Profile
Re: A way to create a text based class/template?
« Reply #2 on: July 26, 2014, 06:18:43 am »
Thanks. Guess I need to check out your book then!  :)

qwerty

  • EA Guru
  • *****
  • Posts: 9575
  • Karma: +167/-148
  • I'm no guru at all
    • View Profile
Re: A way to create a text based class/template?
« Reply #3 on: July 26, 2014, 05:27:24 pm »
Always welcome :-) You might wait a few days though since someone else might come up with a smarter idea. However, nothing beats the power of scripting EA.

q.

Sunshine

  • EA User
  • **
  • Posts: 656
  • Karma: +45/-3
  • Emoji's make you look younger
    • View Profile
Re: A way to create a text based class/template?
« Reply #4 on: July 28, 2014, 07:30:57 am »
Just thought I'd mention an idea I had so it may inspire someone else to  figure a way to take it further. I had an idea that you might be able to do something with the new Model view element in version 11 and some SQL behind the scenes but I couldn't see a way of identifying the diagram nor change the orientation of the results from columns to rows.
In Fragment RTF Reports you can pass the package id to the SQL using a macro  i.e. #Package# but I didn't see anything about the diagram id.
Just a thought to investigate. I don't have time at the moment to dig further.