This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Export View as image (PNG) with date and diagram name in filename. | |
// Get the first view in the model | |
//var view = $("view").first(); | |
var view = selection.filter("archimate-diagram-model").first(); | |
// Get the Base64 bytes of the view in PNG format. Can use "PNG", "BMP", "JPG" or "GIF" | |
// Options are scale (1 - 4) and margin (pixel value) | |
var bytes = $.model.renderViewAsBase64(view, "JPG", {scale: 1, margin: 20}); | |
var date = new Date(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Script to add a note to a view with name of the view, date and your name | |
//Thank you to J-B Sarrodie | |
// Get the first view in the current selection | |
var view = selection.filter("archimate-diagram-model").first(); | |
// Get current date | |
var currentDate = new Date(); | |
// Create a new note and set its text |