Since the Eyeshot proprietary file format can't read newer versions, it could be helpful to check the file version before proceeding to read it.
With Eyeshot 2023 you can check it with the below code.
int version = ReadFile.GetVersion(fileName); if (version > devDept.Serialization.Serializer.LastVersion) Console.WriteLine("Unsupported Eyeshot file version."); else Console.WriteLine($"Eyeshot file version is {version}.");
For the earlier versions of Eyeshot, you can use this code instead.
var header = ReadFile.GetHeader(fileName); if (header == null) Console.WriteLine("Unsupported Eyeshot file version.");
else
Console.WriteLine($"Eyeshot file version is {header.Version}.");
Comments
Please sign in to leave a comment.