Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: Guillaume on August 26, 2015, 10:59:27 pm

Title: Display the classifier of an Archimate Component
Post by: Guillaume on August 26, 2015, 10:59:27 pm
Hi,

I'm using Archimate 2.0 Application Components as Classifiers and Instances. When adding instances on diagrams, the classifier name is not displayed (e.g. "app1" instead of "app1 : AppName").
This is possible with UML components and I think this is due to the Shapescript defined in the Archimate 2.0 UML profile using #Name#.
Is there any way to show the classifier's name for an archimate component?

Title: Re: Display the classifier of an Archimate Compone
Post by: Geert Bellekens on August 26, 2015, 11:27:30 pm
You could "hack" the Archimate 2.0 MDG and change the shapescript yourself.

Shapescripts are stored in the MDG file as zipped, base64 encoded strings.
You can decode/unzip/change shapescript/zip/encode  and replace the existing shapescript with your version.

Geert
Title: Re: Display the classifier of an Archimate Compone
Post by: qwerty on August 27, 2015, 12:15:12 am
Hey you both. Are those different meetings? One on the 17th and the other on the 18th?  ::)

q.
Title: Re: Display the classifier of an Archimate Compone
Post by: Guillaume on August 27, 2015, 12:17:37 am
I initially decoded the shapescript to identify what was written in Archimate 2.0 UML Profile, however I hadn't thought of updating it in Sparx EA folder.

I replaced the Archimate2.xml file in EA MDGTechnologies folder and it worked  :)

It would be interesting to know if Sparx can update the official MDG i.e. in "shape name", replace print("#name#"); with the following:

Code: [Select]
if(hasproperty("classifier",""))
{
println("#NAME#");
}
else
{
println("#NAME# :#CLASSIFIER#");
}
thanks!
Title: Re: Display the classifier of an Archimate Compone
Post by: Geert Bellekens on August 27, 2015, 04:01:31 am
Quote
Hey you both. Are those different meetings? One on the 17th and the other on the 18th?  ::)

q.
Yes, the 17th (Paris) is mainly in French, the 18th (Brussels) in English

Some speakers are going to both events so, so now they only have to make one trip.

You know you are very welcome right?

Geert
Title: Re: Display the classifier of an Archimate Compone
Post by: qwerty on August 27, 2015, 04:15:18 am
Yes, I know  :)

Once the meeting is held in Berlin I'll be there. Traveling is no longer fun for me :(

q.
Title: Re: Display the classifier of an Archimate Compone
Post by: Geert Bellekens on August 27, 2015, 05:01:30 am
Quote
Yes, I know  :)

Once the meeting is held in Berlin I'll be there. Traveling is no longer fun for me :(

q.
I'll talk to the guys from LieberLieber and Sparx Systems CE.
If they can do Stuttgart they must be able to do Berlin too right?

Geert
Title: Re: Display the classifier of an Archimate Compone
Post by: qwerty on August 27, 2015, 05:42:22 am
I guess so, though Stuttgart is quite a couple of kilometers nearer to Vienna than Berlin. Thanks anyhow :)

q.
Title: Re: Display the classifier of an Archimate Compone
Post by: Eve on August 27, 2015, 08:32:25 am
Quote
It would be interesting to know if Sparx can update the official MDG
There's certainly no technical reason we can't. The reason we haven't is because ArchiMate doesn't have a concept of instances or classifiers.
Title: Re: Display the classifier of an Archimate Compone
Post by: Guillaume on October 12, 2015, 11:28:01 pm
Quote
You could "hack" the Archimate 2.0 MDG and change the shapescript yourself.

Shapescripts are stored in the MDG file as zipped, base64 encoded strings.
You can decode/unzip/change shapescript/zip/encode  and replace the existing shapescript with your version.

Geert

Is it also possible to find the shapescript for a Metaclass e.g. a Note?
Title: Re: Display the classifier of an Archimate Compone
Post by: Geert Bellekens on October 13, 2015, 02:09:58 am
I'm afraid not.
AFAIK they are hard coded in EA.

Geert