archimatetool / archi-scripting-plugin

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

deriveLineColor and lineColor does not work for an element #134

Closed Sonique closed 2 weeks ago

Sonique commented 2 weeks ago

Version of jArchi, Operating System

5.3.0 mac silicon

Expected Behaviour

Script will change line color and line weight

Actual Behaviour

Script works and change other element properties, but line color and width are unchanged

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

  1. create single element
  2. run script with line color change
  3. it doesn't works

var elements = $(selection)
$(elements).each(function (element) {
    console.log("Setup appearance");
    // Fill color
    element.fillColor = "#D6E8D5" // New element
    // Line color
    element.deriveLineColor = false;
    element.lineColor = "#F00000"; // Modified element
    element.lineWidth = 3;
}
....
``
`
Phillipus commented 2 weeks ago

Hi, I tested the followings script after selecting some elements in a View and it is working OK:

$(selection).each(function (element) {
    element.fillColor = "#D6E8D5"
    element.deriveLineColor = false;
    element.lineColor = "#F00000";
    element.lineWidth = 3;
})

Don't forget to select the element in the View first.

Phillipus commented 2 weeks ago

Which version of jArchi are you using?

Sonique commented 2 weeks ago

jarchi 1.5.0.202310011312

it's strange, but on my side script doesn't work for line color. I tested on new project, same thing. Yes, I did select element. Color changed, but element border color doesn't

Phillipus commented 2 weeks ago

jarchi 1.5.0.202310011312

These features were added in jArchi 1.6. Please see https://github.com/archimatetool/archi-scripting-plugin/wiki/Change-Log

Sonique commented 2 weeks ago

Oh, well. Looks like I missed it on patreon. Will download new version. Thanks