/* ==============================================================================
* 功能描述:SagaCheck
* 创 建 者:Garrett
* 创建日期:2019/6/11 16:09:09
* ==============================================================================*/
using System;
using Autodesk.Revit.DB;
using SAGA.RevitUtils.Extends;
using ServiceRevitLib.Extend;
using ServiceRevitLib.Mode;
namespace ServiceRevitLib.DataCheck.Mode
{
///
/// SagaCheck
///
class ColumnCheck : CheckBase
{
public override void Check()
{
try
{
base.Check();
#region
var document = m_Doc;
var elements = document.GetElements(BuiltInCategory.OST_StructuralColumns);
foreach (FamilyInstance fi in elements)
{
var result = new ColumnCheckResult();
result.FamilyName = fi.GetFamilyName();
result.Id = fi.Id.ToString();
var roomBoundaries = fi.GetParameterInteger(BuiltInParameter.WALL_ATTR_ROOM_BOUNDING);
if (roomBoundaries == 1)
{
result.Result = ResultState.Success;
}
else
{
result.Result = ResultState.Failure;
result.ResultMsg = "柱的房间边界属性 未勾选";
}
Content.Add(result);
}
#endregion
}
catch (Exception e)
{
Result = ResultState.Failure;
ResultMsg = $"{e.Message}\r\n{e.StackTrace}";
}
}
}
}