Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Guillaume ALLEE on February 18, 2012, 02:06:55 am
-
Hi all,
In order to make my diagram look nicer, I want to have a specific font for all the elements that have the same stereotype. I know it is not possible by customizing the stereotype.
So the only option I have is to select in my diagram all the element that have the same stereotype manually and to set the font.
I would like to know if it is possible to automatize this function using a script ? If yes, do you have any pointers ?
-
You can do that (most likely). Look at t_object.styleex. This has the font of the element stored. This font is per model and appears in each diagram. Just iterate through
SELECT object_id, styleex FROM t_object WHERE stereotype = 'your stereo'
and replace styleex accordingly.
q.
-
Hi,
I tried to do that with Jscript. The stylex attributes exists but within this object is do not see any font attributes.
Could you confirm that I can do that with JScript ? If yes, could you be more specific ?
Or should I try by opening the eap or ldb file with Access ?
Thanks
-
I had no problem setting styleex. First setting it to
font=Comic Sans MS;fontsz=80;bold=1;italic=0;ul=0;charset=1;pitch=0;
made the element appear in the Comic Sans font. Setting it back to a null-string restored the default appearance.
q.