specialization-plugin icon indicating copy to clipboard operation
specialization-plugin copied to clipboard

Setting specialization attributes using jArchi script

Open michaelansley opened this issue 5 years ago • 6 comments

Hi Hérve,

I'd like to know if it is possible to set specialization attributes using jArchi scripting. I'm looking into using this as a way of managing a multi-lingual model, and it would be really helpful to script some facilities to switch language in a view, as well as to automate the setting of attributes to make views multi-lingual.

If this is currently not an available feature (accessing specialization by jArchi script), I'd like to add my vote to add it as a feature (if I may be so presumptuous).

Thanks, Michael

michaelansley avatar Feb 19 '20 08:02 michaelansley

Hi, I'm following up on this, as I discovered how the label specialization is working, and by changing the label property and some associated language properties, I've made this work reasonably well using some jArchi scripts. I can extract current names into language-aware properties, and switch languages.

The only issue now is this: when I change the language on a view, it changes the language for all of the objects in the view for all other views they are on also. Of course, this is obvious, given that the label property is attached to the concept, not to the view object. But, it means that the language management is a little clunky.

So, the question is: how can the label specialization be made such that it impacts a single view, and not all views for a concept?

Regards, Michael

michaelansley avatar Mar 02 '20 07:03 michaelansley

Hi Michael,

My apologies, I'm very busy at work at the moment and do not have much time to work on my plugins.

At the moment, the specialization plugin store its information into the properties section of the objects. This allows to save the information into the archimate file without changing the file structure, and thus keeping the compatibility with people that d not have my plugin installed.

Unfortunately, these properties are stored into the Archimate concepts and not into the graphical objects, which leads to impose the same behaviour across all the views.

Achi 4.6 introduces "features" next to the properties, the difference being that features are stored at the graphical objects layer. So the only thing I need now to do what you need (and what I need to), is to find time to develop it :)

Best regards Hervé

herve91 avatar Mar 03 '20 20:03 herve91

Hi Hervé,

I just wrote an Archi issue "The Replace Label feature of the specialization plugin stopped working for nodes after Archi 4.5.1; see "https://github.com/archimatetool/archi/issues/593 (I should of course have reported here in the first place). So it seems the replace label feature completeley stopped working from ver. 4.6 and on (except still works for relationships).

erikhag1 avatar Mar 15 '20 18:03 erikhag1

Hi Erik,

I daily use Archi 4.6 at work with my specialization plugin and if works fine with elements.

What I suggest is that you switch the plugin log mode to "trace", do some label replacement and then have a look in the generated log file. Should you have some exceptions, plesae do not hesitate to send them to me.

image

herve91 avatar Mar 15 '20 20:03 herve91

Thanks for the quick response, Herve. testing again now, I realize it works, however not for value stream concepts (which was introduced in 4,6).

erikhag1 avatar Mar 16 '20 01:03 erikhag1

yes, it's because the plugin has been released before Archi 4.6.

herve91 avatar Mar 16 '20 21:03 herve91