Author Topic: Using BatchAppend and EnableUIUpdates  (Read 1990 times)

Alexander Shepel

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Using BatchAppend and EnableUIUpdates
« on: April 02, 2012, 12:46:15 am »
Hi!

I'm trying to create add-in than have to load a lot of elements from external source. As I understand from documentation there are two "magic" attributes of Repository object (BatchAppend and EnableUIUpdates) that should seriously improve performance.

Does anybody know how to use them?
I tried to use them both from C# add-in or from internal Scripting Engine like this:
Code: [Select]
     Repository.BatchAppend = true;
      Repository.EnableUIUpdates = false;
      <...Some code that creates a lot of elements...>
      Repository.BatchAppend = false;
      Repository.EnableUIUpdates = true;
      Repository.RefreshModelView(Package.PackageID);
In both cases it was quite a long operation and I can see how every element appears in project browser on Element.Update().

Could you explain me how can I use this attributes?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 11299
  • Karma: +421/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Using BatchAppend and EnableUIUpdates
« Reply #1 on: April 02, 2012, 03:46:26 pm »
That definitely looks like the way to use it.
(at leas that is they way I've used it in the past)
Could be a bug, have you reported it yet?

Geert

Alexander Shepel

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Using BatchAppend and EnableUIUpdates
« Reply #2 on: April 02, 2012, 08:55:56 pm »
Yeah, now I've reported a bug.
Waiting for results...

Knut Paulsen

  • EA User
  • **
  • Posts: 82
  • Karma: +1/-0
    • View Profile
Re: Using BatchAppend and EnableUIUpdates
« Reply #3 on: April 18, 2012, 05:42:38 pm »
Have you heard from Sparx on this issue? I've also tried this feature, but never got it to work as advertised.

Cheers
Knut

Alexander Shepel

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Using BatchAppend and EnableUIUpdates
« Reply #4 on: April 18, 2012, 06:15:34 pm »
Today they've replied for my bug report:

Quote
We have been able to issues described in your report and this will be investigated further by our development team.

Unfortunately we cannot provide any schedule for this issue to be
resolved as yet.

Waiting again...