element specialization export

Started by wiebow, February 03, 2023, 21:00:54 PM

Previous topic - Next topic

wiebow

Hi there,

I am trying to export to an excel sheet my elements and also their specialization (by modifying the sample export script):

// Loop through all elements and set cells to elememt info
$("element").each(function(e) {
    excel.set(0, 0, current_row, e.name);
    excel.set(0, 1, current_row, e.documentation);
    excel.set(0, 2, current_row, e.type);
    excel.set(0, 3, current_row, e.specialization);

I added that last line to the script, but it does not what I expect: I keep getting "undefined" in my excel sheet. Now, according to the jArchi docs, specialization should work on all objects in a model. Am I missing something?

[edit: I should note that the elements DO HAVE a specialisation set]

Any ideas?

Phil Beauvoir

If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

wiebow

Not really what I was looking for.  I can filter out the undefined later on.

My issue is that elements that DO HAVE a specialization set, do not get the specialization name added in the column #3, but "undefined". As specialization is an optional thing in the element properties window, it's like it is not recognized as being set... I don't get it, the docs state that this SHOULD work.

Phil Beauvoir

I tested it and it's working here. I set a Specialization in the Properties tab and changed the same line as you did.
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

wiebow

#4
Could there be an issue with Archi versions? I made a diagram in Archi 5 beta 3, and moved this to Archi 4?

I'll start something from scratch and retry it!

result: does not fix it for me. I'm stumped

wiebow

What I did in a new model is add an element (in this case a location) and added a specialization for it (datacenter) and then set the specialization requester in the element properties to it.

Then I ran the script. Should work, right?

wiebow

Of course, it was a version issue with the jArchi plugin! I had the most recent installed but of course in the beta, and not on the 4.xx version of Archi. Tip: never code late in the evening. Thanks for the assistance, Phil!