We provide an API to layout presentation elements in a diagram using different strategies (layouter).

  • com.nomagic.magicdraw.uml.symbols.DiagramPresentationElement.layout(boolean)
  • DiagramPresentationElement.layout(boolean, DiagramLayouter)
  • DiagramPresentationElement.layout(boolean, DiagramLayouter, AbstractDiagramLayouterOptionsGroup)

Make sure the diagram is opened and the session is closed before doing a diagram layout. These are the current limitation of layout API

 You can find the code examples in

  • <installation_directory>\openapi\examples\testframework, com.nomagic.magicdraw.examples.testframework.DiagramLayoutTest class



Related pages