Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: Benno Dielmann on March 13, 2012, 12:47:09 am

Title: Batch edit of elements?
Post by: Benno Dielmann 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?

Title: Re: Batch edit of elements?
Post by: Peter Doomen 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
----------------------------------------
Title: Re: Batch edit of elements?
Post by: qwerty 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.
Title: Re: Batch edit of elements?
Post by: Geert Bellekens 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
Title: Re: Batch edit of elements?
Post by: Benno Dielmann 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...
Title: Re: Batch edit of elements?
Post by: Geert Bellekens 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
Title: Re: Batch edit of elements?
Post by: qwerty 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.
Title: Re: Batch edit of elements?
Post by: Benno Dielmann 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
Title: Re: Batch edit of elements?
Post by: qwerty 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.
Title: Re: Batch edit of elements?
Post by: Benno Dielmann 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...
Title: Re: Batch edit of elements?
Post by: Geert Bellekens on March 15, 2012, 05:01:38 am
Use Repository.SQLQuery() for select queries and Repository.Execute() for update queries.

Geert