Author Topic: 'Locate in current Diagram'-like feature in API  (Read 3824 times)

Rondomat

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
'Locate in current Diagram'-like feature in API
« on: August 30, 2010, 08:28:54 pm »
Hi,

I'm looking for a (exact) 'Locate in current Diagram/In Diagrams...'-like feature in the Automation interface.

Currently I have used the exposed methods from the automation API to implement a functionality, which is close to, but not exact like the required feature mentioned above:

What's missing is the possibility to move an element, being outside of the diagram's visible area back into the visible area (or the other way round, to move the visible area of a diagram so, that the selected element is visible).

This is possible if I choose 'Locate in current Diagram' or 'In Diagrams...' context menu on a selected element in the Project Browser. However I was not able to implement this exactly via the API. I discovered, that selecting the diagram object on the diagram (via adding the object to the 'Diagram.SelectedObjects.AddNew()' collection) works well, but it does not force the diagram object to be inside the visible area.

Is there a way to accomplish this by using the API?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13274
  • Karma: +556/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: 'Locate in current Diagram'-like feature in AP
« Reply #1 on: August 30, 2010, 08:49:47 pm »
I don't think that is possible right now.
Maybe you can send a feature request to either set the center of the visible area on a diagram to the (latest) elements in SelectedElements, or provide an operation that allows us to manipulate the visible area of a diagram directly.

Geert

Rondomat

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: 'Locate in current Diagram'-like feature in AP
« Reply #2 on: August 30, 2010, 09:46:51 pm »
Thanks! I will issue a feature request.

Cheers,
Rondomat