简体   繁体   English

使用 Revit api 2020 的 Revit API 壁厚

[英]Revit API wall Thickness using Revit api 2020

I am working at revit api to get walls of special room this is the part i have completed with Projecting rays technique.我在 revit api 工作以获得特殊房间的墙壁,这是我使用投影光线技术完成的部分。 This is the main point that i am unable to do Wall thickness .这是我无法做壁厚的要点。 Is there any way i can extract wall thickness.有什么办法可以提取壁厚。 i am using revit 2020. Thank you我正在使用 revit 2020。谢谢

Sure, very easy.当然,非常容易。

Use the WallType Width property .使用WallType Width属性

You could very easily have answered this question by yourself, either by searching the Internet or by exploring the wall and its properties using RevitLookup .您可以很容易地自己回答这个问题,无论是通过搜索 Internet 还是使用 RevitLookup 探索墙及其属性

Please perform some minimal research for yourself before asking a question and making others do the work for you.在提出问题并让其他人为您完成工作之前,请先为自己进行一些最少的研究。

Here is some more advice on researching how to solve a Revit API programming task .以下是有关研究如何解决 Revit API 编程任务的更多建议

It is from a year ago but here is a code snippet :这是一年前的,但这里有一个代码片段:

        WallType wallType = document.GetElement(wall.GetTypeId()) as WallType;
        double nativeWitdh = wallType.Width;
        double milimeterWidth = UnitUtils.ConvertFromInternalUnits(nativeWitdh,DisplayUnitType.DUT_MILLIMETERS);

You can use the very handy UnitUtils class from Revit for all your conversions.您可以使用 Revit 中非常方便的 UnitUtils 类进行所有转换。

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

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