Author Topic: How do I get the Values compartment to be visible on a SysML Block element?  (Read 1345 times)

peterc

  • EA User
  • **
  • Posts: 45
  • Karma: +4/-0
    • View Profile
According to http://www.sparxsystems.com/resources/user-guides/model-domains/sysml-models.pdf page 21, Block elements can display any number of compartments. A ValueType element should appear in a "values" compartment.

I have turned on everything I can find under the Diagram Properties and the element's Features & Properties dialogues but cannot get ValueTypes to appear in a "values" compartment. I can get the ports compartment to display (if I delete the port from the diagram after creation). I can create a new Port by right-clicking on the element and selecting New Child Element. Similarly flow properties that are created as a child and deleted from the diagram show in a "flow properties" compartment.

I can't create a ValueType as a child element from that menu, but having created a Value Type I have moved it manually to make it a child of my Block element, but even then it doesn't appear in a compartment. There might be a clue in not being able to create a ValueType from the right-click menu, but that then also contradicts the SysML Models Guide.

I am using SysML 1.4, but have tried 1.3 as well and that is no different.

Guillaume

  • EA User
  • **
  • Posts: 654
  • Karma: +19/-0
    • View Profile
    • www.umlchannel.com
Hi Peter,

Values are set in the block's "attributes" (F9 ket shortcut) and can be associated e.g. with a primitive or value type.
Value types hence need to be defined separately and picked up as a type for a value of your block.

Once you've done that, the value will show up in the compartment

Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Simon M

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6453
  • Karma: +55/-6
    • View Profile
The "values" compartment corresponds to Properties/Parts that are typed by a ValueType.

There is a bit of a trick to getting it displayed. The block won't show the compartment while the property is already on the diagram. If you create the properties on the block diagram, remove them when you want to see the compartment.
Simon

support@sparxsystems.com

peterc

  • EA User
  • **
  • Posts: 45
  • Karma: +4/-0
    • View Profile
So, I have added Value Type elements to the diagram and they are in the Project Browser, but when I delete them off the diagram they do not appear in a "values" compartment. I do have "ports" and "parts" compartments (and they correctly follow the behaviour that if the element is on the diagram then it is not listed in the compartment; as soon as I delete them from the diagram then they appear in the compartment).

I think I am doing something wrong in dropping the ValueType element onto the Block - the parts and ports are constrained in the diagram to be within the boundary of the Block. The ValueType elements can be dragged anywhere on the diagram. Where they are on the diagram determines where they are in the Project Browser (they become a sub-element of the Block when dropped on top of it).

Simon M

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6453
  • Karma: +55/-6
    • View Profile
Do you have child value types, or child properties that are typed by a value type? It should be the latter.
Simon

support@sparxsystems.com

peterc

  • EA User
  • **
  • Posts: 45
  • Karma: +4/-0
    • View Profile
I was dropping ValueType elements, so I have changed and dropped a Property on - all works now.

If anyone else comes across this in the future, it is necessary to change the Type by opening the Property element and in the dialog under Properties - Property selecting a Value Type. Confusingly, the Type in the Properties window (not the dialog that is visible when opened from the element in the Project Browser) is not editable. That's too many uses of the word Type in windows/dialogs labelled Property but doing different things for my mind to cope with!

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 6267
  • Karma: +104/-89
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
I was dropping ValueType elements, so I have changed and dropped a Property on - all works now.

If anyone else comes across this in the future, it is necessary to change the Type by opening the Property element and in the dialog under Properties - Property selecting a Value Type. Confusingly, the Type in the Properties window (not the dialog that is visible when opened from the element in the Project Browser) is not editable. That's too many uses of the word Type in windows/dialogs labelled Property but doing different things for my mind to cope with!
Welcome to EAUI...

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