Book a Demo

Author Topic: Hiding Out of Scope attributes on a diagram  (Read 14864 times)

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Hiding Out of Scope attributes on a diagram
« on: October 18, 2024, 04:21:01 am »
Is there an easy way to hide Out of Scope attributes or attributes that will de delivered in a subsequent phase for elements in a class or component diagram?

Takeshi K

  • EA User
  • **
  • Posts: 632
  • Karma: +43/-1
    • View Profile
    • Sparx Systems Japan
Re: Hiding Out of Scope attributes on a diagram
« Reply #1 on: October 18, 2024, 10:24:20 am »
I do not know if the followings are 'easy', but there are two features to hide attributes:

- element scope: press the custom button in the Compartment Visibility dialog of an element, then specify attributes one by one
- diagram scope: add attribute names to the Supress Compartment Items textboxes in the Features group, the diagram properties dialog

HTH,
--
t-kouno

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: Hiding Out of Scope attributes on a diagram
« Reply #2 on: October 23, 2024, 02:01:23 am »
Thank you Takeshi, it may actually work. Can it be scripted?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Hiding Out of Scope attributes on a diagram
« Reply #3 on: October 23, 2024, 02:13:42 am »
Can it be scripted?
It can, but it's quite messy. IIRC this info is stored in the Stylex column of t_diagram.

There is a list of partial guids of the attributes you want to hide or show. (very funny mechanism if you inherit a model where someone imported attributes with not so random guids that all start with the same characters)

Geert

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: Hiding Out of Scope attributes on a diagram
« Reply #4 on: November 14, 2024, 05:21:54 am »
Thank you Takeshi and Geert, this does exactly what we are after but without being able to this programatically or using smarter functionality it is not very practical.

Smarter functionality could be hiding attributes based on a given status.

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: Hiding Out of Scope attributes on a diagram
« Reply #5 on: November 14, 2024, 09:02:21 pm »
Just quick update, the exclusion is saved on the StyleEx field, as Geert mentioned, by it done by name not by GUID; it looks something like:

Code: [Select]
SUPATT=DOCTOR_SURNAME  DOCTOR_INITIALS  DOCTOR_TEL_NO  DOCTOR_ADDRESS_REF  OALL_QUAL_STD  OALL_QUAL_NOTE_REF  Expected Pay Method;
The list delimiter seems to be either CR of LR, or something else.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Hiding Out of Scope attributes on a diagram
« Reply #6 on: November 14, 2024, 09:43:13 pm »
Just quick update, the exclusion is saved on the StyleEx field, as Geert mentioned, by it done by name not by GUID; it looks something like:

Code: [Select]
SUPATT=DOCTOR_SURNAME  DOCTOR_INITIALS  DOCTOR_TEL_NO  DOCTOR_ADDRESS_REF  OALL_QUAL_STD  OALL_QUAL_NOTE_REF  Expected Pay Method;
The list delimiter seems to be either CR of LR, or something else.
Hmm, that is weird. On my installation (v16.1.1628 32 bit on Azure SQL repository)  I have the following in my diagrams StyleEx field:
SPL=S_A7F4C4=2F6131,C08AA2:;
There is no SUPATT at all.
2F6131 and C08AA2 are the first characters of the guids of my hidden attributes.

I'm not sure if it depends on the version, or the repository type, but apparently there are different ways this is being handled by EA.

Geert


Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: Hiding Out of Scope attributes on a diagram
« Reply #7 on: November 14, 2024, 10:57:08 pm »
We are running the same version of EA but 64-bit on a SQL Server 2016 repository running on Azure VM

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Hiding Out of Scope attributes on a diagram
« Reply #8 on: November 14, 2024, 11:44:49 pm »
We are running the same version of EA but 64-bit on a SQL Server 2016 repository running on Azure VM
Even weirder.

I'm hiding my attributes by right clicking on the class on the diagram, and choosing Compartment Visibility
then I click on the button Custom in the Attribute Visibility section and checking the checkboxes next to the attributes I want to hide. (the dropdown on the top left show Hide)

Can you confirm that you are doing exactly the same thing?

Geert

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: Hiding Out of Scope attributes on a diagram
« Reply #9 on: November 15, 2024, 12:44:59 am »
We are not doing the same thing, I am using the diagram scope method instead of the element scope method, terminology thanks to Takeshi, because my understanding is that if I don't the changes. This is because my understanding, perhaps incorrect, is that the element scope method applies to every single diagram that is using that element, but I could be wrong.

Element scope  method
Right click on the class on the diagram, choose Compartment Visibility, click on the button Custom in the Attribute Visibility section and check the checkboxes next to the attributes I want to hide.

Diagram scope  method
Right click on the diagram, choose Features, and type of cut and past a list of attributes to hide.


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Hiding Out of Scope attributes on a diagram
« Reply #10 on: November 15, 2024, 01:32:51 am »
We are not doing the same thing, I am using the diagram scope method instead of the element scope method, terminology thanks to Takeshi, because my understanding is that if I don't the changes. This is because my understanding, perhaps incorrect, is that the element scope method applies to every single diagram that is using that element, but I could be wrong.

Element scope  method
Right click on the class on the diagram, choose Compartment Visibility, click on the button Custom in the Attribute Visibility section and check the checkboxes next to the attributes I want to hide.

Diagram scope  method
Right click on the diagram, choose Features, and type of cut and past a list of attributes to hide.

Ah, I understand. In fact the element scope method is also limited to this particular diagram.
I've never actually used the diagram scope option before. It could be very useful for hiding things like technical columns in tables (created_by, created_date, valid_from,....) because then you want to hide them from all tables on the diagram, so name based would be the best approach.

If you want to hide certain particular attributes I guess the element scope method works best (and keeps working even if you rename the attribute)

Geert

Modesto Vega

  • EA Practitioner
  • ***
  • Posts: 1183
  • Karma: +30/-8
    • View Profile
Re: Hiding Out of Scope attributes on a diagram
« Reply #11 on: November 15, 2024, 05:08:25 am »
Indeed, just compared both methods without reading your reply and found out that both yield the same visual result.

Another useful application of this method is to create diagrams which are specialised views of a full model.