Book a Demo

Author Topic: Batch edit of elements?  (Read 5874 times)

Benno Dielmann

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-1
    • View Profile
Batch edit of elements?
« on: March 13, 2012, 12:47:09 am »
Another feature I might be just too blind to find... ;-)

Is it possible to batch edit elements? Like: Select a bunch of elements in a diagram (or in the Project Browser), then add a keyword to all selected elements at once.

Or change all elements in a diagram to "Approved" status...

Is there a way to do that?

All models are wrong. Some are useful. - George E. P. Box

Peter Doomen

  • EA User
  • **
  • Posts: 66
  • Karma: +0/-0
    • View Profile
Re: Batch edit of elements?
« Reply #1 on: March 13, 2012, 01:40:35 am »
Changing all elements to approved in one operation is certainly possible. It's one of my tips in the bonus chapter of the EA Tricks book.

Basically, you have to do this:

- right click package
- choose "package control" - "update package status"
- change to "approved"

P.
----------------------------------------
Book on EA: http://bit.ly/EATricks
----------------------------------------

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Batch edit of elements?
« Reply #2 on: March 13, 2012, 01:54:21 am »
But not for elements in a diagram - except you move them into a single package beforehand. Treating properties of multiple selection has been asked many times. Little steps have been made from Sparx side. But it's definitely not OO as you might think it should be.

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Batch edit of elements?
« Reply #3 on: March 13, 2012, 05:16:16 pm »
Sometimes the Package Browser / Diagram List View can be useful to quickly edit a number of elements. (like change the stereotype or something like that)

Geert

Benno Dielmann

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-1
    • View Profile
Re: Batch edit of elements?
« Reply #4 on: March 13, 2012, 10:53:38 pm »
Hm, I can't find any way to edit more than one element at the same time in Package Browser or Diagram List View... But at least it's possible to see the values at a glance.

Too bad selections aren't synchronized between List View and Diagram View...
All models are wrong. Some are useful. - George E. P. Box

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Batch edit of elements?
« Reply #5 on: March 13, 2012, 10:57:54 pm »
Benno,

I didn't mean that you can edit more then one element at once, but it goes a lot quicker from the package browser then opening each elements properties dialog one after the other.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Batch edit of elements?
« Reply #6 on: March 14, 2012, 05:37:40 am »
Like in many cases it's probably much easier to write a neat SQL doing that job.

q.

Benno Dielmann

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-1
    • View Profile
Re: Batch edit of elements?
« Reply #7 on: March 15, 2012, 04:11:14 am »
Thank you for your answers...

The possibility to do such things with SQL is nice, for sure, but I doubt I want to give every member in our team the rights to change the central model repository with SQL commands... Heck, I don't even know if I will be allowed to do that once our EA installation is set up  ;D
All models are wrong. Some are useful. - George E. P. Box

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Batch edit of elements?
« Reply #8 on: March 15, 2012, 04:50:39 am »
You are allowed for sure. EA is a SQL client. The DB can not distinguish between different clients. However, the SQL should be encapsulated in an add-in in order to not damage the model.

q.

Benno Dielmann

  • EA User
  • **
  • Posts: 22
  • Karma: +0/-1
    • View Profile
Re: Batch edit of elements?
« Reply #9 on: March 15, 2012, 05:00:13 am »
Thanks for the hint concerning SQL. I will have to dig into that, could be useful for many things...
All models are wrong. Some are useful. - George E. P. Box

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Batch edit of elements?
« Reply #10 on: March 15, 2012, 05:01:38 am »
Use Repository.SQLQuery() for select queries and Repository.Execute() for update queries.

Geert