Book a Demo

Author Topic: refreshing Connector on Diagrams?  (Read 2948 times)

danielhsh

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
refreshing Connector on Diagrams?
« on: August 30, 2010, 07:21:37 pm »
I am trying modify the elements and connectors on a particular diagram, and the changes display right after the script is ran for the elements, however not for the connectors.

so after each modification of a element I do:
Code: [Select]
           

theElement.Update();
theElement.Refresh();
theObject.Update();
      
theDiagram.DiagramObjects.Refresh();
theDiagram.DiagramLinks.Refresh();
theDiagram.Update();


however if I do for connectors:

Code: [Select]
theTags.Refresh();
theConnector.Update();
theLink.Update();
      
theDiagram.DiagramObjects.Refresh();
theDiagram.DiagramLinks.Refresh();
theDiagram.Update();
      

and this would not work because the Connector does not have a refresh method.

So the question is, is there any other way to refresh the connector? (currently the connectors on the diagram needed to be clicked in order to be noticed of the change.)

Cheers,
Daniel

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: refreshing Connector on Diagrams?
« Reply #1 on: August 30, 2010, 07:27:45 pm »
Daniel,

In order to refresh the image of a diagram you should call Repository.ReloadDiagram (long DiagramID) or Repository.RefreshOpenDiagrams (boolean FullReload)

Geert

 

danielhsh

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: refreshing Connector on Diagrams?
« Reply #2 on: September 05, 2010, 07:16:17 pm »
it works, thanks!