Skip to content

Instantly share code, notes, and snippets.

@smileham
smileham / HeatMapByPropertyvalue.ajs
Last active January 19, 2026 14:10
jArchi script to create Heatmap (set Red, Amber or Green background to element) based on the value of a given property. #jarchi
/*
* Smart HeatMap (Numeric Gradient + Discrete)
* * Version: 8.1
* * "VIBE CODED" with Gemini - it was quick, did it better than I could in the time I had, and seems to work...
* * Changes:
* - Added Multi-selection dialog for Scope (Components vs Relationships).
* - Detects if a property is Numeric.
* - If Numeric: Allows Min/Max color selection and generates a Gradient Heatmap.
* - If Text (Discrete): Uses standard specific value coloring (limited to 10 unique values).
* - Generates stepped legends for Gradients.
/*
* This script attemps to import a draw.io (aka diagrams.net) diagram into an Archi model by
* empirically mapping the observable attributes of the XML elements exported from draw.io to Archimate
* elements and relationships. Please note that this mapping is fragile, because draw.io doesn't seem
* to generate the XML attributes in a very consistent way; also, we must unfortunately use element color
* as a key differentiator, to compensate for the lack of usable archimate information in the XML file.
* All of this means that minor changes in the draw.io XML format can break the mapping...
* Notes:
* -- To generate the draw.io file, export it as an *uncompressed* XML file.
* -- When running the script, make sure you have set the current model to import it in (e.g. by selecting a view in the model)
@FrancoisCoudeville
FrancoisCoudeville / Step by step script examples - v0.1.ajs
Created May 26, 2021 10:48
jArchi Step by step Tutorial Beginner Guide script example creating, updating, navigating, deleting objects, relationship #jArchi
/****************************************
* Step by Step JArchi script examples *
* v0.1 *
* Francois Coudeville *
* May 2021 #jArchi *
* #Beginner #Guide #Tutorial #Example *
****************************************/
//---------
// 1 Utils
@rchevallier
rchevallier / JFaceConfigDialog.ajs
Last active March 17, 2023 18:15
#jarchi Sample to demonstrate how to create a Configuration dialog box for a jArchi .ajs script
//@ts-check
/**
* Test of a dialog box in jarchi, SWT style
*/
/**
* @typedef {any} JavaClass
* @typedef {Object<string, function>} JavaObject
*/
@imjasonh
imjasonh / markdown.css
Last active September 3, 2025 22:12
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}