Revit 二次开发 获取构件的某一层材质

2023-12-22 13:54:28

如获取墙的结构材质:混凝土-现场浇筑混凝土

//拿到墙材质
WallType wallType = (walls[i] as Wall).WallType;
CompoundStructure wallCS = wallType.GetCompoundStructure();
CompoundStructureLayer wallLayer = wallCS.GetLayers().Where(r => r.Function == MaterialFunctionAssignment.Structure).FirstOrDefault<CompoundStructureLayer>();
ElementId wallMatId = wallLayer.MaterialId;
Material wallMat = doc.GetElement(wallMatId) as Material;

文章来源:https://blog.csdn.net/wula1994/article/details/135150529
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。