Book a Demo

Author Topic: Notifying object change not refreshing tags  (Read 4934 times)

cnurse

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Notifying object change not refreshing tags
« on: November 12, 2006, 12:28:45 am »
I've developed an addin for manipulating tagged values. If the tags are on a connector, for example, and I remove all the tags then call Repository.NotifyConnectorChange, it doesn't refresh the tags window. Anybody got a work around for this.

As a test I also changed the name of the connector, and this was correctly refreshed in the UI.

The same problem occurs no matter what EA object type the tags apply to.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Notifying object change not refreshing tags
« Reply #1 on: November 12, 2006, 12:57:43 am »
Even using the manual UI EA often has difficulty updating/refreshing the different views of the internal objects.

Try selecting a different object and coming back to this one.  That might cause a better refresh.

Let us know how you go...

HTH,
Paolo
« Last Edit: November 12, 2006, 12:58:41 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

cnurse

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Notifying object change not refreshing tags
« Reply #2 on: November 13, 2006, 05:06:55 am »
Hey Paolo,

Yep, I noticed that selecting a different object by clicking on it, then coming back to my modified object showed that the tags had indeed been updated. I dont recall seeing a method on repository that lets you select an object in the UI, or did I miss something.

Thanks mate.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Notifying object change not refreshing tags
« Reply #3 on: November 13, 2006, 05:34:13 am »
Quote
Hey Paolo,

Yep, I noticed that selecting a different object by clicking on it, then coming back to my modified object showed that the tags had indeed been updated. I dont recall seeing a method on repository that lets you select an object in the UI, or did I miss something.

Thanks mate.
Sorry,  haven't done automation in a long time...  I was getting confused with Embarcadero ER/Studio which allows you to select objects on diagrams etc.

However, try the ShowInProjectView(Object Item) function of the Repository  - that might do the trick...  Let us know how you go.

HTH,
Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

cnurse

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Notifying object change not refreshing tags
« Reply #4 on: November 14, 2006, 03:36:45 am »
Hey Paolo,

That sent me down the right track! :-)

If I select some object, then reselect my element all is fine. Now the catch, Connectors don't appear in the project view, so it throws an error if you try select such an object :-( Bummer!

Half way there though.

I tried getting a reference to the diagram which contains the connector, but neither the SelectedObjectCollection or SelectedConnector can be manipulated, which is a real pity.

Thanks for the pointer though.
Chris

mogra69

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Notifying object change not refreshing tags
« Reply #5 on: November 16, 2006, 07:50:14 pm »
Try Repository.RefreshModelView(0) that cause most of the UI to re-rendered.