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

Free Support Forum - aspose.com

Empty properties returning "0" as value


I have a Visio file with some shapes in that have properties that are not populated (see the image and attached Visio file in zip)

image.png (46.9 KB)
FlowDiagram_1.zip (29.4 KB)

When I create an Aspose Diagram from the file and get the properties the value of some of the unpopulated properties is returned as “0”. In the previous version we were using (21.7) they did not have this behaviour, they returned an empty string as expected. Is the change deliberate? Is there a way for me to determine if they are empty?

Thanks, Zoe

Example C# code to reproduce:

var diagram = new Diagram(@“C:\temp\FlowDiagram_1.vsdx”);

var endShape = diagram.Pages[0].Shapes.GetShape(“Start/End.5”);
var eCost = endShape.Props.GetProp(“Cost”).Value.Val; // Returns “0.000GBP” but expect an empty string
var eProcNum = endShape.Props.GetProp(“ProcessNumber”).Value.Val; // Returns “0” but expect an empty string
var eOwner = endShape.Props.GetProp(“Owner”).Value.Val; // Returns “0” but expect an empty string


An investigation ticket as DIAGRAMNET-52972 has been logged in our issue tracking system to further analyze this case. We will look into its details and let you know once the ticket is resolved. Please be patient and spare us some time.

We are sorry for the inconvenience.

The issues you have found earlier (filed as DIAGRAMNET-52972) have been fixed in this update. This message was posted using Bugs notification tool by philip.zhou

Please note that when the formula of the value of prop is “no formula”, its value is 0 but it will be displayed as formula “no formula” on the interface.
And you could know whether to display the value according to this rule.
Please using inheritprops and refer to the following documents to get shapedata :https://docs.aspose.com/diagram/net/add-retrieve-copy-and-read-visio-shape-data/#read-inheritprops-of-shape.

Please refer to the attached files and pictures.
Thanks.prop.PNG (4.0 KB)
propvalue.PNG (6.3 KB)