简体   繁体   中英

“Split Wall” using Revit API

I have a wall and have to split it using 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?

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. 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. 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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