Robert
Robert

Reputation: 79

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

Upvotes: 1

Views: 2093

Answers (2)

Jeremy Tammik
Jeremy Tammik

Reputation: 8339

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.

Upvotes: 2

Maxence
Maxence

Reputation: 13329

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;

Upvotes: 2

Related Questions