Book a Demo

Author Topic: SysML Block attributes – unique values  (Read 9759 times)

Norm_E

  • EA Novice
  • *
  • Posts: 9
  • Karma: +1/-0
    • View Profile
SysML Block attributes – unique values
« on: November 07, 2014, 04:51:43 am »
I am using EA to do SysML modeling. I am representing a system component with a block, and I will be creating instances of this parent block. The parent block will have a set of basic parameters (such as operating range, input impedance, frequency, etc), but I need each instance of the block to have different values for these parameters. I tried using EA’s attributes to do this, but when I update the attribute value in an instance of a block, the attribute value in the parent block changes as well. So attributes are not usable for this purpose. Are there any other EA features that can be used to contain unique parameter values in block instances?
Any information that you can provide would be helpful.

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: SysML Block attributes – unique values
« Reply #1 on: November 07, 2014, 09:25:54 pm »
Yes and no

Assuming you have created a Block and added UML Attributes to this block then yes you can set different values for attributes in instances (properties) of this Block.

[highlight]1) Create the Block
2) Right-click your Block and select Features & Properties > Attributes...
3) Add your Attributes[/highlight]

1)[highlight] Re-use you Block on a BDD (or IBD) as a Property and give the Property a name
2) Repeat for other Properties
3) Right-click a Property (Block Instance) and select Features & Properties > Set Run State...
4) On the dialog you will see a Drop List labelled Variable, click this and you should see you attribute names
5) Select your attribute and complete the rest of the dialog (i.e. enter the value)
6) Repeat for all attributes and all block instances
[/highlight]
These values will appear in the Block Instance elements


HOWEVER

If you have defined your Block attributes using SysML Value Properties, then the above method can still be used, BUT, you Value Properties WILL NOIT APPEAR IN THE VARIABLE DROP DOWN LIST, but their names can be typed in manually

Hope the above is clear and helps you out

All the best

Phil
Models are great!
Correct models are even greater!

Norm_E

  • EA Novice
  • *
  • Posts: 9
  • Karma: +1/-0
    • View Profile
Re: SysML Block attributes – unique values
« Reply #2 on: November 08, 2014, 06:54:57 am »
Phil...

Your explicit steps were very helpful. I can now see the attribute values for each instance (in the IBD) and they can be different in each instance.  

Additional questions:
1. In the IBD diagram, the attributes appear inside the block instances, but I don't see any way to turn them off if I don't want to see them. Is there a way to do that?
2. In the project browser, for each instance, if I open Properties, there are no options to look at attributes. Under "Classifier attributes", the attributes list appears, but not the values of the attributes for this instance. Is there a way to see the attribute values in the project browser?
3. In your last sentence, you talked about defining block attributes using SysML value properties. How do you do that?

Thanks for your help.

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: SysML Block attributes – unique values
« Reply #3 on: November 10, 2014, 08:53:16 pm »
Hi here are your answers

To hide the attribute values in a IBD do the following

[highlight]1) Right-click the Property Instance
2) Select Features & Properties > Feature and Compartment Visibility... from the menu
3) On the dialog you should see a check box labelled Hide Object Runstate in current diagram. Check this check box to hide the values[/highlight]

  • Regarding the attributes in the Project Browser, this behaviour is correct as the Block species the appearance of all Properties instantiated from this single Block description, unfortunately, Property instances do not show values for their attributes in the Project Browser

  • To add an attribute to a Block using a Value Type do the following


[highlight]1) Add a Property from the BDD toolbox to a Block
2) In the Dialog select Property, and set the type to a defined Value Type in your repository
3) Delete (using the Del key) the Property from the diagram and you should see you new value property listed in the Block in a compartment labelled values[/highlight]

The setting of the Type of the Property is essential a Value Property is defined as a Property typed to a Value Type

Value Types can be created directly on a BDD from the toolbox

Hope this helps

Phil
Models are great!
Correct models are even greater!

Norm_E

  • EA Novice
  • *
  • Posts: 9
  • Karma: +1/-0
    • View Profile
Re: SysML Block attributes – unique values
« Reply #4 on: November 12, 2014, 03:29:55 am »
I understand the first two answers, but I will have to play around some more to fully understand the third answer.

Thanks for your help!