Ottieni le proprietà del documento
Contents
[
Hide
]
VSTO
Di seguito è riportato il codice per mostrare come ottenere le proprietà del documento diagram:
MessageBox.Show(Application.ActiveDocument.Version.ToString());
MessageBox.Show(Application.ActiveDocument.BuildNumberCreated.ToString());
MessageBox.Show(Application.ActiveDocument.BuildNumberEdited.ToString());
MessageBox.Show(Application.ActiveDocument.TimeCreated.ToString());
MessageBox.Show(Application.ActiveDocument.TimeEdited.ToString());
MessageBox.Show(Application.ActiveDocument.TimePrinted.ToString());
MessageBox.Show(Application.ActiveDocument.TimeSaved.ToString());
Aspose.Diagram
Di seguito è riportato lo snippet di codice per mostrare come vengono visualizzate le proprietà di diagram:
//Call the diagram constructor to load diagram from a VDX file
Diagram vdxDiagram = new Diagram("Drawing1.vdx");
//Display Visio version and document modification time at different stages
Console.WriteLine("Visio Instance Version : " + vdxDiagram.Version);
Console.WriteLine("Full Build Number Created : " + vdxDiagram.DocumentProps.BuildNumberCreated);
Console.WriteLine("Full Build Number Edited : " + vdxDiagram.DocumentProps.BuildNumberEdited);
Console.WriteLine("Date Created : " + vdxDiagram.DocumentProps.TimeCreated);
Console.WriteLine("Date Last Edited : " + vdxDiagram.DocumentProps.TimeEdited);
Console.WriteLine("Date Last Printed : " + vdxDiagram.DocumentProps.TimePrinted);
Console.WriteLine("Date Last Saved : " + vdxDiagram.DocumentProps.TimeSaved);
Console.ReadLine();