To change bounds for the existing com.nomagic.magicdraw.uml.symbols.shapes.ShapeElement, use the method com.nomagic.magicdraw.openapi.uml.PresentationElementsManager.reshapeShapeElement(ShapeElement, java.awt.Rectangle):
ShapeElement element = ...; Rectangle newBounds = new Rectangle(100,100,80,50); SessionManager.getInstance().createSession("Test"); PresentationElementsManager.getInstance().reshapeShapeElement(element, newBounds); SessionManager.getInstance().closeSession();
If shape has the Autosize property set to TRUE, bounds will be reduced to the preferred size.