Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Albert De La Fuente on April 25, 2012, 02:04:31 pm
-
Hi,
I have a huge requirements list in excel that I'm able to import (csv) fine on EA. For each requirement, I want to create an use case, so I transform the file by changint the object type and I'm able to import (csv) it fine too.
Now what I would like is to import a single (1x1) relation between each use case and each requirement. UC01 <-> REQ01, UC02 <-> REQ02, and so on.
I have not found any "Realisation" object type or similar on the csv file so that it can be imported automatically. Is there any way to do this?
So what I thought is... Export (csv) both the use cases and the requirements with full UUID's to separated files, and them relate the UUID's of each in a new file that later will be processed by a python script to generate a xmi file so it can be re-imported to EA.
This approach is not very easy, so I'm looking for something more simple, if possible via csv.
Any ideas?
Thanks a lot!
-
See Simple VBA Excel EA importer (http://community.sparxsystems.com/resources/scripts/simple-vba-excel-ea-importer)
Should be easy enough to include a feature to import relationships.
Geert
-
Thanks for your answer Geert,
I downloaded the xls file and open up the macro definitions, but I'm not able to execute it, I get the following error on EA.repository: “Can't find Project or Library”. I'm using EA & excel through wine emulation on linux
Is there something similar in Java? (i.e. Java cvs classes importer). At this point what I would like to know is how to import a relation between two or more objects, could you please highlight me where is that on your code? (line number)
Thanks again!
-
I don't know of any existing java code that does the same, but I don't see why it shouldn't be possible.
The reason you're getting the error is probably because it can't find the Interop.EA.dll
The excel only imports classes and attributes, but adding a function to handle relation should be quite easy.
Geert
-
Thanks Geert,
I will research more about the dll to make it work.
Do you know what would be the routine to invoke to import a "Realisation" (or other) relationship?
Thanks again!
-
Should be similar to:
EA.Connector newConnector = Element.Connectors.AddNew("""Realization");
newConnector.SupplierID = myTargetID;
newConnector.Update();
Geert
-
Thanks a lot Geert,
I will try that!