SystemComputerHandler.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*-------------------------------------------------------------------------
  2. * 功能描述:SystemComputerHandler
  3. * 作者:xulisong
  4. * 创建时间: 2019/1/17 9:42:03
  5. * 版本号:v1.0
  6. * -------------------------------------------------------------------------*/
  7. using System;
  8. using System.Collections.Generic;
  9. using System.IO;
  10. using System.Linq;
  11. using System.Text;
  12. using System.Threading.Tasks;
  13. using SAGA.MBI.Tools;
  14. namespace SAGA.GplotRelationComputerManage
  15. {
  16. public class SystemComputerHandler
  17. {
  18. public List<object> GetParseData(SystemComputerContext context)
  19. {
  20. List<object> items = new List<object>();
  21. var fileInfos = RevitModelPath.GetAllRevitFiles();
  22. foreach (var fileInfo in fileInfos)
  23. {
  24. if (File.Exists(fileInfo))
  25. {
  26. FloorSystemItem floorItems = context.FloorItems.GetItem(fileInfo);
  27. floorItems.Parse(context);
  28. floorItems.Document.CloseDocSimple();
  29. }
  30. }
  31. //最后统保存缓存数据
  32. return items;
  33. }
  34. }
  35. }