check [Solved]SysML: how to define block attributes (in BDDs and later usable in IBDs)

1 year 1 month ago - 1 year 1 week ago #5014 by rolf
I want a block to show some {attribute = value} pairs. For example VBATT = 12V. Instances of the block should inherit these attributes and allow adjustment of their values. How can this be done ? I don't care now about strict typing. Thanks!

Please Log in or Create an account to join the conversation.

1 year 3 weeks ago #5034 by ebr
Hi Rolf,

To do so you have to create an "AttributeLink" element under instances of yours blocks.
Right now, this kind of element can not be create by using IBD palette but it will added in future version.
An issue have beeen created in order to follow its implementation. http://forge.modelio.org/issues/337http://forge.modelio.org/issues/337 .

So if we imagine a Car having a Battery. This battery is caracterized by its Voltage (VBATT) attribute having a default value of 12 as depicted in the following screenshot.



In the Car IBD, we can see the battery with its VBATT attribute. As you can see below, the value of VBATT attribute has been updated to 200.



To create the "instance of the attribute", you have to use the AttributeLink creation command which is available in the Model browser.


Hoping it is clear,
EBR
Attachments:

Please Log in or Create an account to join the conversation.

1 year 3 weeks ago #5037 by rolf
Thank you very much, Etienne. Yes, that works indeed. But I would expect that attributes associated to a block also got instantiated, just as ports are. Now we have to create AttributeLinks each time we instantiate a block with attributes.

Kind regards,
Rolf.

Please Log in or Create an account to join the conversation.

1 year 3 weeks ago #5055 by ebr
Hi rolf,

Another solution would to use the "Update instance" command it will instanciated both Port and Attribute.

THe best way is maybe to
  1. Define your block including its ports and attribute
  2. Drag and Drop your block inside your internal block diagram to instantiate it and its ports
  3. Use the "update instance" command to instantiate the attributes

Cheers,
EBR
Attachments:

Please Log in or Create an account to join the conversation.

1 year 3 weeks ago #5057 by rolf
Great, thank you Etienne.

Please Log in or Create an account to join the conversation.

Moderators: tmaebr
Time to create page: 0.431 seconds
^ Back to Top