I am encountering a situation where I have to add text in On-page reference shape. When I am creating shape with text and then resizing it, text is not rendered at center of shape.
@asthac,
We can formulate the position of text by setting TxtPinX and TxtPinY values in the shapesheet:
[Java]
// set text position
shape.getTextXForm().getTxtPinX().getUfe().setF("Width/2");
shape.getTextXForm().getTxtPinY().getUfe().setF("Height/2");
These lines of code do not work in your scenario. This issue has been logged under the ticket ID DIAGRAMJAVA-50545 in our bug tracking system. We have linked your post to this ticket and will keep you informed regarding any available updates.