Book a Demo

Author Topic: Hiding Diagram Objects on a diagram  (Read 11643 times)

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Hiding Diagram Objects on a diagram
« Reply #15 on: November 07, 2019, 09:56:59 am »
The properties I am talking about belong to Element Stereotypes (please see the bottom of the page below).
These are properties that can have different values on different diagrams for the SAME element.

Therefore, I am assuming that they belong somewhere to the DiagramObject class but can't find where to access them.


They are in t_diagram.StyleEx, look for "OPTIONS_"
The Sparx Team
[email protected]

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Hiding Diagram Objects on a diagram
« Reply #16 on: November 07, 2019, 10:07:48 am »
Hey KP

I'm assuming I access this via the Diagram.StyleEx property?
If so, I did that and couldn't find anything.

Given that the properties I am talking about seem to be attached to the Diagram Objects (and not the Diagram itself), would it make sense for them to be in the diagram database table?

Cheers :-)

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Hiding Diagram Objects on a diagram
« Reply #17 on: November 07, 2019, 10:30:23 am »
I'm assuming I access this via the Diagram.StyleEx property?
If so, I did that and couldn't find anything.
It looks like they are only saved in that field when they are different to the default.

I checked this the following way: Start with an empty model, Perspective->Construction->Project Management, new diagram, put two "Sprint" elements on diagram, select one of them and right-click->Show as Requirement.

The Sparx Team
[email protected]

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Hiding Diagram Objects on a diagram
« Reply #18 on: November 07, 2019, 01:18:35 pm »
Hey KP

But I am trying to access properties attached to specific diagram objects and NOT the diagram itself, so shouldn't the data be somewhere in the t_diagramobject table???

I am really confused! :-(

Jays :-)

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Hiding Diagram Objects on a diagram
« Reply #19 on: November 07, 2019, 01:56:13 pm »
Each diagram object has a DUID (like a GUID but only 8 characters; stored in the t_diagramobjects.ObjectStyle field) and that DUID is referenced in the t_diagram.StyleEx field. e.g. "OPTIONS_3FA0FE61=DrawAsRequirement=0;"


But I am trying to access properties attached to specific diagram objects and NOT the diagram itself, so shouldn't the data be somewhere in the t_diagramobject table???
I'm sorry, I have no insight into why it was done this way.
The Sparx Team
[email protected]

Jayson

  • EA User
  • **
  • Posts: 363
  • Karma: +1/-0
    • View Profile
Re: Hiding Diagram Objects on a diagram
« Reply #20 on: November 08, 2019, 04:58:36 am »
Thanks so much KP! :-)

Now that I know where the flags are stored, its pretty easy to hack the fields to get the outcome I am after.
Honestly I don't think I would have ever found the flags on my own, they are NOT in a remotely intuitive place are they?

Cheers

Jays :-)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13521
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Hiding Diagram Objects on a diagram
« Reply #21 on: November 08, 2019, 05:32:10 am »
The "trick" to finding stuff like that is to use a profiler (such as on SQL Server) that captures all SQL statements issued to the database.

Start the profiler, change whatever you are interested in, stop the profiler, and examine the SQL update/insert/delete statements

Geert