Book a Demo

Author Topic: Import new tagged value onto component  (Read 6715 times)

johnks

  • EA User
  • **
  • Posts: 28
  • Karma: +2/-0
    • View Profile
Import new tagged value onto component
« on: April 26, 2016, 01:29:02 am »
Hi,

Apologies if this question has been covered. It may be a repeating query, although I wasn't able to locate the exact topic on the forum.

Does anyone know a way to import new tagged values onto existing components. I have an existing Sparx project containing approx 400 components (each already having a single tagged value) and would like to extend the definition of each one with an additional tagged value.

I've seen Geert's excel importer referenced, but not found a use case the same as mine yet. 

Any pointers would be gratefully received!

:)

John
John S

smendonc

  • EA User
  • **
  • Posts: 148
  • Karma: +5/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: Import new tagged value onto component
« Reply #1 on: April 26, 2016, 03:17:29 am »
You might try the csv import functionality.  It was updated over the last couple of versions to allow import of tag values.  You'll need to do something like:
  • Export the GUID, Name, Type of the components to be updated to csv
  • Update the csv to include the new tag values
  • Import the updated file

I haven't looked at Geert's importer in a while but it should be fairly easy to update that to add tag values to existing components as well.

Test offline to catch any specific nuances for your case.

Stan.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Import new tagged value onto component
« Reply #2 on: April 26, 2016, 01:13:51 pm »
Hi John

In the current importer there is one field that is being imported as a tagged value (Attribute Lenght)
You would have to look into the VBA code to do something similar for a tagged value on an element.

The general mechanism is that it works per package and name based. So if there is something in that package with the given name then it will update the existing thing, if not it will create a new thing.

But if your new tagged value just needs a default value, or a value that you can calculate from the model contents, then you could be much better off writing a little VBScript and run it in EA directly.

Geert

johnks

  • EA User
  • **
  • Posts: 28
  • Karma: +2/-0
    • View Profile
Re: Import new tagged value onto component
« Reply #3 on: April 27, 2016, 11:19:49 pm »
Stan/Geert - many thanks for getting back to me.

Geert - The new tagged value is created in an external system, so it's not derivable  :( - I am also not sure I've got the required VBA skills to play with the script. I think this is going to be something I'll have to get into.

Stan - your suggestion sounds straightforward enough?!  I'll try this first.. :)

All the best,

John
John S