Author Topic: Refresh Packages  (Read 4196 times)

Tobin_Harris

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Refresh Packages
« on: September 07, 2004, 08:37:36 am »
He there,

I have an Addin that generates elements into a package, and also deletes certain elements.

Despite calling .Update() on the package from the code, I find that EA doesn't refresh the view. It will show new elements, but it doesn't show the old ones as deleted. If I select a deleted element in the tree, EA says that the element was not found, and reloads the project.

Is there a way to make EA reflect the true state of the underlying model from within the Addin code?

Any help much appreciated.

Tobin

Dermot

  • EA Administrator
  • EA User
  • *****
  • Posts: 591
  • Karma: +7/-0
    • View Profile
Re: Refresh Packages
« Reply #1 on: September 08, 2004, 05:28:48 pm »
Try using ReloadDiagram()  

Ie.
      Repository.ReloadDiagram(DiagramId)

I hope this is of help.

Tobin_Harris

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Refresh Packages
« Reply #2 on: September 13, 2004, 03:51:01 am »
Hi there,

Thanks for the suggestion, but unfortunately this does not work. It's actually the tree view that is not refreshing.

Interestingley, EA does reflect new additions in the tree view such as:

somePackage.Elements.AddNew( "New Use Case", "Use Case");

However, if I call something like:

somPackage.Elements.Delete( someElement.ElementID );

then EA will only show the changes after a reload (invoked from the File menu).

Any help appreciated.

Tobin