ElementRelationShip.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*-------------------------------------------------------------------------
  2. * 功能描述:ElementRelationShip
  3. * 作者:xulisong
  4. * 创建时间: 2019/6/18 14:57:08
  5. * 版本号:v1.0
  6. * -------------------------------------------------------------------------*/
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Linq;
  10. using System.Text;
  11. using System.Threading.Tasks;
  12. using JBIM;
  13. namespace RevitToJBim
  14. {
  15. public class ElementRelationShip
  16. {
  17. public ElementRelationShip()
  18. {
  19. IsProperty = true;
  20. RelatingObjectIsBimId = false;
  21. }
  22. public bool RelatingObjectIsBimId { get; set; }
  23. /// <summary>
  24. /// 主体对象
  25. /// </summary>
  26. public string RelatingObject { get; set; }
  27. /// <summary>
  28. /// 标志关系是否由属性定义
  29. /// </summary>
  30. public bool IsProperty { get; set; }
  31. public void SetPropertyName(string propertyName)
  32. {
  33. PropertyName = propertyName;
  34. }
  35. public void SetElementType(TypeDefinition type)
  36. {
  37. PropertyName = type.GetDescription();
  38. }
  39. public string PropertyName { get; private set; }
  40. }
  41. }