Book a Demo

Author Topic: Update Objects after modifying Template  (Read 3338 times)

nueltz

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Update Objects after modifying Template
« on: April 21, 2011, 09:55:40 pm »
Hi all,

I inserted a some objects like Combobox, dropdown, etc. into user interfaces. Later, I generated a template (using settings-> template package) for each of these objects; more specific: I added tagged values to each of them.

Now, when I insert a new objects, the tagged values are already there. But the old objects do not get these tagged values. Is there a way to update the old objects?

Best,

nueltz

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Update Objects after modifying Template
« Reply #1 on: April 21, 2011, 10:04:50 pm »
I don't think there's a way without writing a little script.

Geert

nueltz

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Update Objects after modifying Template
« Reply #2 on: April 21, 2011, 10:15:56 pm »
Thanks for your quick response.

I am not familiar with scripts in EA. Is there anybody who wrote such a script or something similar?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Update Objects after modifying Template
« Reply #3 on: April 21, 2011, 10:24:14 pm »
I haven't written something like that, but lots of other tools on EA.
Basically what you'll have to to is:
- get all the elements that need updating
- get the standard tagged values from the template element
- add all standard tagged values to the elements.

To select the list of elements you can use an sql query with Repository.GetElementSet

If you are looking for examples of scripts of add-ins you can
- look in the installation folder in the Code Samples and Scripts folder
- look at the community site: http://community.sparxsystems.com
- read my blog: http://geertbellekens.wordpress.com/category/ict/modelling/sparx-systems-enterprise-architect/

Geert