ElementRelationShip.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. }
  21. /// <summary>
  22. /// 主体对象
  23. /// </summary>
  24. public string RelatingObject { get; set; }
  25. /// <summary>
  26. /// 标志关系是否由属性定义
  27. /// </summary>
  28. public bool IsProperty { get; set; }
  29. public void SetPropertyName(string propertyName)
  30. {
  31. PropertyName = propertyName;
  32. }
  33. public void SetElementType(TypeDefinition type)
  34. {
  35. PropertyName = type.GetDescription();
  36. }
  37. public string PropertyName { get; private set; }
  38. }
  39. }