Actions disappeared after saving

Hello,
i have a shape with an action. But after saving the diagram to a vsdx file the action is disappeared.

Please use this code to reproduce it. Am I doing something wrong, or is it a bug?

Diagram diagram = new Diagram("ActiontestSupport.vsdx");

Aspose.Diagram.Page firstPage = diagram.Pages[0];
Aspose.Diagram.Shape shape = firstPage.Shapes[0];

foreach (Aspose.Diagram.Act act in shape.Acts)
{   
	Console.WriteLine("Act Name: " + act.Name);
	Console.WriteLine("Act Menu: " + act.Menu.Value);
}

diagram.Save("ActiontestSupport_Saved.vsdx", SaveFileFormat.Vsdx);

And please, no AI responses that do not address my specific example.

ActiontestSupport.zip (37,7 KB)

@sgruth

It appears that the actions associated with your shape are not being retained after saving the diagram to a VSDX file. This issue may stem from the specific properties of the shape or how the actions are defined.

Cause: The actions might not be properly defined or updated before saving, which can lead to them being lost in the saved file.

Solution: To address this issue, I recommend the following steps:

  1. Check Shape Properties: Ensure that the shape you are working with has the actions properly defined before saving. You can print out the actions to verify their existence.

  2. Use refreshData() Method: Before saving the diagram, call the refreshData() method on the shape. This will ensure that all properties, including actions, are updated correctly.

  3. Save Options: Verify that you are using the correct save options when saving the diagram. Explore the DiagramSaveOptions to see if there are any specific settings that need adjustment.

Here’s a modified version of your code that includes the refreshData() method:

Diagram diagram = new Diagram("ActiontestSupport.vsdx");

Aspose.Diagram.Page firstPage = diagram.Pages[0];
Aspose.Diagram.Shape shape = firstPage.Shapes[0];

// Print existing actions
foreach (Aspose.Diagram.Act act in shape.Acts)
{   
    Console.WriteLine("Act Name: " + act.Name);
    Console.WriteLine("Act Menu: " + act.Menu.Value);
}

// Refresh shape data
shape.RefreshData();

// Save the diagram
diagram.Save("ActiontestSupport_Saved.vsdx", SaveFileFormat.Vsdx);

Next Steps: After implementing these adjustments, check if the actions are still present in the saved file. If the issue persists, I recommend reaching out to Aspose support for further assistance, as it may indicate a bug.

Please let me know if you need any further help!

As expected, this did not solve the problem.

@sgruth
Thanks for the template file and sample codes.
After an initial testing, I am able to reproduce the issue as you mentioned by using your template file. I found the action is missing on the interface.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): DIAGRAMNET-53792

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

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