Assiging different inherited propety default values in different generalized blocks

Discussions about systems engineering product SysML functionalities

Moderator: Moderators

Assiging different inherited propety default values in different generalized blocks

Postby Miyako Wilson » Mon Aug 20, 2007 9:31 am

I would like to the followings:
1) create a block named b1 with a property named p1 and make its type as
Real.
2) create another block named b2 and add generalization to b1.
3) create another block named b3 and add generalization to b1.
4) specify default value of b2's inherited property p1 as 10.
5) specify default value of b3's inherited property p1 as 500.

I could do up to 4) but not 5). It seems like the default value of
inherited property is shared by all generalized blocks and the parent block
itself.

Will this capability be added soon?

Regards,
Miyako



Miyako Wilson
 
Posts Rating:

Re: Assiging different inherited propety default values in different generalized blocks

Postby Nerijus Jankevicius » Wed Aug 22, 2007 1:02 am

Hello Miyako,

You are right, there is only one property in the model, so the only one
default value could be assigned and will be shared among subblocks.
We added special feature into SysML plugin version 1.1 - so called "context
specific default values". You are able to assign different default values
for the same part in different contexts.
Follow these steps:
1. Create different instances of your block and specify values as slots
(p1=10 in one instance and p1=500 in another one).
2. Simply rightclick on part symbol in IBD diagram ("Context Specific
Default Value" menu item) and assign InstanceSpecification that holds these
values . Values will be displayed in "defaultValues"compartment on part
symbol.

I hope it helps.
Regards,
--
Nerijus Jankevicius
Senior System Analyst
OMG-Certified UML Professional
No Magic Lithuanian Development Center
Savanoriu pr. 363, LT 49425 Kaunas
P.O. box 2166, LT- 3000, Kaunas
Phone: +370-37-324032 Fax: +370-37-320670
e-mail: nerijus
WWW: http://www.magicdraw.com
--
MagicDraw - Architecture made simple!


----- Original Message -----
From: "nntp://news.nomagic.com/nomagic.products.magicdrawuml.SysML"
<miyako.wilson>
To: "Nerijus Jankevicius" <nerijus>

>I would like to the followings:
> 1) create a block named b1 with a property named p1 and make its type as
> Real.
> 2) create another block named b2 and add generalization to b1.
> 3) create another block named b3 and add generalization to b1.
> 4) specify default value of b2's inherited property p1 as 10.
> 5) specify default value of b3's inherited property p1 as 500.
>
> I could do up to 4) but not 5). It seems like the default value of
> inherited property is shared by all generalized blocks and the parent
> block
> itself.
>
> Will this capability be added soon?
>
> Regards,
> Miyako
>

Nerijus Jankevicius
 
Posts Rating:

Re: Assiging different inherited propety default values in different generalized blocks

Postby Alan Moore » Thu Aug 23, 2007 1:59 am

Hi Nerijus,

This sounds like a good feature.

However, perhaps as a side effect of this is that even where I have a default value for a Value Type (i.e. not a Block) the Default Value compartment always seems to show, even when the default value is also shown in the name string. here's an example. Any ideas?


On Miyako's point below, what is described is what I would expect. The correct approch would I believe be to redefine p1 in both b2 and b3. Then separate default values could be assigned to each of b1.p1, b2.p1 and b3.p1.

Cheers,
Alan.
"Nerijus Jankevicius" <nerijus> wrote in message news:6304071.1187772866680.JavaMail.tadjar@peleda...
> Hello Miyako,
>
> You are right, there is only one property in the model, so the only one
> default value could be assigned and will be shared among subblocks.
> We added special feature into SysML plugin version 1.1 - so called "context
> specific default values". You are able to assign different default values
> for the same part in different contexts.
> Follow these steps:
> 1. Create different instances of your block and specify values as slots
> (p1=10 in one instance and p1=500 in another one).
> 2. Simply rightclick on part symbol in IBD diagram ("Context Specific
> Default Value" menu item) and assign InstanceSpecification that holds these
> values . Values will be displayed in "defaultValues"compartment on part
> symbol.
>
> I hope it helps.
> Regards,
> --
> Nerijus Jankevicius
> Senior System Analyst
> OMG-Certified UML Professional
> No Magic Lithuanian Development Center
> Savanoriu pr. 363, LT 49425 Kaunas
> P.O. box 2166, LT- 3000, Kaunas
> Phone: +370-37-324032 Fax: +370-37-320670
> e-mail: nerijus
> WWW: http://www.magicdraw.com
> --
> MagicDraw - Architecture made simple!
>
>
> ----- Original Message -----
> From: "nntp://news.nomagic.com/nomagic.products.magicdrawuml.SysML"
> <miyako.wilson>
> To: "Nerijus Jankevicius" <nerijus>
>
>>I would like to the followings:
>> 1) create a block named b1 with a property named p1 and make its type as
>> Real.
>> 2) create another block named b2 and add generalization to b1.
>> 3) create another block named b3 and add generalization to b1.
>> 4) specify default value of b2's inherited property p1 as 10.
>> 5) specify default value of b3's inherited property p1 as 500.
>>
>> I could do up to 4) but not 5). It seems like the default value of
>> inherited property is shared by all generalized blocks and the parent
>> block
>> itself.
>>
>> Will this capability be added soon?
>>
>> Regards,
>> Miyako
>>
>
You do not have the required permissions to view the files attached to this post.
Alan Moore
 
Posts Rating:

Re: Assiging different inherited propety default values in different generalized blocks

Postby Nerijus Jankevicius » Fri Aug 24, 2007 12:31 am

Hi Alan,

DefaultValue compartment could be disabled from shortcut menu ("Show Default
Value").

You are right, redefinition of properties in context specific types is
better solution, but it is kind of complex and planned for future SysML
plugin versions.
I don't think that it is comfortable, optimal and right solution to redefine
properties only for different default values (especially in deep nested
structure, when redefinition of all structure is needed).
What do You think?

Regards,
--
Nerijus Jankevicius
Senior System Analyst
OMG-Certified UML Professional
No Magic Lithuanian Development Center
Savanoriu pr. 363, LT 49425 Kaunas
P.O. box 2166, LT- 3000, Kaunas
Phone: +370-37-324032 Fax: +370-37-320670
e-mail: nerijus
WWW: http://www.magicdraw.com
--
MagicDraw - Architecture made simple!

----- Original Message -----
From: "nntp://news.nomagic.com/nomagic.products.magicdrawuml.SysML"
<alan.moore>
To: "Nerijus Jankevicius" <nerijus>
Sent: Friday, August 24, 2007 11:26 AM
Subject: Re: Assiging different inherited propety default values in
different generalized blocks


> Hi Nerijus,
>
> This sounds like a good feature.
>
> However, perhaps as a side effect of this is that even where I have a
> default value for a Value Type (i.e. not a Block) the Default Value
> compartment always seems to show, even when the default value is also
> shown in the name string. here's an example. Any ideas?
>
>
> On Miyako's point below, what is described is what I would expect. The
> correct approch would I believe be to redefine p1 in both b2 and b3. Then
> separate default values could be assigned to each of b1.p1, b2.p1 and
> b3.p1.
>
> Cheers,
> Alan.

You do not have the required permissions to view the files attached to this post.
Nerijus Jankevicius
 
Posts Rating:


Return to SysML

Who is online

Users browsing this forum: No registered users and 6 guests