We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Phases fill foreground method isn't return the correct value


I’m trying to get the color value from a phase’s foreground using the getFillForgnd() method.
If I color both phases differently, only the last phase’s color gets imported correctly (inheritFillPhase2). The first one gets imported as the default color (inheritFillPhase1).

Any ideas why this would happen?

Shape phase1 = vsdxDiagram.getPages().get(0).getShapes().get(13);
Shape phase2 = vsdxDiagram.getPages().get(0).getShapes().get(10);

Fill inheritFillPhase1 = phase1.getInheritFill();
String colorFillPhase1 = inheritFillPhase1.getFillForegnd().getValue();

Fill inheritFillPhase2 = phase2.getInheritFill();
String colorFillPhase2 = inheritFillPhase2.getFillForegnd().getValue();




Drawing1.zip (38.8 KB)

A ticket as DIAGRAMJAVA-51057 has been logged in our issue tracking system for the sake of further investigation against your file. We will look into its details and keep you posted with the status of its correction. Please be patient and spare us some time.

We are sorry for the inconvenience.

1 Like

Please use the latest version 22.11 and modify the following sample code:
Shape phase1 = page.getShapes().getShapeIncludingChild(15); //get shape id
Shape phase2 = page.getShapes().getShapeIncludingChild(12);
We get the same color as in the source visio file “Drawing1.vsdx”.
Output of the version 22.11


1 Like

Thank you for your reply. Where do the 15 and 12 come from in the getSHapeIncludingChild() method?

Please open the developer mode of visio and click this shape to check it’s shape id and name.
Phase.PNG (1.4 KB)