Skip to content

Instantly share code, notes, and snippets.

@rich-biker
rich-biker / documentation.ajs
Last active August 11, 2022 13:13
Generate Markdown documentation from a driving view in Archi using jArchi scripting.
/*
Sourced: https://gist.github.com/rich-biker/9a3c86c5a576ce0d8639856f3ee81651
Script: Documentation Generation
Purpose: To generate output based on a driving view
Author: Richard Heward - Tame Blue Lion Ltd
This generates a markdown file with the embedded images and text based upon a driving view in Archi of groups that trigger each other and embedded views.
See my blog for a more detailed explaination. https://www.tamebluelion.co.uk/blog/archi-documentation
@davengeo
davengeo / heatmap.ajs
Last active August 2, 2020 19:14
#jarchi heatmap for custom boolean property
var getDiagramComponents = function(v, e) {
return $(v).find("concept").filter(function(o) {
return o.concept.id == e.id;
});
}
gap = $("element").filter(function(obj) {
return obj.prop("GAP") == "true" ? true : false;
});
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
Script Name: Quality Check - UX Relations
Script Description:
A jArchi script for use on Archi tool models.
Using a specific view called ConceptDefinition to represent a cut down version of the full ArchiMate model,
check all the model relationships to flag up any unexpected ones.
@startuml Archi Usage
!include archi-seq.puml
title Archi Print Usage
' Define Elements
$businessActor("Architect","architect")
$applicationComponent("Archi","archi")
$applicationFunction("Update\nModel","update")
$applicationFunction("Print\nView","print")
$systemSoftware("Windows\nPrint\nService","windowsPrint")
@jbsarrodie
jbsarrodie / RemoveBentpoints.ajs
Created September 14, 2018 18:57
#jArchi script to remove bendpoints on selected relationships
// RemoveBentpoints
//
// Requires jArchi - https://www.archimatetool.com/blog/2018/07/02/jarchi/
//
// This script takes a selection of visual objects as input, filter it to keep only relationships and remove all their bendpoints
//
// (c) 2018 Jean-Baptiste Sarrodie
$(selection).filter("relationship").filter(function(o) {return o.view}).each(function(o) {
var view = o.view;
@smileham
smileham / Export to Markdown.ajs
Last active July 2, 2024 13:43
Export an ArchiMate diagram to Markdown format. #jarchi
/*
* Export View to Markdown
*
* Requires jArchi - https://www.archimatetool.com/blog/2018/07/02/jarchi/
*
* Markdown - https://www.markdownguide.org/
*
* Version 2: Updated to support Diagram Groups
* Version 2.1: Add check for Selected View
* Version 2.2: Change to regex, added date of export
@rich-biker
rich-biker / Load_CSV_To_NEO4J.cql
Created January 22, 2018 18:44
Cypher query to load data from the three Archi tool CSV extracts to create properly labeled nodes and relationships into a blank NEO4J database. Needs APOC plugin.
// Load the Archi CSV export elements as labeled nodes
using periodic commit
load csv with headers from "file:/elements.csv" as e
call apoc.create.node([e.Type], {name: e.Name, doc: e.Documentation, uid: e.ID})
yield node
return count(*);
// Create the uid indexes for my main objects
create index on :ApplicationComponent(uid);
create index on :ApplicationFunction(uid);