Creating value property for a stereotyped class

Discussions about Domain Specific Language customizations

Moderator: Moderators

Creating value property for a stereotyped class

Postby l.kooralla@student.tue.nl » Fri May 18, 2018 5:49 am

Hello,
I am trying to extend sysml using profile diagram which includes the block stereotypes like <<motor>> etc. So, my goal is that when I create a block and change its stereotype as <<test>> in the block definition diagram, the attributes that I created in the stereotyped class of the profile diagram has to appear under value property in the created block.

Currently, when I create a property called "lekhaj" to the <<test>> stereotype, it appears as tag values of the block therefore, I am not able to use it in the parametric diagram. I even changed the stereotype of the property as value type but still, the problem continues. I went through all the questions in the forum and mostly all the user guides.

It would be great if someone can help me with this problem. I have attached the photos of the same.
You do not have the required permissions to view the files attached to this post.
l.kooralla@student.tue.nl
Forum Newbie
Forum Newbie
 
Posts: 1
Posts Rating:0
Joined: Fri May 18, 2018 3:42 am

Re: Creating value property for a stereotyped class

Postby jovita.bankauskaite@nomagic.com » Thu May 24, 2018 9:40 am

Hello,

According to your description, you can only create a stereotyped block using the DSL engine and place it on the BDD diagram pallet. More information about DSL engine https://docs.nomagic.com/display/MD185/ ... am+palette
However, the attributes of this stereotyped block will not be created automatically. This requires the implementation of this behavior. More information about OpenAPI https://docs.nomagic.com/display/MD185/ ... ng+Started
You can find the code examples in <modeling tool installation directory>\openapi\examples

We suggest to create a Block with Value Properties and inherit it.
Block_Test.png


You can inherit elements in a few ways, look below:
1. Create Generalization relation via containment tree. Select one or few blocks in the containment tree, right-click>Create Relation>Outgoing then select Generalization and a block that you want to inherit.
Outgoing relation.png


2. Specify Generalization relations using Dependency Matrix.
Dependency Matrix.png


By default block elements do not show inherited attributes on symbols. If you want to display them then you need to set "Show Inherited" symbol property to true.
Show Inherited.png


Also if you want to redefine inherited attributes then you need to open the specification window of a block and open "Attributes" property group. Then select the attribute that you want to redefine and click the button "Redefine". The redefined attribute becomes owned.
Attribute Property Group.png


Best regards,
No Magic, Inc. Customer Support
You do not have the required permissions to view the files attached to this post.
jovita.bankauskaite@nomagic.com
Forum Beginner
Forum Beginner
 
Posts: 30
Posts Rating:3
Joined: Wed Jan 24, 2018 7:24 am

Re: Creating value property for a stereotyped class

Postby JDI » Thu Dec 13, 2018 12:52 pm

If you wanted to redefine those inherited value properties through csv import, how would you do that?
JDI
Forum Newbie
Forum Newbie
 
Posts: 1
Posts Rating:0
Joined: Thu Feb 22, 2018 1:10 pm


Return to DSL

Who is online

Users browsing this forum: No registered users and 0 guests