Archi Forum

Archi Plug-ins => jArchi => Topic started by: owol on January 15, 2024, 13:44:46 PM

Title: jArchi - set default values for .fontName, .fontSize, .fontStyle
Post by: owol on January 15, 2024, 13:44:46 PM
Hi,
with jArchi I can set .fontColor to the default by assigning the value null.
Is there a way to do so for
.fontName
.fontSize
.fontStyle
as well?

I can get the .iconColor default by assigning "" - wouldn't it be possible to generally get the default by assigning null?

Alternatively, is there a way to read the Archi preferences configuration using jArchi?

Kind regards, Olav
Title: Re: jArchi - set default values for .fontName, .fontSize, .fontStyle
Post by: Phil Beauvoir on January 15, 2024, 14:20:27 PM
Hi,

No, it's not possible to set those ones to a user default value by assigning null.

Setting "" for the iconColor is actually not setting it to the user default but rather the in-built default of black.

There's no public API to read the preferences configuration in jArchi (see https://github.com/archimatetool/archi-scripting-plugin/issues/40). There may be a way to do it using some native Java calls from JavaScript, I'm not sure if anybody's done that, I'll ask.

Phil
Title: Re: jArchi - set default values for .fontName, .fontSize, .fontStyle
Post by: Phil Beauvoir on January 15, 2024, 17:17:07 PM
I've added a wiki page to demonstrate how to access Archi's Preferences:

https://github.com/archimatetool/archi-scripting-plugin/wiki/Accessing-Archi's-Preferences
Title: Re: jArchi - set default values for .fontName, .fontSize, .fontStyle
Post by: owol on January 16, 2024, 17:30:37 PM
Thanks a lot.

Olav