Fixed List and String properties value is not returning the right value

We are parsing a MS Visio file with Aspose.Diagram 23.5.0.0, for properties of type string and fixed list when the value is empty, the property value returned in Prop.Value.Val is a 0. Can the property value returned be empty or null when there is no value instead of returning a 0?
I am reading the value from Shape.InheritProps Prop.Value.Val
Do I need to read the value of the string and fixed list properties from another field? Or exists any fields that I can use to know if the value is empty? The value “0” returned when the real value is empty for the fixed list and string type properties is confusing, and I cannot imply that 0 always means empty because I have scenarios where the real value of the property is “0”.

@Michel.Martinez
In Microsoft Visio, the default value for the “val” property of a shape’s property is typically “0”. To confirm whether it’s a default value, you also need to check its formula. If the formula is “F=‘No Formula’”, then you can be certain that the property’s value is indeed the default value. This ensures that the value hasn’t been calculated using a formula and is truly set to the default value.

In summary, when verifying whether a property’s value is default in Visio, it’s essential to consider both the value itself and the formula associated with it. If the value matches the default value and the formula is “F=‘No Formula’”, then you can confirm that the property is set to its default value. If the value differs from the default value, the formula is not relevant in this case, as the value itself indicates it’s not a default setting.
Please check this sample file,Thanks.
sample.zip (17.4 KB)

1 Like

@philip.zhou Thanks for the clarification, it works perfectly. Appreciate it.

@Michel.Martinez
Thanks for following the suggested workaround and good know that your issue is sorted out now.
Please feel free to contact us in case you have further comments or questions.