Header with Diagram view

Started by Werner, May 14, 2021, 20:20:07 PM

Previous topic - Next topic

Werner

I created a working jarchi script that retrieves/stores diagram metadata (name, version, create/update dates and author from/to the diagram properties (or asks for it in a dialog), and pastes a header with that data (note) on top of the diagram.

For new diagrams, I would like to also paste a direct reference to the start diagram (a capability model), that I created so that users can easily get to the diagram they look for.

My question is: how to do this in jarchi? While adding existing concepts to a view is no problem, I did not succeed in adding an existing diagram view.

projetnumero9

Hi Werner,
If I understood correctly your point, check: https://gist.github.com/projetnumero9/3301cfb99d8747c79a8bd6e0edcec32e

I wanted with this script to add a link (.createViewReference()) to a parent view(comment line 9, code line 37),
Not exactly your point but that's the spirit,

Best regards,


Werner

Quote from: projetnumero9 on May 14, 2021, 21:45:38 PM
Hi Werner,
If I understood correctly your point, check: https://gist.github.com/projetnumero9/3301cfb99d8747c79a8bd6e0edcec32e

I wanted with this script to add a link (.createViewReference()) to a parent view(comment line 9, code line 37),
Not exactly your point but that's the spirit,

Best regards,

Thank you very much, your help solved my problem:
var archimateView = selection.filter("archimate-diagram-model").first()
var currentConceptView = $(".Capability Model").filter("archimate-diagram-model").first() ;
var viewRef = archimateView.createViewReference(currentConceptView, 10, 10, 120, 90);


Your script as-is is also very helpful for me for creating layered diagrams!

Best Regards,
Werner