CableTray.ByLines output NULL

Hello everyone, I just started using Revit recently. I am trying to create a script to generate cable trays next to existing ones, but in the end, CableTray.ByLines returns null. I searched online for other methods, but due to version differences, I don’t have the element.types node, so on the level part, I can only get elementType and cannot get cabletrayType. My Revit version is 2026 and Dynamo is v.3.5.2. Could you please help me identify where I might have gone wrong that causes the script not to generate? Thank you.

post another screenshot with all List.Create outputs pinned perphaps? and the package name of CableTray.ByLines.

Hello BimAmbit, thank you for your reply. The picture shows all the nodes. The original plan was to select an existing cable tray, draw another line beside it, and then create a cable tray along this line (blue line). However, in the end, CableTray.ByLines output NULL, and the cable tray was not created as expected.

MEPover is the package of CableTray.ByLines.

Hi @bbkk5401 and welcome to the forum :wink: havent tried with mepover in 26, but guess it will work with right python engine, another could be nodes from openmep should work in 26,anyway instead of build the cabletray again, you could try copy by vector from clockwork

im unable to reproduce the problem. both engine (iron & c) work fine on my machine. but still, i would try switching engine first. then openmep ofc, it’s almost equivalent to mepover.

I’d also check your list structures. You have a lot of unnecessary List.Create nodes. You don’t need to “convert” something to a list if it already is one. Doing this is just adding another level to the data structure and the node may not be able to understand your data in that format. If you hover over a node’s input ports it will usually tell you the expected list structure. Make sure your data matches those structures.

Thank you all for your suggestions. I changed my Revit version to 2024 and switched the package to openMEP. Initially, when I ran the script automatically, the cursor kept spinning and it showed as “running” continuously. Later, I set it to manual execution, and it was able to successfully generate the cable tray. I sincerely appreciate the assistance from all the seniors.

1 Like

When Dynamo spins its wheels it can sometimes be because there is an open dialogue or command in Revit which is holding the Document to ransom. Sometimes it’s just busy grinding its gears. :person_shrugging:

Nice it could work, and an alternative with copy as probably could work as well in that situation