Here is a quick update on the status of the daylighting analysis technology preview and some helpful advice for anyone trying to split a duct or pipe with taps.
The Daylighting Analysis for Revit technology preview free analysis period has been extended until March 31 or until a commercial version becomes available, whichever comes first.
Find out more and download the updated plug-in from the Daylighting Analysis for Revit Autodesk Labs page.
Question: I would like to split a Duct or a Pipe in a way that retains the intact Revit functionality.
The user interface provides a command to split walls via Modify > Split Element > Split with Gap.
How can I programmatically achieve something similar to split a duct or a pipe?
Answer: The Duct and Pipe classes do not provide any built-in split functionality.
Here are a discussion on splitting a duct or pipe from 2012 and an older one from 2009.
Response: Splitting a pipe by shortening it and then creating a new one for the other end works fine for simple cases.
However, what can I do if there are taps connected to it?
In that case, shortening the pipe will remove the connection between the tap and the pipe and cause errors.
Creating a new pipe at the old one's location will not automatically reattach the tap.
So how can I split a pipe or a duct that has taps attached to it?
Answer: As always, the Revit API will not provide any additional functionality beyond what you have in the user interface.
From the UI standpoint, one would need to:
Response: I accept that the API will not provide any additional functionality beyond what you have in the user interface.
However, besides the 'Split with Gap' functionality for walls, the UI also provides a 'Split Element' command that does work for Ducts and Pipes. Are you saying this functionality is available programmatically? If so, where can I find it, please?
Secondly, you suggest to remove the taps and then recreate them.
In the UI, the extend method will only create the tap again if it is also defined in the DuctType and if the Preferred Junction Type is set to Tap. Furthermore, another thing that needs to be taken into account is that certain parameters might be set for the duct or pipe. and all of these parameter values will need to be copied to the newly created segment as well.
The function 'Split Elements' provided by the user interface does all of this automatically: it will just split the Duct and add a union family in between. That is exactly what I would like to achieve programmatically as well.
Answer: Thank you for the clarification and sorry for the detour.
I am sorry to say that you are right in not finding that access and this functionality is currently not available through the API, so I submitted a wish list item on your behalf for it.