Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Rondomat on August 30, 2010, 08:28:54 pm

Title: 'Locate in current Diagram'-like feature in API
Post by: Rondomat 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?
Title: Re: 'Locate in current Diagram'-like feature in AP
Post by: Geert Bellekens on August 30, 2010, 08:49:47 pm
I don't think that is possible right now.
Maybe you can send a feature request (http://www.sparxsystems.com/support/feature_request.html) 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
Title: Re: 'Locate in current Diagram'-like feature in AP
Post by: Rondomat on August 30, 2010, 09:46:51 pm
Thanks! I will issue a feature request.

Cheers,
Rondomat