前言
与建筑模型中的其他基本图元类似,墙也是预定义系统族类型的实例,表示墙功能、组合和厚度的标准变化形式。
墙的定位线
对应的 API 枚举:
namespace Autodesk.Revit.DB
{
public enum WallLocationLine
{
WallCenterline,
CoreCenterline,
FinishFaceExterior,
FinishFaceInterior,
CoreExterior,
CoreInterior
}
}
墙的功能
“基本墙”和“叠层墙”族中的所有墙类型都具有名为“功能”的类型属性。
指定下列值之一:内墙、外墙、基础墙、挡土墙、檐底板、核心竖井。
在 Revit 中体现为墙的类型参数:
对应的 API 枚举:
namespace Autodesk.Revit.DB
{
public enum WallFunction
{
Interior,
Exterior,
Foundation,
Retaining,
Soffit,
Coreshaft
}
}
墙的用途
“基本墙”族中的所有墙类型都具有名为“结构用途”的实例属性,该属性指定墙为承重墙、剪力墙或复合结构墙。
对应的 API 枚举(注意是在Autodesk.Revit.DB.Structure):
namespace Autodesk.Revit.DB.Structure
{
/// <since>
/// 2011
/// </since>
/// <summary>
/// Represents the structural usage of a wall.
/// </summary>
/// <since>
/// 2011
/// </since>
// Token: 0x02001C82 RID: 7298
public enum StructuralWallUsage
{
NonBearing,
Bearing,
Shear,
Combined
}
}
内嵌墙
可以建两堵墙,通常是实体墙和幕墙,位置重叠,然后用剪切几何图形的方法做成内嵌墙。
搜了一下网络,没有发现合适的 Revit API 解决方案。
尝试用 SolidSolidCutUtils.AddCutBetweenSolids
发现不支持。
搜 Revit Forum,有人问了这个问题,只有一个 workround,幕墙嵌板的方式:
//you need to get your wall Type Id
// Assuming your embeded wall type Id is 198367
var walltype = new FilteredElementCollector(doc).WhereElementIsElementType().OfClass(typeof(WallType)).Where(o => o.Id.IntegerValue == 198367).First() as WallType;
//Select the Panel you want to change
//hit Tab Key to navigate Selections for subelements
Reference refsel = uiDoc.Selection.PickObject(ObjectType.Subelement, "Select Curtain Wall");
var _panel = doc.GetElement(refsel.ElementId);
//open document transacation and change Curtain Panel walltype to the one you prefer.
using (Transaction trans = new Transaction(doc))
{
trans.Start("Change Type");
_panel.ChangeTypeId(walltype.Id);
trans.Commit();
}