Book a Demo

Author Topic: Displaying "properties" compartment in non-SysML diagram  (Read 4772 times)

PeteC

  • EA User
  • **
  • Posts: 91
  • Karma: +1/-0
    • View Profile
Displaying "properties" compartment in non-SysML diagram
« on: November 18, 2020, 10:42:53 pm »
If I create a SysML Block diagram, add some blocks and then create a SysML Internal Block Diagram, drag one of my blocks on as a Property and then drag subsequent blocks on top of the first Property they become child parts of the block onto which they are dragged. When I go back to my Block diagram there is a new "properties" compartment in the block listing the child parts. All good. If I right-click on the diagram and open the Properties - Elements section then under Show Compartments there is a check-box against Properties allowing me to choose whether or not to show the compartment.

If I create my own MDG to customise the Block and Internal Block diagrams and repeat the exercise then the "properties" compartment does not appear and is not even listed under the diagram Properties as an option (even though I have child parts of the Block).

I've some across things that work in a special way only for the SysML MDG before and can't be replicated in a custom MDG. Is this one of those, or have I missed something that would enable me to display the child properties in a compartment?

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Displaying "properties" compartment in non-SysML diagram
« Reply #1 on: November 18, 2020, 11:38:17 pm »
If I create a SysML Block diagram, add some blocks and then create a SysML Internal Block Diagram, drag one of my blocks on as a Property and then drag subsequent blocks on top of the first Property they become child parts of the block onto which they are dragged. When I go back to my Block diagram there is a new "properties" compartment in the block listing the child parts. All good. If I right-click on the diagram and open the Properties - Elements section then under Show Compartments there is a check-box against Properties allowing me to choose whether or not to show the compartment.

If I create my own MDG to customise the Block and Internal Block diagrams and repeat the exercise then the "properties" compartment does not appear and is not even listed under the diagram Properties as an option (even though I have child parts of the Block).

I've come across things that work in a special way only for the SysML MDG before and can't be replicated in a custom MDG. Is this one of those, or have I missed something that would enable me to display the child properties in a compartment?
Hi Pete,
We've come across similar issues with the DB reverse engineering stuff.  We tried extending the EAUML::<component> to our own MDG, but found that didn't work (like you).  This was because the DB stuff is hardcoded and looks for the specific names.  So what we did was to add the base stereotype to our own stereotype so there were two stereotypes.

Try disconnecting your stereotype from the SysML one and add it after the event.

You may search for some recent posts (last couple of weeks) by me on the topic.

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

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Displaying "properties" compartment in non-SysML diagram
« Reply #2 on: November 19, 2020, 07:40:59 am »
If I create my own MDG to customise the Block and Internal Block diagrams

How have you done this? The only way to extend SysML diagrams and keep the SysML functionality is using view specifications.
The Sparx Team
[email protected]

PeteC

  • EA User
  • **
  • Posts: 91
  • Karma: +1/-0
    • View Profile
Re: Displaying "properties" compartment in non-SysML diagram
« Reply #3 on: November 24, 2020, 09:51:38 pm »
I have generalised my own block from the SysML1.4::Block to create myself blocks with customised stereotypes (for example a <<software block>> and a <<hardware block>>). I have also tried extending the metaclass "Class" as that should be how the SysML Block is defined.

I have then defined my own diagram using a toolbox that includes my newly defined block stereotypes. Similarly I have created my own internal block diagram.

That all works and I can use my blocks to create a diagram, use those blocks to create property elements on the IBD. The only thing it doesn't do is pickup on the block diagrams that Properties should be available in the list of compartments.