BIM World
A Professional BIM Learning Platform


How to Code and Set Splitting Points for Element Division in Revit Secondary Development

How to Code and Set Splitting Points for Element Splitting in Revit Secondary Development

When using the element splitting feature in code, the current approach relies on the built-in command PostableCommand.SplitElement. During execution, the user is prompted to select the splitting point, as shown in the image below. For pipelines, the connector automatically adjusts based on the splitting point to link the two resulting components.

However, the functionality we are developing aims to automatically split pipelines based on the floor plan elevation—without requiring user input to choose the splitting point. I would like to ask experienced developers if there is an API method that supports this automated splitting approach?

Solution:

The PickObject method includes an enumeration for object types, such as PointOnElement. Alternatively, you could list available elevations and allow the user to select an elevation at which to cut the pipe. Using the chosen elevation and the pipe’s line segments, the exact splitting point can be calculated. This approach enables you to determine splitting points programmatically based on elevation data.

xuebim
Follow the latest BIM developments in the architecture industry, explore innovative building technologies, and discover cutting-edge industry insights.
← Scan with WeChat
Like(0) 打赏
BIM WORLD » How to Code and Set Splitting Points for Element Division in Revit Secondary Development

Comment Get first!

Must log in before commenting!

 

BIM World, A Professional BIM Learning Platform

Stay updated on the latest architecture trends and share new building technologies.

Contact UsAbout Us

觉得文章有用就打赏一下小编吧

非常感谢你的打赏,我们将继续提供更多优质内容,让我们一起创建更加美好的网络世界!

支付宝扫一扫

微信扫一扫

Account Login

By signing in, you agree toUser Agreement

Sign Up