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

Free Support Forum - aspose.com

Diagram and Page "Shape Data" properties are cleared

Hi,

I am using Aspose.Diagram.Net v.21.4.0.
There is an issue with Document and Page “Shape Data” properties.
I am trying to access it with Page.PageSheet.Props, but a collection is always empty.
Also after just initializing a new Diagram object and saving a document, all of the mentioned properties are cleared.

Best Regards,
Oleg

@Oleg_Sh

Can you please share your sample Diagram file along with sample code snippet? Also, please try using Shape.InheritProps and let us know in case issue still persists.

Hi Asad,

I’ve sent you Visio examples in a private note.
In “Before” example you will be able to see that “Document” and “Page” shapesheets contain “Shape Data” section.
In “After” example there is no such section in “Document” and “Page” shapesheets.
I used a simple code to generate “After” example:
var diagram = new Diagram(filePath);
diagram.Save(filePath, SaveFileFormat.VSDX);

Note: I have an issue with just “Document” and “Page” properties, not Shapes.

@Oleg_Sh

Thanks for sharing the sample files.

We have logged a ticket as DIAGRAMNET-52075 in our issue management system to further investigate this scenario. We will look into details of this case and let you know as soon as the ticket is resolved. Please be patient and spare us some time.

We are sorry for the inconvenience.

@Oleg_Sh
Please try the latest fix 21.7.1. We have fixed this issue in the fix.
Thanks. 21.7.1.zip (6.8 MB)

Hi Philip,

I’ve tested this version and it has just a partial fix :

  1. Document “Shape Data” properties are still cleared
  2. Page “Shape Data” properties are present, but the values are cleared.

@Oleg_Sh

Thanks for your feedback. We have re-opened the ticket and will surely look into it according to your feedback. We will let you know once it is completely fixed.

@Oleg_Sh

This issue has been fixed in next hotfix 21.7.2.

We could not find this issue. The values of props are present.

Console.WriteLine(diagram.Pages[0].PageSheet.Props[0].Name);
Console.WriteLine(diagram.Pages[0].PageSheet.Props[0].Value.Val);

Please provide a screenshot of the second issue how values are cleared so that we can further proceed with it.

Hi Asad,

I’ve send you two diagram examples with “Before” and “After” result.
In my application I just used a following code to get values by name:
public static string GetPropertyValueByName(this PropCollection properties, string propertyName)
{
return properties.Cast().FirstOrDefault(p => p.Name == propertyName)?.Value?.Val;
}
There was no further edit of values as empty values were returned - except just one property that you will be able to see in “After” diagram.

@Oleg_Sh

Alright. We will get back to you soon after analyzing the provided details.

@Oleg_Sh

Please use 21.7.2 hotfix in which we have resolved the issue.

Hi Asad,

Thanks for this, but one issue still remains.
“Shape Data” prop value returns an empty value during runtime.
This can be reproduced only when SortIndex of a property has a value:
image.png (5.8 KB)

@Oleg_Sh

We will be fixing the issue and providing you a hotfix soon.

@Oleg_Sh

Can you please try AsposeDiagram21.7.3.zip (4.5 MB) and let us know if issue still persists?