Skip to content

Instantly share code, notes, and snippets.

@romualdrichard
romualdrichard / gist:22727a87cbec472354a691d5ed60933b
Last active April 19, 2024 08:40
#jarchi script which is copying all the aspect of an element in a view and apply them in all the views for elements representing the same concept.
// This script copy appearance of the selected object to all the views of the model for this object.
// Function to copy properties from source to target visual object
function copyVisualObjectProperties(source, target) {
target.borderType = source.borderType;
target.deriveLineColor = source.deriveLineColor;
target.figureType = source.figureType;
target.fillColor = source.fillColor;
target.fontColor = source.fontColor;
target.fontName = source.fontName;
@romualdrichard
romualdrichard / MAJ Date.ajs
Last active February 16, 2024 10:41
#jArchi Script to read .gitconfig to have username and put it in property of the current view, and also add the update date in property of the view
//Script to put date of the day in the property "Date de mise à jour"
// and also the user name of the git in property Auteur
// Lit le fichier .gitconfig de l'utilisateur pour retrouver le nom
var System = Java.type('java.lang.System');
var currentDate = currentDate || new Date();
const Files = Java.type('java.nio.file.Files');