简体   繁体   English

如何使用 Revit api 获取墙层材质颜色

[英]How to Get the wall layer material color using Revit api

I am trying to retrieve the colors of wall layers but when I use Material.Color method I only get RGB value(117,117,117) but the RGB value in revit is 0,255,0 How I get this exact value in code我正在尝试检索墙层的 colors 但是当我使用 Material.Color 方法时,我只得到 RGB 值(117,117,117)但 revit 中的 RGB 值是 0,255,0 我如何在代码中得到这个确切的值

Material materialColor = material.Color;材料材料颜色=材料。颜色;

Can it possible to get the color of material layers for wall element.是否可以获得墙元素的材料层的颜色。

try the builtInParameter.MATERIAL_PARAM_COLOR尝试 builtInParameter.MATERIAL_PARAM_COLOR

then you get RGB value with the properties https://www.revitapidocs.com/2020/c0ce7b93-3ff1-4194-914e-e4ca7cb771d1.htm然后您将获得具有属性https://www.revitapidocs.com/2020/c0ce7b93-3ff1-4194-914e-e4ca7cb771d1.htm的 RGB 值

Revit provides an entire hierarchy of control mechanisms to determine the material and colour of an element. Revit 提供了一个完整的控制机制层次结构来确定元素的材质和颜色。 Therefore, you may need to determine what property is contriolling that specific wall's specific layer's specific colour.因此,您可能需要确定控制特定墙的特定层的特定颜色的属性。 The Building Coder provides a topic group on controlling element colour and material that ought to tell you all you need to know. Building Coder 提供了一个关于控制元素颜色和材料的主题组,它应该告诉你所有你需要知道的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM