archimatetool/archi-scripting-plugin

Scripting / setting labelExpression in script doesn't seem to work in version 4.9.0 Buoild 202110121300

Closed this issue · 4 comments

Version of jArchi, Operating System

Version 4.9.0 Build 202110121300, 64 bit Windows Installer edition

Running on

  • Edition: Windows 10 Pro
  • Version: 21H1
  • OS Build: 19043.1237
  • Experience: Windows Feature Experience Pack 120.2212.3530.0

Expected Behaviour

Script setting label expression is not working.

Actual Behaviour

Nothing being set

Steps to Reproduce the Behaviour (with attached test files/script)

  1. Run Script on a model
  2. Check Label Expression
var defaultFontSize = 10;
var defaultLabelExpression = "${name}";


// Iterate through all views and their child object
$("view").children().each(function(child) {
    setDefaultFormat(child);
});

// if font size == oldFontSize set it to newFontSize
function setDefaultFormat(child) {

    child.labelExpression = defaultLabelExpression ;
//    child.fontSize = defaultFontSize;
    // children of children
    $(child).children().each(function(c) {
        setDefaultFormat(c);
    });
}

Hi, your script is working for me. What version of jArchi are you using?

I am on my Patreon subscription and can’t find the link to download the plugins…

The latest post on Patreon has it. You might want to check your Patreon status in case of problems.