Book a Demo

Author Topic: The Diagram has been modified by another user  (Read 7034 times)

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
The Diagram has been modified by another user
« on: September 12, 2013, 04:21:47 pm »
Hello,

I made an Addin with:
Code: [Select]
repository.ReloadDiagram(DiagramID);
diagram.SelectedConnector = con;
diagram.Update();

I run the addin, it does what I want it to do. After a few seconds I get the message:

The Diagram has been modified by another user.
It will remain locked against modification until it is reloaded.

The the diagram is locked. It's a local *.eap file and I have only one EA instance running. EA 10.09.

Has someone an idea?

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: The Diagram has been modified by another user
« Reply #1 on: September 12, 2013, 04:43:04 pm »
Try adding Repository.ReloadDiagram(long DiagramID) at the end.

Geert

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: The Diagram has been modified by another user
« Reply #2 on: September 12, 2013, 04:44:28 pm »
Or even better, forget the diagram.update(). It doesn't seem like you are changing anything to the diagram are you?

Geert

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: The Diagram has been modified by another user
« Reply #3 on: September 12, 2013, 10:13:50 pm »
Hello Geert,

before Reload I make changes to line style in the diagram.

After reload I want to select the beforehand selected elements/connector. The selections get lost with reload.

Thanks,

Helmut

 
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: The Diagram has been modified by another user
« Reply #4 on: September 12, 2013, 10:28:54 pm »
Code: [Select]
repository.ReloadDiagram(DiagramID);
diagram.SelectedConnector = con;

Isn't this working? You don't need an update() after setting the selectedconnector.

Geert

Helmut Ortmann

  • EA User
  • **
  • Posts: 970
  • Karma: +42/-1
    • View Profile
Re: The Diagram has been modified by another user
« Reply #5 on: September 12, 2013, 11:39:06 pm »
Hello Geert,

that was it. The update() makes the mess.

Thanks a lot for your effort.

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)