Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: MatthiasVDE on August 30, 2022, 07:43:12 pm

Title: EA selects corresponding attribute in Project Browser
Post by: MatthiasVDE on August 30, 2022, 07:43:12 pm
I'm writing an add-in to read and write the attribute descriptions. When I read the description (notes) from a specific attribute, EA always selects that attribute in the project browser.
For some functional reasons I don't want this, is there any way to avoid this?


Code: [Select]
txtAttributeDescription.Text = attribute.Notes
Title: Re: EA selects corresponding attribute in Project Browser
Post by: Geert Bellekens on August 30, 2022, 07:51:09 pm
You can try to set
Code: [Select]
Repository.EnableUIUpdates = false
AFAIK selecting the attribute only happens when writing (Update()) and not when reading.

Geert
Title: Re: EA selects corresponding attribute in Project Browser
Post by: MatthiasVDE on August 30, 2022, 08:21:59 pm
In the background there was a TechtChanged event that updates the value, so there was actually an update.
I fixed it by disabling the UIUpdates, thanks!