Author Topic: Writing values to repository (newbie)  (Read 3116 times)

Tage Korsdal Nielsen

  • EA Novice
  • *
  • Posts: 19
  • Karma: +0/-0
    • View Profile
Writing values to repository (newbie)
« 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

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Writing values to repository (newbie)
« Reply #1 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.

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: Writing values to repository (newbie)
« Reply #2 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
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)