Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: g.makulik on January 08, 2013, 12:05:08 pm

Title: Modify Tags on EA_OnNotifyContextItemModified?
Post by: g.makulik on January 08, 2013, 12:05:08 pm
My C# AddIn implements the EA_OnNotifyContextItemModified broadcast event and checks for changes of particular tagged values. If a value is not consistent, it should be changed to a consistent one (actually boolean tagged value types).
I'm calling the EA.TaggedValue.Update() method after changing the value and the EA.Element.Update() method but the changes have no effects (I'm also calling Repository.RefreshOpenDiagrams and closing/opening the diagram doesn't show changes either).

Any idea, what could be wrong or is necessary to do to change tagged values during this event?


Best regards,
Günther
Title: Re: Modify Tags on EA_OnNotifyContextItemModified?
Post by: Geert Bellekens on January 08, 2013, 06:40:52 pm
Yes, seems like that should be working.

If I were you I would try to setup some kind of logging on the database to figure out which sql commands EA is exactly sending to the database (and which ones it isn't)

Geert
Title: Re: Modify Tags on EA_OnNotifyContextItemModified?
Post by: g.makulik on January 09, 2013, 11:36:35 am
Quote
If I were you I would try to setup some kind of logging on the database to figure out which sql commands EA is exactly sending to the database (and which ones it isn't)

Thanks for your suggestion Geert. Can you tell an easy way to do this for an .eap (MS-Access) database? I'd know how to do for an SQL-Server or MySQL DB but I'd like to avoid the mess setting one of them up for use with EA.

Best regards,
Günther
Title: Re: Modify Tags on EA_OnNotifyContextItemModified?
Post by: Geert Bellekens on January 09, 2013, 03:16:46 pm
Quote
Can you tell an easy way to do this for an .eap (MS-Access) database?
No sorry, I have no other suggestion than "try google" :-[

Geert