Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Clemo on July 08, 2014, 12:25:29 am
-
Hi,
Is there anyway of calling the diagram layout menu function from the Java API?
Thanks
Clemo
-
No. Only a subset of the automation interface has been implemented in the Java API; from memory its also missing the DocumentGenerator classes....
-
The "Automatic" diagram layout type can be performed via automation by calling LayoutDiagramEx on the Project class. See:
http://www.sparxsystems.com/enterprise_architect_user_guide/10/automation_and_scripting/project_2.html
This function is equivalent to the "Diagram | Layout Diagram" menu command in the EA user interface. See:
http://www.sparxsystems.com/enterprise_architect_user_guide/10/modeling_basics/layoutadiagram.html
repository.GetProjectInterface().LayoutDiagramEx(diagram.GetDiagramGUID(), 0, 4, 20, 20, false);
Unfortunately it is not possible to call any of the diagram layout algorithms provided by the "Layout Tools" window in EA via automation at this time (E.g. Circle/Ellipse, Box, Per Page, Digraph, Spring).
-
Fantastic that is exactly what I wanted.
Thanks
Paul :)
-
I was meaning InsertText in VB. It works adding a chr(13) in the string. ::)
-
@Aron B :
Re comments on previous post "Unfortunately it is not possible to call any of the diagram layout algorithms provided by the "Layout Tools" window in EA via automation at this time (E.g. Circle/Ellipse, Box, Per Page, Digraph, Spring). "
Don't suppose this has changed with latest release ? I'd love to be able to apply "Circle" layout automatically ??
Regards,
Jon.
-
No changes as far as I am aware.