Book a Demo

Author Topic: Create/Extend Profile  (Read 4512 times)

DanF

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Create/Extend Profile
« on: June 10, 2014, 05:32:53 pm »
Hey,

basically i want archive to extend every created element/stereotype and also connectors by a set of values/properties when they are created.

I tried to develop a stereotype like "baseStereotype" and extend all metaclasses and also some stereotypes like "SysML Block".

But this way i have to create Elements and then manually add the the "baseStereotype", which is a lot of effort and for me not a feasible solution.

So is there a (another) way to integrate it for example in the metaclass/build in types?

Another approach might be to develop/extend Toolbox pages to create Elements that have multiple stereotypes. (How) is this possible?

Thanks in advance
Dan
« Last Edit: June 10, 2014, 05:39:59 pm by DanF »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Create/Extend Profile
« Reply #1 on: June 10, 2014, 06:09:37 pm »
You should create a toolbox that contains your elements. That way you can create element and stereotype (along with tags) in one go.

q.

DanF

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Create/Extend Profile
« Reply #2 on: June 11, 2014, 12:10:13 am »
Thanks qwerty,

i was thinking about that, but as mentioned i want to cover as much meta elements as possible, including connectors and (build in) stereotypes.
Building toolbox pages is a solution that needs a lot of effort while you have to redefine nearly every element including connectors and also all the additional values/properties. Moreover it is very hard to maintain in case of changes.

So i would prefer a solution where i can extend elements on meta level because i need these extra values on nearly all elements.
Is there any possibility?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Create/Extend Profile
« Reply #3 on: June 11, 2014, 08:41:58 am »
None I know of.

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Create/Extend Profile
« Reply #4 on: June 11, 2014, 09:36:42 am »
Quote
So i would prefer a solution where i can extend elements on meta level because i need these extra values on nearly all elements.
Create a template package, and add each type of element that you want modified to it. Add all the tags and you'll be fine.

DanF

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Create/Extend Profile
« Reply #5 on: June 13, 2014, 10:50:22 pm »
Thank you Simon,

that was a very helpful hint and it worked great so far for Elements.
But unfortunately it does not work for connectors!
So is there a way to get this working for connectors too?

Edit:
And just to be sure it is not possible to extend the metaclasses itself through a profile(MDG Technology) or something?
« Last Edit: June 13, 2014, 11:25:43 pm by DanF »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Create/Extend Profile
« Reply #6 on: June 16, 2014, 09:14:04 am »
The only thing that I can think of for connectors would be an add-in handling the message to say a connector has just been created.

DanF

  • EA Novice
  • *
  • Posts: 11
  • Karma: +0/-0
    • View Profile
Re: Create/Extend Profile
« Reply #7 on: June 23, 2014, 10:54:47 pm »
Thank you again Simon,

this sounds like the last choice solution ;).
But if this is the only solution for my problem then this must work via an add-in.
I had a short look over the sdk reference, but found nothing suitable for catching events when a connector/element is created. (besides is there an online sdk reference?? I am not used to references in pdf)

So how do i get connector creation events? And also element creation events, because if i have to go this way i would prefer to handle the whole issue in the same way.

Thanks in advance
Dan

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Create/Extend Profile
« Reply #8 on: June 24, 2014, 01:09:23 am »
The help has a SDK reference under Automation/Add-In/Broadcast. You might also be interested in Geerts free add-in code.

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Create/Extend Profile
« Reply #9 on: June 24, 2014, 09:00:13 am »
Quote
I had a short look over the sdk reference, but found nothing suitable for catching events when a connector/element is created.
It's in the Automation and Scripting section. Search for "EA_OnPostNewConnector".
The Sparx Team
[email protected]