Free Support Forum - aspose.com

Shape Name Empty & Formula code incorrect

Hello,

I have a vsd file (DCOexample) where I have to get the formula of every shape in order to connect them after in our tool.

if you execute this code :
Diagram diagram = new Diagram(dataDir + “DCOexample.vsd”);

    for (Page page : (Iterable<Page>) diagram.getPages()) {
      for (Shape shape : (Iterable<Shape>) page.getShapes()) {
        System.out.println("\nShape ID : " + shape.getID());
        System.out.println("\nShape name : " + shape.getNameU());
        System.out.println("\nShape nameU : " + shape.getNameU());
        System.out.println("Formula :" + shape.getLayout().getRelationships().getUfe().getF());
      }
    }

in the result you will see that the shape with the ID “142” has the formula :
Formula :SUM(DEPENDSON(4,Unterprozess (zugeklappt)!SheetRef(),Swimlane List!SheetRef(),itpThemeEffectsFacelift!SheetRef()))

as you see there is no mention of the shape (ID:18) connected to the shape (ID:142).

in the vsd file case i always had the “name” of the connected shapes.

if we verify the formula of the shape (ID:18) we will see that the name of the shape(ID:142) is mentioned (Task.37) :

Formula :SUM(DEPENDSON(5,Swimlane List!SheetRef()),DEPENDSON(1,Task.37!SheetRef()))

Is this normal ?

Another problem with the same shape (ID:18) is that I can’t get its nameU !!
If I open the file with visio I can see that the name is (Pool / Lane.18) :
image.png (13.9 KB)

DCOexample.zip (303.3 KB)