|
Re: assign value to model element automatically [message #1240916 is a reply to message #1232181] |
Fri, 07 February 2014 08:20 |
Ed Merks Messages: 33217 Registered: July 2009 |
Senior Member |
|
|
Salwa,
Comments below.
On 16/01/2014 12:22 PM, Salwa Alzahmi wrote:
>
> HelLo,
> Is there is a way where i can assign a value to a model elements
> automatically. for instance when I have an element(A) with attribute
> that reference another model element (B), i need to build the other
> attributse of elemnt(A) based on some attribute of element (B)...
> Can we achieve that through OCL , or I need to modify the generated
> code ...
This is probably something you want to do in the editor, not directly in
the model. But then again, it sounds a little bit like such other
attributes are derived (should not be modified in a way that's
inconsistent with the reference to B). Is that the case? You can
express the logic for derived attributes using OCL (or with Xcore)...
>
> Salwa
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.26376 seconds