Skip to content
This repository has been archived by the owner on Aug 23, 2023. It is now read-only.

Setting specialization attributes using jArchi script #41

Open
michaelansley opened this issue Feb 19, 2020 · 6 comments
Open

Setting specialization attributes using jArchi script #41

michaelansley opened this issue Feb 19, 2020 · 6 comments

Comments

@michaelansley
Copy link

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
Copy link
Author

michaelansley commented Mar 2, 2020

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

@herve91
Copy link
Collaborator

herve91 commented Mar 3, 2020

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é

@erikhag1
Copy link

erikhag1 commented Mar 15, 2020

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 "archimatetool/archi#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).

@herve91
Copy link
Collaborator

herve91 commented Mar 15, 2020

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

@erikhag1
Copy link

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).

@herve91
Copy link
Collaborator

herve91 commented Mar 16, 2020

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants