简体   繁体   English

如何在 Revit 中使用 Revit API 在所有其他墙壁中沿特定轴 select 墙壁?

[英]How do I select walls along a particular axis, among all the other walls, in Revit using the Revit API?

I want to change the height of all walls but the length of walls only in a particular axis, for instance, along the x-axis.我想更改所有墙壁的高度,但仅在特定轴上更改墙壁的长度,例如沿 x 轴。

Consecutively, could you also tell how I could alter the similar dimensions for a house?连续,你能告诉我如何改变房子的相似尺寸吗? Where there are connected walls?哪里有相连的墙?

I see nothing in this code that means it does not work.我在这段代码中看不到任何东西,这意味着它不起作用。

However, it seems to me that it does not make much sense.但是,在我看来,这并没有多大意义。

One would seldom constrain all wall heights to be user defined to a certain value;很少有人将所有墙壁高度限制为用户定义的某个值; instead, in most Revit models, walls are constrained to reach from a bottom level to a top level.相反,在大多数 Revit 模型中,墙被限制为从底层延伸到顶层。 Then, if the height of all walls needs to be modified, you would modify the elevation of the top level only.然后,如果需要修改所有墙壁的高度,您将只修改顶层的标高。

The logic of the code guarantees that the wall location line will only be modified if the newWallLine equals XYZ.BasisX .代码的逻辑保证只有在newWallLine等于XYZ.BasisX时才会修改墙壁位置线。 This may never be the case, since the line is a Line object and the vector an XYZ .这可能永远不会发生,因为线是Line object 而向量是XYZ

I would recommend researching exactly what you wish you achieve and how to do so manually in the end user interface before addressing the task programmatically.我建议在以编程方式解决任务之前,准确研究您希望实现的目标以及如何在最终用户界面中手动完成。

In general, if a feature is not available in the Revit product manually through the user interface, then the Revit API will not provide it either.通常,如果 Revit 产品中无法通过用户界面手动提供某项功能,则 Revit API 也不会提供该功能。

You should therefore research the optimal workflow and best practices to address your task at hand manually through the user interface first.因此,您应该研究最佳工作流程和最佳实践,以首先通过用户界面手动解决您手头的任务。

To do so, please discuss and analyse it with an experienced application engineer, product usage expert, or product support.为此,请与经验丰富的应用工程师、产品使用专家或产品支持人员讨论和分析。

Once you have got that part sorted out, it is time to step up into the programming environment.一旦你把那部分整理好,就该进入编程环境了。

I hope this clarifies.我希望这可以澄清。

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

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