Hello,
The correction that you provide us is working perfectly. Thank you for the good work.
In a related subject, we are looking for a way to directly get a sub-shape by Id.
when we are using the code below to retrieve connectors, the Ids givens sometimes are related to some sub-Shape elements.
for (Connect connector : (Iterable) vdxDiagram.getPages().get(0).getConnects()) {
// Display information about the Connectors
System.out.println("\nFrom Shape ID : " + connector.getFromSheet());
System.out.println(“To Shape ID : " + connector.getToSheet());
}
the method connector.getFromSheet() method gives us an ID. I f we use the method below to retrieve it, it won’t work simply because this ID is one of a sub-Shape.
vdxDiagram.getPages().get(0).getShapes().getShape(connector.getFromSheet())
In the attached file you will find a visio file where the code below won’t work simply because the ID given can’t be retrieved correctly.
for (Connect connector : (Iterable) vdxDiagram.getPages().get(0).getConnects()) {
// Display information about the Connectors
System.out.println(”\nFrom Shape ID : " + connector.getFromSheet());
System.out.println(“To Shape ID : " + connector.getToSheet());
System.out.println(“eeee” + vdxDiagram.getPages().get(0).getShapes().getCount());
System.out.println(”\nFrom Shape ID : " + RetriveConnector.getName(vdxDiagram.getPages().get(0).getShapes().getShape(connector.getFromSheet())));
System.out.println(“To Shape ID : " + RetriveConnector.getName(vdxDiagram.getPages().get(0).getShapes().getShape(connector.getToSheet())));
System.out.println(”--------------------------------------------------------------------");
}
Is there way to get it directly without doing a full search for all the shapes the n the subshapes to get it.