@moers
We could set DEPENDSON of the relationships in shape’s layout.
We are sorry that we currently don’t support calculating some formulas such as LISTSHEETREF, so we can’t calculate the specific location of the dependent shape. We will look further into it in the future.
Diagram diagram = new Diagram("source.vsdx");
Shape father = diagram.getPages().get(0).getShapes().getShape(9);
Shape child = father.getShapes().getShape(10);
Shape shape = diagram.getPages().get(0).getShapes().getShape(130);
shape.getXForm().getWidth().setValue(father.getMasterShape().getControls().get(0).getX().getValue() - 2 * 1/25.4);
shape.getXForm().getLocPinX().setValue(shape.getXForm().getWidth().getValue() / 2);
shape.getXForm().getPinX().setValue( father.getXForm().getPinX().getValue() + shape.getXForm().getLocPinX().getValue());
shape.getXForm().getPinY().setValue( father.getXForm().getPinY().getValue() - 0.16);
//set formula to dependson
shape.getLayout().getRelationships().getUfe().setF ( "SUM(DEPENDSON(5,Sheet.9!SheetRef()))");
diagram.save( "output.vsdx", SaveFileFormat.VSDX);