I would like to expand it so that the tray can be automatically filled with multiple cables without overlaps. Currently I’m using the offset command in Revit to duplicate the cable paths multiple times and filling the cable tray.
The intended logic is:
Tray Inside Width + Tray Inside Height
↓
Cable Diameter
↓
Calculate Horizontal Positions
↓
Fill First Row of Tray
↓
Calculate Vertical Positions
↓
Add Additional Rows
↓
Create Cable Paths
Ideally, the inside width/height and cable diameter would be retrieved from Revit, but manual inputs would also be fine.
Is this practical to do in Dynamo? Also, would you integrate this into the existing cable tray script or handle the cable-filling calculation as a separate script?
I also wanted to share what I’ve come up with so far. I haven’t been able to fully solve the bend issue because, in real life, the conduits/cables can be bent quite tightly within the cable tray. However, the elbow fittings available in Revit introduce a larger bend radius than what would actually occur, which makes it difficult to accurately represent the routing.
One thing I really like about your script is the ability to select the cable tray directly. My main goal with my script was to tightly pack cables within a tray so I could determine the maximum number that can fit while avoiding overlaps.
At the moment, I’m a little stuck what is want is for the user to be able to simply select a conduit type, and the script will automatically retrieve the conduit’s diameter. That diameter would then be used both for cable placement and for calculating the offset distance between adjacent conduits and rows. I haven’t been able to figure out the best way to implement that yet, so any help would be greatly appreciated.
Hi @alyaan_h looks great so far, cheers…yay bend its about how fitting family is build…try share a small rvt with that, and can probably help…but no garanti there …haha
and PS if you mean cabletray fitting bend it is controlled by the cabletray itself in bend radius type parameter
@sovitek it wasn’t letting me share the Revit file as it was too big, but this is the AutoCAD path I’m using if u link this AutoCAD file to any Revit project it should work with the script. Don’t mind the vertical path, I’m biting off more than I can chew
I’m not sure why I’m unable to share the Revit file here. The file is less than 10MB but the site is not letting me upload. But for the families I’m using all Revit default stuff.
I was finally able to upload a Revit file here, and this is a brand-new document.
My goal is to use the AutoCAD path as a reference to automatically place cable trays in Revit, and then fill those cable trays with cables/conduits across both the width and height of the tray.
For the vertical rows, I’m planning to keep the script relatively simple. Instead of having one complex script automatically calculate and generate every row, I would like to have an offset input for each row. I can then duplicate the script for however many rows I need.
This approach will also allow me to independently change the conduit/cable type, size, spacing, and offset for each row, while keeping the overall Dynamo script much easier to manage and modify.
Your RVT file does not contain any cable trays. Start by completing your script to generate the cable trays, then use the cable trays to create the conduit runs.
I’ve already added the cable trays using my script. If you meant that the cable trays needed to be created in the model before running the conduit generation script, I had already done that as well. However, the script still does not work and produces the same issue.
Path Test 2.0.rvt (500 KB)
This file should have cable trays placed along a path. No fittings are loaded because if I do I’ll be unable to upload here
That’s the first step; you now need to generate the cable tray fitting (using doc.Create.NewElbowFitting(conA, conB)). Be careful—it seems there are some inaccuracies due to your DWG file.
Next, there will be an issue to resolve regarding the offsets on the vertical lines.
This is me running the script with the fittings. Still not sure what to do here. Really want to solve this, I know I’m close even with my script just having a hard time adding these final touches.
P.S this was done by manually placing the cable trays, so the CAD drawing shouldn’t be an issue