Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » ATL » [ATL] how can I know the path of the model output and xmiID of newly created elements?
[ATL] how can I know the path of the model output and xmiID of newly created elements? [message #929933] Mon, 01 October 2012 22:33 Go to next message
_md2_ on Forum is currently offline _md2_ on ForumFriend
Messages: 9
Registered: February 2012
Location: L'Aquila
Junior Member
Hi,
In a transformation I create two models, the first is a classic model, while the second is the weaving model , used to trace elements. you can know the path of the model output directly from ATL?
I used the function
TRACE!ElementRef.allInstances()->select(e|e.name.startsWith('OUT')).first().oclType().generateModelRef('OUT')

For input model returns the expected result (path of input model) while for output model returns "new-model"
how can I know the xmiID of newly created items?
using the attribute xmiID do not get the expected result, ie "//object.0" but only "/0".
Regards
Re: [ATL] how can I know the path of the model output and xmiID of newly created elements? [message #930563 is a reply to message #929933] Tue, 02 October 2012 12:36 Go to previous messageGo to next message
Fernanda R.F. is currently offline Fernanda R.F.Friend
Messages: 64
Registered: May 2012
Member
Hi,

If you want to get the xmiID from a xml file you need to use as:

__xmiID__

for example: rule1.__xmiID__;
Re: [ATL] how can I know the path of the model output and xmiID of newly created elements? [message #930661 is a reply to message #930563] Tue, 02 October 2012 14:18 Go to previous messageGo to next message
_md2_ on Forum is currently offline _md2_ on ForumFriend
Messages: 9
Registered: February 2012
Location: L'Aquila
Junior Member
I have try this, using the attribute __xmiID__ do not get the expected result,"//object.0" but only "/0" and in weaving moodel does not work.
For the outModels path do you have a solution?

[Updated on: Tue, 02 October 2012 14:19]

Report message to a moderator

Re: [ATL] how can I know the path of the model output and xmiID of newly created elements? [message #930875 is a reply to message #930661] Tue, 02 October 2012 18:22 Go to previous message
Fernanda R.F. is currently offline Fernanda R.F.Friend
Messages: 64
Registered: May 2012
Member
Hi,
I'm not sure if I understood what you want to do, or if it could help you, but I suggest you to try use as:

metamodel!Class->allInstances().asSequence().first().__xmiID__;


Regards,
Fernanda
Previous Topic:[ATL] model element references in input model
Next Topic:error message
Goto Forum:
  


Current Time: Fri Apr 19 06:45:12 GMT 2024

Powered by FUDForum. Page generated in 0.01842 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top