Book a Demo

Author Topic: Can I CSV export/import class attributes?  (Read 9540 times)

ChuckZ

  • EA Novice
  • *
  • Posts: 15
  • Karma: +0/-0
    • View Profile
Can I CSV export/import class attributes?
« on: August 10, 2012, 01:29:53 am »
I have figured out ... fairly quickly how to export/import the names and descriptions of classes and type defs, but I need to update MANY attributes and definitions. Going into each individual attribute is very time consuming.

Is there a way to export attribute data, update it then import the changes? It would be nice if this could be accomplished at the package level.
Where's your shame … You've left us up to our necks in it … - David Bowie (Hunky Dory – 1971)
All that is necessary for the triumph of evil is that good men do nothing. - Edmund Burke (1729-1797)

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile
Re: Can I CSV export/import class attributes?
« Reply #1 on: August 10, 2012, 02:56:22 pm »
There is code for importing Classes and Attributes from a spreadsheet, however I assume this does not synchronise to an existing model.
See: http://community.sparxsystems.com/resources/scripts/simple-vba-excel-ea-importer

One point to note is the diagram edit feature of Attributes (Click on the attribute - press F2), allows editing an Attributes: Scope, Stereotype, Name and Type -see:
http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/modeling_basics/editattributekeywords.html

That might make it simpler than doing an export/import process if those fields are all that needs to be altered.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Can I CSV export/import class attributes?
« Reply #2 on: August 10, 2012, 05:00:30 pm »
Quote
There is code for importing Classes and Attributes from a spreadsheet, however I assume this does not synchronise to an existing model.
See: http://community.sparxsystems.com/resources/scripts/simple-vba-excel-ea-importer
Dermot, you underestimate me :D

It does "synchronise". That is it overwrites existing attributes based on the name of the attribute. It won't delete or rename any attributes.

A (little) bit more info can be found on my blog:
http://geertbellekens.wordpress.com/2012/07/15/simple-vba-excel-to-ea-importer-v2/

Geert

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile
Re: Can I CSV export/import class attributes?
« Reply #3 on: August 13, 2012, 10:28:43 am »
Thanks for the Update Geert.
Great to hear updating was addressed