Book a Demo

Author Topic: Controllng the font  (Read 7028 times)

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Controllng the font
« on: June 29, 2010, 08:28:55 pm »
Hello everyone

Is there a way of setting the font size for an element added by my addin?

TIA

Graham
Using V12

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Controllng the font
« Reply #1 on: June 29, 2010, 10:08:21 pm »
Look into the style-something fields/columns.
They have some sort of character separated key=value pair format.

Geert

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Re: Controllng the font
« Reply #2 on: June 29, 2010, 10:11:18 pm »
I'll take a look
Using V12

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Re: Controllng the font
« Reply #3 on: June 29, 2010, 10:50:21 pm »
Hi again
I belive I need to change the ObjectStyle column in the t_diagramobjects table
This has this format
Code: [Select]
DUID=6C6E0B46;font=Arial;fontsz=120;bold=0;italic=0;ul=0;charset=0;pitch=34;

Does anyone know what the DUID is
Graham
Using V12

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Controllng the font
« Reply #4 on: June 29, 2010, 11:09:42 pm »
I think that is the first part of a GUID.

Geert

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Re: Controllng the font
« Reply #5 on: June 29, 2010, 11:15:58 pm »
Hi Geert
So if I add an element to a diagram how do I generate the DUID?

Graham
Using V12

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Controllng the font
« Reply #6 on: June 29, 2010, 11:28:08 pm »
take a substring of a GUID.ToString()?

Geert

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Re: Controllng the font
« Reply #7 on: June 29, 2010, 11:38:56 pm »
Hi Geeert
The value of DUID does not form part of the guid??
Graham
Using V12

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Controllng the font
« Reply #8 on: June 29, 2010, 11:47:14 pm »
I don't know for sure, but I think it is the first part of "some" real GUID.
I'm even less sure its the first part of the elements GUID. :-/

Geert

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Re: Controllng the font
« Reply #9 on: June 29, 2010, 11:49:17 pm »
Ok Geert
I'll try asking Sparx
Graham
Using V12

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Re: Controllng the font
« Reply #10 on: June 30, 2010, 05:49:05 pm »
Hi
Ok it seems that the value applied the EA.DiagramObject.Style does NOT have to be in the format in the help file.
i.e. to set the font I can use the string
Code: [Select]
font=Arial;fontsz=90;bold=0;italic=0;ul=0;charset=0;pitch=34

However this does bot generate a value for DUID in the database which you do get if you adjust the font manually

Does anyone know whether this is important

Graham
Using V12

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Controllng the font
« Reply #11 on: June 30, 2010, 06:12:31 pm »
Graham,

You can verify if this duid value is used somewhere else by exporting the whole model to xmi and then do a text search.

Geert

SomersetGraham

  • EA User
  • **
  • Posts: 376
  • Karma: +1/-0
    • View Profile
Re: Controllng the font
« Reply #12 on: June 30, 2010, 06:53:31 pm »
Thanks Geert
Using V12