Skip to content
Phil Beauvoir edited this page Jul 20, 2018 · 11 revisions

Some script snippets assume that you run them on Archisurance.archimate. In this documentation, "object" is used for any type of information (ArchiMate concept or view, but also Canvas, Folders...).

The following functions work on the $.model global variable.

Table of contents


.create()

Create a new model:

var newModel = $.model.create("Test Model");
newModel.setAsCurrent(); // Set it to be the current model ("model")

.load()

Load a model from file:

var myModel = $.model.load("/path/test.archimate");
myModel.setAsCurrent(); // Set it to be the current model ("model")
model.openInUI(); // Open it in the UI (Models Tree)

.renderViewAsBase64()

Get the image data encoded as Base64 from a View.

view.
var bytes = $.model.renderViewAsBase64(view, "PNG");