Book a Demo

Author Topic: Unable to hide "Satisfies" compartment of DiagramObject  (Read 8160 times)

JoostN

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Unable to hide "Satisfies" compartment of DiagramObject
« on: August 31, 2021, 09:58:34 pm »
Today I try to hide the "Satisfies" compartment that is shown automatically in the DiagramObject for an element that is connected to a Requirement.

In the GUI I can open the "Compartment visibility" dialog for the DiagramObject. The "Satisfies" checkbox is selected. I can unselect the checkbox and push OK, but it has no effect: the DiagramObject still shows the "Satisfies" relation, and when I reopen the "Compartment visibility" dialog, the checkbox is selected again.

Finally I would like to control the visibility of the compartment programmatically, but I did not find yet how to do it through API calls or database updates. If I would be able to change it manually in the GUI, then I would be able to detect modifications in the database, but unfortunately that is not possible at the moment.

Any idea?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Unable to hide "Satisfies" compartment of DiagramObject
« Reply #1 on: August 31, 2021, 10:16:29 pm »
Requirement of which profile?

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Unable to hide "Satisfies" compartment of DiagramObject
« Reply #2 on: August 31, 2021, 10:18:13 pm »
I think that might be controlled by a shapescript. I haven't seen this "satisfies" compartment yet, so it probably is a feature from some MDG stereotype you are using.

If the shapescript doesn't have an if/else for this compartment you won't be able to turn it off.

You can check the contents of the shapescripts here: https://github.com/GeertBellekens/Enterprise-Architect-Shapescript-Library

Geert

JoostN

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Unable to hide "Satisfies" compartment of DiagramObject
« Reply #3 on: August 31, 2021, 10:45:59 pm »
Requirement of which profile?
Stereotype of requirement is "SysML 1.5::requirement"

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Unable to hide "Satisfies" compartment of DiagramObject
« Reply #4 on: August 31, 2021, 11:35:28 pm »
Yes, then as Geert said: it's a shape script controlling that. You might tweak the MDG (Geert has some github repo with lots of scripts and maybe including SysML). But once you do that you will be detached. So it depends what the SysML spec says. If Sparx' implementation is wrong you need to send a bug report. Else you have to live with it.

q.

JoostN

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Unable to hide "Satisfies" compartment of DiagramObject
« Reply #5 on: September 01, 2021, 12:14:48 am »
A new concept for a newbie: shape scripts ;)
Thank you both for pointing me to this!

Another option I have (if I do not succeed with these shape scripts) is to kind of live with it, but then I need to find the size of the resulting DiagramObject for controlling the total layout. It seems though to me that the database (t_DiagramObjects) is not aware of what is drawn extra in the shape script. For example the height (difference between bottom and top) is as if there is no extra compartment.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Unable to hide "Satisfies" compartment of DiagramObject
« Reply #6 on: September 01, 2021, 08:54:45 am »
You wouldn't be happier with shape script. When you render text it does so by crossing the right boundary eventually (unless you place some extra space there) and there's no way to prevent it from flowing over the lower bounds. You "could" rectify this with a script but without having a TeX processor at hand you will have a hard time doing so. (From times when I coded for the Mac I know they do have classes for calculating text frames but I never would expect any such thing from Windoze and even less from EA. Well, it's cheap at least...)

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Unable to hide "Satisfies" compartment of DiagramObject
« Reply #7 on: September 02, 2021, 08:28:53 am »
There are two checkboxes - one in Diagram Properties > Elements; and one in Diagram Object > Compartment Visibility. Try unchecking both.
The Sparx Team
[email protected]