Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Fantasy.Fan on December 01, 2022, 11:24:43 pm

Title: How can I update Notes for Diagram?
Post by: Fantasy.Fan on December 01, 2022, 11:24:43 pm
Hi All,

I want to update the Notes for a Diagram, but it doesn't work.  Here is part of my code:

 Dim eaEleDiag As EA.Diagram = m_Repository.GetDiagramByGuid(someDiagramId)
 eaEleDiag.Notes = “Some Notes"
 eaEleDiag.Update()


I tried many times, and I couldn't see that the Notes had been changed to new value when debugging, but after program exited, the notes on that diagram didn't change.
Which step did I miss?
Title: Re: How can I update Notes for Diagram?
Post by: qwerty on December 02, 2022, 12:06:18 am
Right out of my head this looks ok. Which EA version?

q.
Title: Re: How can I update Notes for Diagram?
Post by: Fantasy.Fan on December 02, 2022, 02:22:55 pm
the EA's version is 15.2.

I made an Add-On Installer, but it seems that some interface changed, I can't install it for EA 16.
Title: Re: How can I update Notes for Diagram?
Post by: Geert Bellekens on December 02, 2022, 04:25:04 pm
the EA's version is 15.2.

I made an Add-On Installer, but it seems that some interface changed, I can't install it for EA 16.
Yeah, things changed for the 64 bit edition. There are a few posts here were we discussed the details.

Geert
Title: Re: How can I update Notes for Diagram?
Post by: qwerty on December 03, 2022, 03:19:48 am
But the issue is for 15.2? Or is it for the trouble with V16?

q.
Title: Re: How can I update Notes for Diagram?
Post by: Fantasy.Fan on December 04, 2022, 05:13:33 pm
Yes, this issue is for 15.2 -- I once tried to install to verify on 16, but as you see, I have to change the installer.

so, what step did I miss?
Title: Re: How can I update Notes for Diagram?
Post by: qwerty on December 04, 2022, 10:16:04 pm
Just tried and it worked. Things to remember:
- reload the diagram from the browser
- if it's open then close it before updating
- eventually you have to force save (if there are pending changes)
- if nothing works, try in an empty new eap to make sure your environment is ok
- if that works, run an integrity check on the repo with the issue
- cross-check that the guid is ok

q.
Title: Re: How can I update Notes for Diagram?
Post by: Fantasy.Fan on December 07, 2022, 07:50:39 pm
Thanks a lot.
I'll make a try.