Book a Demo

Author Topic: How can I check that Element,Attribute was changed  (Read 4594 times)

Pavel Bunygin

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
How can I check that Element,Attribute was changed
« on: June 18, 2014, 07:36:09 pm »
Hi!
I'm working on my add-in. It shows Elements, Attributes and Attribute Tags.
Is there a way to check that data in EA was changed and refresh data in my add-in ?

I think that I can store 'Modified' date for Element and check it. But Attribute and Attribute Tag doesn't have such property. How can I check that attribute was updated?

May be there is another way?

Thanks
Pavel

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How can I check that Element,Attribute was cha
« Reply #1 on: June 18, 2014, 07:58:53 pm »
Check the EA_OnContextIemChanged event.

q.

Pavel Bunygin

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: How can I check that Element,Attribute was cha
« Reply #2 on: June 19, 2014, 04:18:57 pm »
Thank you. I think that it will help with changes from the current user. The current user can get new data from SVN without changin the context item.

And how about other users that use the same database? I think that I should check state of the package and update data anyway.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How can I check that Element,Attribute was cha
« Reply #3 on: June 19, 2014, 04:40:58 pm »
If auditing was turned on you could maybe use that.
Otherwise you can only compare what you have in memory with what is actually in the database.
I guess you have no choice but to use some kind of polling mechanism to check for changes.

Geert

Pavel Bunygin

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: How can I check that Element,Attribute was cha
« Reply #4 on: June 20, 2014, 04:08:10 pm »
Thank you Geert!
I solved the problem by using audition snapshots.

Pavel