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

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

//拿到墙材质
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;

相关推荐

  1. Revit 开发过滤项目元素

    2023-12-24 20:40:03       58 阅读
  2. Revit开发-WPF ProgressBar 执行程序中显示进度条

    2023-12-24 20:40:03       33 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2023-12-24 20:40:03       99 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2023-12-24 20:40:03       107 阅读
  3. 在Django里面运行非项目文件

    2023-12-24 20:40:03       90 阅读
  4. Python语言-面向对象

    2023-12-24 20:40:03       98 阅读

热门阅读

  1. MySQL 5.7依赖的软件包和下载地址

    2023-12-24 20:40:03       72 阅读
  2. cmake官方demo学习整理

    2023-12-24 20:40:03       45 阅读
  3. Jekins实现自动化部署

    2023-12-24 20:40:03       67 阅读
  4. 设计模式-结构型模式

    2023-12-24 20:40:03       62 阅读
  5. vue2源码解析---v-model双向数据绑定

    2023-12-24 20:40:03       61 阅读
  6. Linux: 常见工具、命令使用集锦

    2023-12-24 20:40:03       46 阅读
  7. oracle如何自定义自增长序号字段

    2023-12-24 20:40:03       49 阅读