Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Adler on September 21, 2013, 01:20:20 am
-
Hello dear community,
is it possible to read and write simple .txt files in scripts executed directly in the EA? As far as i see its generally possible to import source code files and to export RTF documents, so the basic functionalities for reading and writing txt file seem to be available. But i cant find an appropriate method in the EA/Repository/Session.
I'm aware that i can access the EA model data from other applications and thus use the parsing capabilities of C++ or Java. But i would prefer to stick to EA scripting to get an all-one-tool solution.
-
Hello,
in scripting and in Addins you can read or write files. There is no EA API because the languages are coming with a lot of interfaces. One is file IO.
Helmut
-
Hi,
have a look at thread http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1369750172 for a scripting example.
The help file downloaded from http://www.microsoft.com/en-us/download/details.aspx?id=2764 shows what can be done with scripting
Regards
-
First, thanks a lot for your helpful replies.
The final solution for my problem is much more simple. I have browsed the EA local scripts and found a "File IO Example" script, which is have copy-pasted into an own script (since local scripts can not be altered) and adjusted to my own needs. Also, johann's link
(http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1369750172)
was handy.
The local scripts seem to be a nice starting point for straight forward solutions for EA-newcomers.
Greetings
Adler
-
You might also have a look in my Scripting book. There's a free sample downloadable.
q.