Skip to content

Instantly share code, notes, and snippets.

@ThomasRohde
ThomasRohde / Browser integration.ajs
Last active July 23, 2023 10:41
Proof-of-concept for bi-directional integration of a browser editor/window #JArchi #Archimatetool #Archi
// *** WARNING ***
// On the surface, this seems to work OK, but it does not work with the Archi undo/redo mechanism,
// and there is a risk of corrupting the model Also, changes might disappear if you run another script while the browser is open
/*
Author: Thomas Klok Rohde
Description:
Proof-of-concept for interacting with a browser. Enter a regular expression in the search bar,
and edit any of listed documentation fields. Press 'Refresh' to update the model.
History:
@ThomasRohde
ThomasRohde / Explore model.ajs
Last active April 25, 2024 14:14
Visually explore the entire model #JArchi #Archimatetool #Archi
/*
Author: Thomas Klok Rohde
Description:
Explore the entire model
Dependencies:
- Vis Network: https://github.com/visjs/vis-network.
- Bootstrap CSS
- A modern webbrowser with support for the DIALOG element
History:
November 27, 2022 : Created
@ThomasRohde
ThomasRohde / Attach or clear labels.ajs
Last active November 17, 2022 11:28
Attach a property label to view objects #Archi, #JArchi, #Archimatetool
/*
Author: Thomas Klok Rohde
Description:
Insert labels on the current view, or delete labels if no property is selected
If a view is selected all elements will be labeled, or if an element is selected,
all view elements with the same type will be labelled.
Dependencies:
Thanks to Adam Ernst Bisek: https://github.com/adambisek/string-pixel-width
History:
November 16, 2022 : Created
@ThomasRohde
ThomasRohde / Edit documentation.ajs
Created November 12, 2022 07:08
Forms in Archi - with examples. #Jarchi, #Archi, #ArchiMate
/*
Author: Thomas Klok Rohde
Description: Edit documentation markdown
History:
November 12, 2022: Created.
*/
console.show();
console.clear();
@ThomasRohde
ThomasRohde / Insert chart.ajs
Last active July 23, 2023 10:41
Form library for #Archi, #JArchi, #Archimatetool
/*
Author: Thomas Klok Rohde, Danske Bank A/S
Description: Example usage of show_form.js - Insert chart JSON into property field.
Dependencies: https://github.com/jsonform/jsonform
History:
October 11, 2022 : Created with base set of scripts
*/
console.show();
console.clear();
/*
Author: Thomas Klok Rohde
Description: Selection sensitive menu system for curated scripts
History:
October 2, 2022 : Created with base set of scripts
*/
console.show();
console.clear();
@ThomasRohde
ThomasRohde / Edit properties.ajs
Last active July 12, 2023 14:23
Bulk property editor for #Archi #JArchi #ArchiMateTool
/*
Author: Thomas Klok Rohde
Description: Edit properties of selected elements in a spreadsheet
History:
October 22, 2022 : Created
*/
console.show();
console.clear();
@ThomasRohde
ThomasRohde / Insert chart.ajs
Created October 30, 2022 12:47
Charting framework for Archi #Archi #JArchi #ArchiMateTool
/*
Author: Thomas Klok Rohde
Description: Insert chart to view
History:
October 11, 2022 : Created with base set of scripts
*/
console.show();
console.clear();
@ThomasRohde
ThomasRohde / Layout view.ajs
Last active July 27, 2023 06:53
Layout ArchiMate views using ELK (Eclipse Layout Kernel). #jArchi #Archi #ArchiMate
/*
Author: Thomas Klok Rohde
Description: Layout ArchiMate views using ELK (Eclipse Layout Kernel) compiled to JavaScript. The current implementation does not consider edges with edges (sections).
WARNING: This has only been tested on Windows 10 with Edge (WebView2)
History:
October 11, 2022 : Created with base set of scripts
*/
console.show();
console.clear();
@ThomasRohde
ThomasRohde / Browser experiment.ajs
Last active July 23, 2023 10:41
Proof-of-concept of how to use a Browser to collect form data in #Archi / #JArchi
/*
Author: Thomas Klok Rohde
Description: Proof-of-concept of how to use a Browser to collect form data.
*/
console.show();
console.clear();
const SWT = Java.type('org.eclipse.swt.SWT');
const FillLayout = Java.type('org.eclipse.swt.layout.FillLayout');