Book a Demo

Author Topic: How to change feature visibility programatically?  (Read 4650 times)

Colin Richardson

  • EA User
  • **
  • Posts: 52
  • Karma: +0/-0
    • View Profile
How to change feature visibility programatically?
« on: May 13, 2010, 03:28:42 pm »
Hi All,

I'm looking to hide certain attributes via an add-in.

Normally I try the automation interface, then profile the database to work out how to do it directly via SQL, but this time, no luck.

Any ideas?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to change feature visibility programatical
« Reply #1 on: May 14, 2010, 12:46:00 am »
create a new project with one class and two attributes.
Hide one attribute.
Then open the database and open each table that seems relevant to figure it out.

Geert

PS. sometimes in the database they use the first part of the ea_guid in style-like columns to indicate a certain feature.

Colin Richardson

  • EA User
  • **
  • Posts: 52
  • Karma: +0/-0
    • View Profile
Re: How to change feature visibility programatical
« Reply #2 on: May 14, 2010, 12:56:25 pm »
Great ideas - still no luck though.  Even tried building dynamic SQL to look for matching IDs, GUIDs, parts of GUIDS.

Any other ideas?

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: How to change feature visibility programatical
« Reply #3 on: May 14, 2010, 01:42:46 pm »
The fields that change are t_diagramobjects.ObjectStyle and t_diagram.StyleEx (look for a property named SPL), but I can't help you any further because I have no idea what it all means...
« Last Edit: May 14, 2010, 01:44:55 pm by KP »
The Sparx Team
[email protected]

Colin Richardson

  • EA User
  • **
  • Posts: 52
  • Karma: +0/-0
    • View Profile
Re: How to change feature visibility programatical
« Reply #4 on: May 14, 2010, 01:58:10 pm »
Legend!

Yes, SPL is the key - it's a list of the most 3 significant bytes of the GUID (6 characters) for each attribute.

Don't know how I missed the change  :P

Thanks again - thought I was going nuts :-)

TGIF

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: How to change feature visibility programatical
« Reply #5 on: May 14, 2010, 05:38:49 pm »
Quote
[size=18]...[/size]
Thanks again - thought I was going nuts :-)
Keep working with EA and you will...

After 6 years, I'm sure there's nothing wrong with me...  wrong with me...  wrong with me...

But since you're interested in rendering in EA, check out: Consistent Diagram Item rendering proposal and lend your support...

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!