Sparx Systems Forum

Discussion => General Board => Topic started by: peterc on December 21, 2017, 01:07:14 am

Title: How do I get the Values compartment to be visible on a SysML Block element?
Post by: peterc on December 21, 2017, 01:07:14 am
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.
Title: Re: How do I get the Values compartment to be visible on a SysML Block element?
Post by: Guillaume on December 21, 2017, 07:10:24 pm
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

Title: Re: How do I get the Values compartment to be visible on a SysML Block element?
Post by: Simon M on December 22, 2017, 09:01:37 am
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.
Title: Re: How do I get the Values compartment to be visible on a SysML Block element?
Post by: peterc on January 05, 2018, 01:58:51 am
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).
Title: Re: How do I get the Values compartment to be visible on a SysML Block element?
Post by: Simon M on January 05, 2018, 09:36:23 am
Do you have child value types, or child properties that are typed by a value type? It should be the latter.
Title: Re: How do I get the Values compartment to be visible on a SysML Block element?
Post by: peterc on January 08, 2018, 07:53:51 pm
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!
Title: Re: How do I get the Values compartment to be visible on a SysML Block element?
Post by: Paolo F Cantoni on January 09, 2018, 10:37:15 am
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