zl程序教程

您现在的位置是:首页 >  其他

当前栏目

vs2015判断rvt版本详解编程语言

编程语言 详解 版本 判断 VS2015
2023-06-13 09:11:53 时间
string ss = GetRevitVision("E:/测试项目/mine/xx.rvt"); Console.WriteLine("REVIT文件版本:"+ ss); Console.ReadKey(); public static string GetRevitVision(string path) string revitVision = null; FileStream stream = new FileStream(path, FileMode.Open); int size = 1024 * 1024; byte[] bytes = new byte[size]; while (stream.Read(bytes, 0, size) 0) string str = Encoding.Unicode.GetString(bytes); string pattern = @"Autodesk Revit /d{4}"; var match = Regex.Match(str, pattern); if (match.Success) revitVision = match.Value.Substring(match.Length - 4, 4); break; return revitVision; }

运行结果

vs2015判断rvt版本详解编程语言

原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/20330.html

cjava