Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: TheVampyre on April 26, 2018, 08:33:15 pm
-
Hi All,
Bit of a noob to EA here.
What I'm looking to do is run a lookup against elements in my class models, from an imported list of names. This is due to spelling errors and trailing space issues creeping in during the current process. This will ultimately help me with our quality assurance.
I did try to raise this on StackedOverflow, but I got some angry child telling me just to do some programming with know real instructions or help.
Any help would be greatly appreciated.
D
-
Hi D,
A model in Enterprise Architect is stored in a database, and that can be very useful sometimes. It means you can query it using plain old SQL.
In your case you could use something like
select o.ea_guid AS CLASSGUID, o.Object_Type AS CLASSTYPE, o.Name as ObjectName
from t_object o
where o.Name in (
'firstname'
,'secondName'
)
If you go to model search, go into edit mode and paste this sql code in the SQL Scratch Pad, you should see some results (if 'firstname' or 'secondName' actually exist in the model as elements.)
Geert
-
Hi Geert, thanks for that.
So where I can see 'Firstname' etc, can I replace these with entries from a .csv file ? then just check the lot?
Many thanks
D
-
You can do this using a simple script Refer Sample Scripts In Menu Code|Scripting|Local scripts But not from .csv file
BR
Nabil
-
Hi Nabil
see the thing is, I'm trying to avoid manually typing them in, so I don't get any errors and want to upload them from a source. Is there a good way to do this ?
As I say, I'm quite new to this, so as much help as possible needed.
-
If you have an ultimate license you can try MDG Office you can export exiting info from EA along with GUIDs do a lookup and import again to Sync.
Also try CSV importer. Again Same Export(ALONG WITH guid) and Import TO SYNC(Replace names)
BR
Nabil
-
Hi Nabil,
Thanks for that, i'll try those to avenues and come back to you. Sounds logical at the moment and yes, I have the ultimate license.
Many thanks
D