Split Element at Lenght?

ok…good news and bad news…
the code to make it work is pretty easy, but it does not work with cable trays… (works with beams, columns though)…
I think you might have some chances with making a script that would first do the copy and shorten trick and reconnect necessary elements…

# Enable Python support and load DesignScript library
import clr

clr.AddReference("RevitServices")
import RevitServices

from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

# The inputs to this node will be stored as a list in the IN variables.
elements = UnwrapElement(IN[0])
params = IN[1]

doc = DocumentManager.Instance.CurrentDBDocument

TransactionManager.Instance.EnsureInTransaction(doc)

for e,p in zip(elements,params):
	e.Split(p)

TransactionManager.Instance.TransactionTaskDone()

# Assign your output to the OUT variable.
OUT = 0
2 Likes