Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: sam2018 on September 17, 2024, 07:50:45 am

Title: attributes defined for stereotype (of the type metaclass table ) not visible
Post by: sam2018 on September 17, 2024, 07:50:45 am
(https://i.imgur.com/Oxx1cNq.png)

I have created a stereotype as shown which belongs to metaclass table.I have defined one attribute.But once profiles in saved and MDG is created and import,I dont can see the attribute defined inside a properties of that stereotype
created object in EA looks as below without attribute i defined.
(https://i.imgur.com/hspGpy8.png)
I am using EA 16.1
could you please helpß
https://i.imgur.com/Oxx1cNq.png

https://i.imgur.com/hspGpy8.png
Title: Re: attributes defined for stereotype (of the type metaclass table ) not visible
Post by: qwerty on September 17, 2024, 08:04:39 am
Stereotype properties become (formerly) so-called taged values. Now they are stereotype properties (which you find under the tagged values pabe). But they will not create an attribute in the instantiated element. To do that you will have to write an add-in that does tha job.

q.
Title: Re: attributes defined for stereotype (of the type metaclass table ) not visible
Post by: Guillaume on September 17, 2024, 04:23:12 pm
As qwerty mentioned, this is not the purpose of stereotypes. Furthermore DB tables have a specific implementation in EA which may be tricky to extend with UML profiles.
If you want predefined attributes (= table columns) on new tables, you can use Template Packages: create a package and diagram with the modified table, and set this package as the Project Template Package (Settings > Settings menu). From then any new table will be created according to your template.
Title: Re: attributes defined for stereotype (of the type metaclass table ) not visible
Post by: sam2018 on September 17, 2024, 05:39:09 pm
I am totally new here in MDG
for ex  I created a stereotype of the meta type class
defined an attribute called status.
So once exported this profile .
resulting element in EA will show defined attribute in MDG inside a property window on right side.
I am trying a same thing n Table metatype
https://i.imgur.com/IRJzaEc.png

thanks to give more insight in this
Title: Re: attributes defined for stereotype (of the type metaclass table ) not visible
Post by: Geert Bellekens on September 17, 2024, 07:12:27 pm
Have you checked in the tags section?

Your example actually has two stereotypes, so that might be reason for it not showing up on the properties pane.
Now EAUML::Table is a special one, so there might be a reason you end up with two stereotype. Apparently a lot of features regarding tables use a hardcoded reference to the stereotype EAUML::Table

Geert
Title: Re: attributes defined for stereotype (of the type metaclass table ) not visible
Post by: sam2018 on September 17, 2024, 07:34:48 pm
Hallo Geert thanks
I have checked in Tags section in resulting EA object.I do not see any attribute there.
yes we see 2 stereotypes in case of this Table.
I am not finding solution
but meanwhile i tried this  as in a picture.I am not sure this is correct.
Then I could see attribute.But PK(Primary key ) is not visible on a object as in the previous case
https://i.imgur.com/V8sZG1u.png
Title: Re: attributes defined for stereotype (of the type metaclass table ) not visible
Post by: Geert Bellekens on September 17, 2024, 08:26:01 pm
Yeah, thats the thing I mentioned about EAUML::table being hardcoded.

I'm not sure if there is a solution. You better ask sparx support.

Geert