Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Guillaume ALLEE on February 18, 2012, 02:06:55 am

Title: Select all the element with the same stereotype ?
Post 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 ?
Title: Re: Select all the element with the same stereotyp
Post by: qwerty on February 18, 2012, 08:04:12 am
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.
Title: Re: Select all the element with the same stereotyp
Post by: Guillaume ALLEE on May 15, 2012, 02:17:24 am
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
Title: Re: Select all the element with the same stereotyp
Post by: qwerty on May 15, 2012, 03:08:56 am
I had no problem setting styleex. First setting it to
Code: [Select]
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.