Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Tobin_Harris 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
-
Try using ReloadDiagram()
Ie.
Repository.ReloadDiagram(DiagramId)
I hope this is of help.
-
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