Book a Demo

Author Topic: v15(beta 2): C# Automation Reduce Screen Updates  (Read 3554 times)

MichaelJ

  • EA User
  • **
  • Posts: 77
  • Karma: +14/-7
    • View Profile
v15(beta 2): C# Automation Reduce Screen Updates
« on: June 05, 2019, 09:30:22 pm »
Hi,

Am using C# to build an add-in which populates the Browser window with UML Class elements and associated Attribute entries. According to Sparx EA document (https://sparxsystems.com/enterprise_architect_user_guide/14.0/automation/repository3.html). The documentation mentions the use of 'Update' to actually create the element in DB and 'Refresh' to update the user interface.

When programmatically adding items, would like to prevent user interface refresh on each and every element / attribute that is added and only update the interface after all processing has been completed (thereby increasing generation performance).

How can add-in developers go about achieving this technique for faster Browser population and minimal UI updates?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: v15(beta 2): C# Automation Reduce Screen Updates
« Reply #1 on: June 05, 2019, 10:39:30 pm »
There is an option called Repository.EnableUIUpdates that should be of help.

Geert

MichaelJ

  • EA User
  • **
  • Posts: 77
  • Karma: +14/-7
    • View Profile
Re: v15(beta 2): C# Automation Reduce Screen Updates
« Reply #2 on: June 06, 2019, 12:08:52 am »
There is an option called Repository.EnableUIUpdates that should be of help.
Geert

Thank you for the response, that did the trick. (Code required call to "reload package" after setting "Repository.EnableUIUpdates = true", because it seems Browser doesn't automatically refresh after setting this flag to true)