archimatetool / archi-scripting-plugin

jArchi - Scripting for Archi: ArchiMate Modelling Tool
https://www.archimatetool.com
122 stars 33 forks source link

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

Closed pauliev closed 2 years ago

pauliev commented 2 years ago

Version of jArchi, Operating System

Version 4.9.0 Build 202110121300, 64 bit Windows Installer edition

Running on

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);
    });
}
Phillipus commented 2 years ago

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

pauliev commented 2 years ago

That is probably the issue… didn’t update my plugins… when I upgraded… I am on my Patreon subscription and can’t find the link to download the plugins…

From: Phil Beauvoir @.> Sent: Friday, October 15, 2021 10:18 AM To: archimatetool/archi-scripting-plugin @.> Cc: PaulieV @.>; Author @.> Subject: Re: [archimatetool/archi-scripting-plugin] Scripting / setting labelExpression in script doesn't seem to work in version 4.9.0 Buoild 202110121300 (#98)

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/archimatetool/archi-scripting-plugin/issues/98#issuecomment-944294330 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZOFECQO2CT7NYWRBDTFWTUHAS2FANCNFSM5GB5X7OQ . https://github.com/notifications/beacon/AAZOFEFBKD47Q2URM2U5UATUHAS2FA5CNFSM5GB5X7O2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHBEMTOQ.gif

Phillipus commented 2 years ago

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.

pauliev commented 2 years ago

Sorry about that… found it… I don’t know how I missed that… it works fine now… forgot the plugin was installed separately.. Thanks for the speedy feedback.

From: Phil Beauvoir @.> Sent: Friday, October 15, 2021 11:01 AM To: archimatetool/archi-scripting-plugin @.> Cc: PaulieV @.>; Author @.> Subject: Re: [archimatetool/archi-scripting-plugin] Scripting / setting labelExpression in script doesn't seem to work in version 4.9.0 Buoild 202110121300 (#98)

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.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/archimatetool/archi-scripting-plugin/issues/98#issuecomment-944326022 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZOFEEBE7CVEFIIWGITBMLUHAX2JANCNFSM5GB5X7OQ . https://github.com/notifications/beacon/AAZOFEBCXORP4DSAGA566LLUHAX2JA5CNFSM5GB5X7O2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHBEULBQ.gif