Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Tage Korsdal Nielsen on March 15, 2014, 02:16:38 am

Title: Writing values to repository (newbie)
Post by: Tage Korsdal Nielsen on March 15, 2014, 02:16:38 am
New to AddIns and even new to c#

Parsing Repository is all fine - but how can I get values written back. Say I want to change the Time field of an Effort element:

I've tried this:
Code: [Select]
element.Time = value;
element.Update();

But it changes nothing back in EA.

Also tried adding:
Code: [Select]
eaRepo.AdviseElementChange(elm.ElementID);

where elm is the container of aforementioned Effort.

No luck.

Rgds
Tage
Title: Re: Writing values to repository (newbie)
Post by: qwerty on March 15, 2014, 10:02:00 pm
You maybe need to call Repository.RefreshModelView (long PackageID) to see the update in the browser.


q.
Title: Re: Writing values to repository (newbie)
Post by: Helmut Ortmann on March 17, 2014, 06:54:59 am
If you are interested in more think about buying Thomas Kilians eBook Scripting EA.

Also a good resource is Geerds 'Your first Addin in 10 minutes' or so in the community.

Helmut