Diagram.DocumentProps.TimeSaved incorrect for VSDM

Hello,

Diagram.DocumentProps.TimeSaved is incorrect for VSDM file type.

See attached. Expected:<31/03/2017 17:48:40>. Actual:<01/01/0001 00:00:00>.

Visio's Document.TimeSaved returns the correct value.

A VDX's Diagram.DocumentProps.TimeSaved seems fine.

Regards,

Andrew


Hi Andrew,


Thank you for contacting support. We managed to replicate the problem of incorrect date and time. It has been logged under ticket ID DIAGRAMNET-51213 in our bug tracking system. Your post has also been linked to this ticket. We shall keep you informed regarding any available updates. We are sorry for the inconvenience caused.

Hi Andrew,


Thank you for being patient. We have a good news for you that the ticket ID DIAGRAMNET-51213 has been resolved. If there is no issue in the quality assurance phase, then this fix will be included in the next version 17.4.0 of Aspose.Diagram for .NET API. We shall inform you via this forum thread as soon as the new release is published.

The issues you have found earlier (filed as DIAGRAMNET-51213) have been fixed in Aspose.Diagram for .NET 17.4.0.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

17.4.0 update: The initial value for TimeSaved is now correct, but calling Diagram.Save does not update the value for TimeSaved.

Hi Andrew,


Thank you for the inquiry. We can save the last modified date and time in the output drawing by calling the Save method of the Diagram class. The latest version 17.4.0 also retrieves the last modified date and time of the output VSDX drawing. Kindly let us know in which format you are saving the drawing output. Please also share the complete code. It will help us to replicate the problem on our side. Your response is awaited.

VSDM. Calling save does not update time saved.

Hi Andrew,

On setting TimeSaved value, and then saving drawing output in the VSDM format, the Save method of Diagram class does not update TimeSaved value. Aspose.Diagram API retrieves an old TimeSaved value from the drawing output.

[.NET, C#]
// load a drawing Diagram diagram = new Diagram(@"C:\Diagram\test2022\Output.vsdm");
// set TimeSaved value
diagram.DocumentProps.TimeSaved = DateTime.Now;
// save drawing in the VSDM format diagram.Save(@"C:\Diagram\test2022\Output.vsdm", SaveFileFormat.VSDM);

We have logged this problem under ticket ID DIAGRAMNET-51227 in our bug tracking system. We shall let you know once a significant progress has been made in this regard.

Hi Andrew,


Thank you for being patient. We have a good news for you that the ticket ID DIAGRAMNET-51227 has been resolved. If there is no issue in the quality assurance phase, then this fix will be included in the next version 17.5.0 of Aspose.Diagram for .NET API. We shall inform you via this forum thread as soon as the new release is published.

Hi Andrew,

Thank you for being patient. In reference to the ticket ID DIAGRAMNET-51227, please download and try this latest Hotfix version: Aspose.Diagram for .NET 17.4.1. Please also let us know how that goes on your side.

DIAGRAMNET-51227 is not resolved in 17.4.1 and I am still having to update TimeSaved manually on save.

Hi Andrew,


Thank you for the details. We have re-evaluated your ticket ID DIAGRAMNET-51227 in our working environment. Aspose.Diagram API is modifying the last modified field value under the Info tab. We have attached an output VSDM and a screenshot to this reply post. However, if this does not work in your working environment, then please prepare a small console application which reproduces this problem in your working environment and share its ZIP archive along with the details of your working environment. Your response is awaited.

See attached.

Hi Andrew,


Thank you for sending a sample project. Save method of Diagram class does not set the last modified field value. Kindly set last modified field value in the code before saving final VSDM as below:

[.NET, VB.NET]
<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>Using fileStream = New IO.FileStream(fileName, IO.FileMode.Open, IO.FileAccess.ReadWrite)<br style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”><span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”> Dim diagram As New Aspose.Diagram.Diagram(fileStream)<br style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”><span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”> Dim timeSaved As Date = diagram.DocumentProps.TimeSaved<br style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”><span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”> Console.WriteLine(“TimeSaved before save: {0}”, timeSaved)<br style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”><span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 0);”> diagram.DocumentProps.TimeSaved = DateTime.Now<br style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”><span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”> diagram.Save(fileStream, SaveFileFormat.VSDX)<br style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”><span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”> Console.WriteLine(“TimeSaved after save: {0}”, diagram.DocumentProps.TimeSaved)<br style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”><span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”> Console.WriteLine(“Has TimeSaved been updated?: {0}”, (timeSaved < diagram.DocumentProps.TimeSaved))<br style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre;”><span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>End Using
<span style=“font-family: “Courier New”, Consolas, Courier, monospace; font-size: small; white-space: pre; background-color: rgb(255, 255, 255);”>

Excuse my confusion, but wasn’t DIAGRAMNET-51227 meant to resolve it not being updated automatically at your end? If not, what was DIAGRAMNET-51227 logged for?

Regards.

Andrew


Hi Andrew,


Aspose.Diagram API was not saving the last modified field value in the output VSDM, since it has been fixed. Aspose.Diagram API offers Diagram.DocumentProps.TimeSaved property to retrieve or set the last modified field value.

I never experienced an issue setting TimeSaved and it persisting in 17.4.0 once the issue DIAGRAMNET-51213 was resolved. 17.4.1 remains the same.

Hi Andrew,


Thank you for the details. You are right because the ticket ID DIAGRAMNET-51213 was fixed in the version 17.4.0 and it remains same in the version 17.4.1.
andrew.ridgeley:
but wasn’t DIAGRAMNET-51227 meant to resolve it not being updated automatically at your end?
We have logged an enhancement under ticket ID DIAGRAMNET-51238 to auto save the last modified date and time in VSDM on calling Diagram.Save method. We will let you know once it is fixed. We are sorry for the inconvenience caused.

Hi Andrew,


Thank you for being patient. We have resolved the ticket ID DIAGRAMNET-51238. If there is no issue in the quality assurance phase, then this fix will be included in the next version 17.5 of Aspose.Diagram for .NET API. We will inform you via this forum thread as soon as the new release is published.

DIAGRAMNET-51238 resolved in 17.5