MetaCase Homepage
Forum Home Forum Home > > MetaEdit+
  New Posts New Posts RSS Feed - textfile import in metaedit+
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

textfile import in metaedit+

 Post Reply Post Reply
Author
Message
jpt View Drop Down
MetaCase
MetaCase
Avatar

Joined: 25.Mar.2008
Points: 239
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpt Quote  Post ReplyReply Direct Link To This Post Topic: textfile import in metaedit+
    Posted: 13.Oct.2020 at 16:21
At https://metacase.com/mwb/xml_format.html#importingmodels six different ways to import existing data to MetaEdit+ is described. 

The 'demo' repository includes an example of approach #1 that is applied also in the YouTube video mentioned ("Integrating and transforming models in MetaEdit+"). See 'UML' project and for 'Class Diagram [UML]' graph type there is a generator 'Reverse engineer Java' that reads Java classes and their attributes and creates Class diagrams. 

It reads all files found from the directory but with Ask command in MERL you could also import just one file (and then perhaps based on include/import etc. statements read other needed files too).

In addition to the step of parsing the data from files, the second main step is translating it to target metamodel, like that of datatypes in the example you provided.

Back to Top
edward22243 View Drop Down
Major Contributor
Major Contributor
Avatar

Joined: 19.Apr.2019
Points: 41
Post Options Post Options   Thanks (1) Thanks(1)   Quote edward22243 Quote  Post ReplyReply Direct Link To This Post Posted: 13.Oct.2020 at 17:16
Dear Juha-Pekka,

thanks for the reply. I looked at the example and a file is imported via MERL. What I saw in the video is that a menu pops up in which you can select a file. How can I get that to work in MetaEdit+




Edited by edward22243 - 13.Oct.2020 at 17:37
Back to Top
jpt View Drop Down
MetaCase
MetaCase
Avatar

Joined: 25.Mar.2008
Points: 239
Post Options Post Options   Thanks (1) Thanks(1)   Quote jpt Quote  Post ReplyReply Direct Link To This Post Posted: 13.Oct.2020 at 17:33
You may apply ask-command, e.g. as:

variable 'importedFile' write
prompt 'Choose file' askFilename
close

and if $importedFile contains selection then continue.

-- Juha-Pekka
Back to Top
edward22243 View Drop Down
Major Contributor
Major Contributor
Avatar

Joined: 19.Apr.2019
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote edward22243 Quote  Post ReplyReply Direct Link To This Post Posted: 13.Oct.2020 at 17:42
thank you
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.05
Copyright ©2001-2022 Web Wiz Ltd.

This page was generated in 0.063 seconds.