简体   繁体   English

使用Revit API的“分隔墙”

[英]“Split Wall” using Revit API

I have a wall and have to split it using Revit API. 我有一堵墙,必须使用Revit API对其进行拆分。 I have placement points as an input and need to split the wall based on those points. 我将放置点作为输入,需要根据这些点将墙分开。 Do we have any command to achieve this using Revit API? 我们是否有任何命令使用Revit API来实现?

Any help would be greatly appreciated. 任何帮助将不胜感激。

No there is no direct method for that. 没有,没有直接的方法。 You'll have to make a copy of your wall with ElementTransformUtils.CopyElement method, then move one point of the original and one point of the copy to the location of your split point. 您必须使用ElementTransformUtils.CopyElement方法创建墙壁的副本,然后将原始对象的一个​​点和副本的一个点移动到拆分点的位置。 To move the points, you have to create and assign a new curve to the wall location: 要移动这些点,您必须创建一个新曲线并将其指定给墙位置:

 ((LocationCurve)wall.Location).Curve = newCurve;

What do you mean by split wall? 隔墙是什么意思? You can split certain family instances, such as beams, columns, etc. using the FamilyInstance.Split method. 您可以使用FamilyInstance.Split方法拆分某些族实例,例如梁,柱等。 That does not apply to walls, however. 但是,这不适用于墙壁。 You can split faces on a wall to apply different materials. 您可以在墙上分割面以应用不同的材料。 For that, please refer to the FaceSplitter class. 为此,请参考FaceSplitter类。

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

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