FloorRecord.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*-------------------------------------------------------------------------
  2. * 功能描述:FloorFlag
  3. * 作者:xulisong
  4. * 创建时间: 2019/1/17 17:39:38
  5. * 版本号:v1.0
  6. * -------------------------------------------------------------------------*/
  7. using Autodesk.Revit.DB;
  8. using SAGA.RevitUtils.Extends;
  9. using System;
  10. using System.Collections.Generic;
  11. using System.Linq;
  12. using System.Text;
  13. using System.Threading.Tasks;
  14. using SAGA.DotNetUtils.Extend;
  15. namespace SAGA.GplotRelationComputerManage
  16. {
  17. /*
  18. * 整体上不采用树形结构存储
  19. */
  20. /// <summary>
  21. /// 楼层信息记录
  22. /// </summary>
  23. public class FloorRecord: ServerData
  24. {
  25. public string FloorId { get; set; }
  26. public string FloorName { get; set; }
  27. public string FloorIndex { get; set; }
  28. /// <summary>
  29. /// 楼层高度
  30. /// </summary>
  31. public double FloorLevelElevation { get; set; }
  32. /// <summary>
  33. /// 设置楼层信息
  34. /// </summary>
  35. /// <param name="level"></param>
  36. public void SetFloorLevel(Level level)
  37. {
  38. if (level == null)
  39. return;
  40. FloorName = MBIInfoUtil.GetFloorNameByLevel(level.Name)??string.Empty;
  41. FloorLevelElevation = level.ProjectElevation.FromApi();
  42. FloorId = level.Document.PathName.GetFileName();
  43. BuildingName = MBIInfoUtil.GetBuildingName(FloorId);
  44. BuildingId = MBIInfoUtil.GetBuildingId(FloorId);
  45. }
  46. }
  47. }