Skip to main content



      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 18:33 Go to next message
Eclipse UserFriend
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 08:36 Go to previous messageGo to next message
Eclipse UserFriend
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 10:18 Go to previous messageGo to next message
Eclipse UserFriend
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 10:19] by 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 14:22 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 02:22:43 EDT 2025

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

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

Back to the top