Book a Demo

Author Topic: How to advise EA of diagram change  (Read 4452 times)

Asperamanca

  • EA User
  • **
  • Posts: 91
  • Karma: +0/-0
    • View Profile
How to advise EA of diagram change
« on: September 26, 2013, 10:49:10 pm »
I have a script that does string replacement within a package.

I am able to change the name of the diagram, with the following code:

Code: [Select]
   
If InStr(obj.Name, fromString) > 0 Then
    obj.Name = Replace(obj.Name, fromString, toString)
    modified = True
End If

For elements, I then call Repository.AdviseElementChange.
But what do I call for diagrams?

Thing is, the diagram is renamed, but the project browser is not updated.

(EA 9.3.935)

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 to advise EA of diagram change
« Reply #1 on: September 26, 2013, 11:40:26 pm »
You'll probably need to do a reload package.

Geert

Asperamanca

  • EA User
  • **
  • Posts: 91
  • Karma: +0/-0
    • View Profile
Re: How to advise EA of diagram change
« Reply #2 on: September 26, 2013, 11:47:11 pm »
Thank you.

Code: [Select]
RefreshModelView(pkg.PackageID)
does the trick.