# Revit/Dynamo – Tunnel Modelling by sweep

**URL:** <https://forum.dynamobim.com/t/revit-dynamo-tunnel-modelling-by-sweep/106059>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [November 23, 2024, 2:12pm UTC](https://forum.dynamobim.com/t/revit-dynamo-tunnel-modelling-by-sweep/106059 "2024-11-23T14:12:12Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![TLUK](https://avatars.discourse-cdn.com/v4/letter/t/b19c9b/32.png) [@TLUK](https://forum.dynamobim.com/u/TLUK)\
**Post date:** [November 23, 2024, 2:12pm UTC](https://forum.dynamobim.com/t/revit-dynamo-tunnel-modelling-by-sweep/106059/1 "2024-11-23T14:12:12Z")

</div>

Hi,

First of all, I’m new to Dynamo, and this is one of my first scripts.  
I have an Excel document with coordinates I have taken from Civil 3D. I’m bringing them into Dynamo, and then I want to create a sweep along those coordinates with a tunnel profile I have created.

The problem I’m having is that Dynamo is not generating the sweep with the script I have made. I also don’t want the sweep to rotate along the path. (If you use a sweep in Revit along a sloped, bendy path, it rotates the sweep about the line slightly.)

Would anyone be able to give me some pointers, please?

We transfer link below has the Dynamo file, excel file and RVT family im trying to use as I couldn’t upload them.

> **[Tunnel Sweep & profile.dyn](https://wetransfer.com/downloads/a6fa205719b483076d55093c6166453820241123132054/cfbfd4?t_exp=1732627254&t_lsid=4cc8c3ac-a9bb-4143-848b-dea0f2f6a82c&t_network=link&t_rid=ZW1haWx8Njc0MWQ2YjZiNjM1NTFjNmY2ZmI1NGQz&t_s=download_link&t_ts=1732368076)**
>
> 3 files sent via WeTransfer, the simplest way to send your files around the world

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [November 24, 2024, 8:25am UTC](https://forum.dynamobim.com/t/revit-dynamo-tunnel-modelling-by-sweep/106059/2 "2024-11-24T08:25:53Z")

</div>

Hi @TLUK and welcome…many ways it can be done i think…here is one, just a fast exemple…where i try get the curves from profile family and transform the coordinate system

 ![Skærmbillede 2024-11-24 092307](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/f/4fce61af3561a31906f8b58360acca7bd32243e7.png)

you can get the curves this way here

> [@Trouble with PolyCurve By Profile Family Type](https://forum.dynamobim.com/t/trouble-with-polycurve-by-profile-family-type/6591/7):
>
> Hi all - thanks a lot for the effort - I’ll try to get that running (on the road and busy…) - but so I tryed to retype the code and and it stll does not want to work for me… import clr clr.AddReference(‘ProtoGeometry’) from Autodesk.DesignScript.Geometry import \* Import ToDSType(bool) extension method clr.AddReference(“RevitNodes”) import Revit clr.ImportExtensions(Revit.Elements) Import DocumentManager and TransactionManager clr.AddReference(“RevitServices”) import RevitServices from R…

Thanks to @Kulkul😉

---

<div class="post-metadata">

**Author:** ![TLUK](https://avatars.discourse-cdn.com/v4/letter/t/b19c9b/32.png) [@TLUK](https://forum.dynamobim.com/u/TLUK)\
**Post date:** [November 25, 2024, 12:07pm UTC](https://forum.dynamobim.com/t/revit-dynamo-tunnel-modelling-by-sweep/106059/3 "2024-11-25T12:07:32Z")

</div>

Thank you for your help!

---

<div class="post-metadata">

**Author:** ![LasmaDzintare](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/lasmadzintare/32/200204_2.png) [@LasmaDzintare](https://forum.dynamobim.com/u/LasmaDzintare)\
**Post date:** [December 19, 2024, 11:21am UTC](https://forum.dynamobim.com/t/revit-dynamo-tunnel-modelling-by-sweep/106059/4 "2024-12-19T11:21:16Z")

</div>

Hi @sovitek I am a road engineer and I’m trying to adapt your dyn for Civil 3D to make road markings (firstly create continuous solid along 3dpolyline and then I’m gonna try to find a way to splice it in intervals and delete every 2nd). But I got stuck at two code blocks - there is an error, that polycurve and coordinate system cannot be used as input data here. I have attached my screenshot and wetransfer link: [Unique Download Link | WeTransfer](https://we.tl/t-BJVrJplPgn)

Do you have any suggestions on why the script isn’t working for me? I am very much a beginner in Dynamo

 ![20241219_3D_RoadMarking_2024-12-19_01-07-42](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/4/0407f2e9484df8f965ddfd4a13340643e4d64061.png)

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [December 19, 2024, 11:47am UTC](https://forum.dynamobim.com/t/revit-dynamo-tunnel-modelling-by-sweep/106059/5 "2024-12-19T11:47:41Z")

</div>

Hello @LasmaDzintare and welcome 😉 yeah basicly it should work there as well, but dont do so much in c3d, guess you have better luck with create a new topic, in categori C3D and share your material there as well and im sure some of these guys can help 🙂

---

<div class="post-metadata">

**Author:** ![LasmaDzintare](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/lasmadzintare/32/200204_2.png) [@LasmaDzintare](https://forum.dynamobim.com/u/LasmaDzintare)\
**Post date:** [December 19, 2024, 12:13pm UTC](https://forum.dynamobim.com/t/revit-dynamo-tunnel-modelling-by-sweep/106059/6 "2024-12-19T12:13:54Z")

</div>

Thank you, I will do so!

---

<div class="post-metadata">

**Author:** ![LasmaDzintare](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/lasmadzintare/32/200204_2.png) [@LasmaDzintare](https://forum.dynamobim.com/u/LasmaDzintare)\
**Post date:** [December 19, 2024, 1:05pm UTC](https://forum.dynamobim.com/t/revit-dynamo-tunnel-modelling-by-sweep/106059/7 "2024-12-19T13:05:07Z")

</div>

@sovitek Can you please share your original dyn file (the link has expired) - maybe I connected some wires with the wrong node, it is hard to tell from the picture.

---

<div class="post-metadata">

**Author:** ![sovitek](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/sovitek/32/116237_2.png) [@sovitek](https://forum.dynamobim.com/u/sovitek)\
**Post date:** [December 19, 2024, 2:07pm UTC](https://forum.dynamobim.com/t/revit-dynamo-tunnel-modelling-by-sweep/106059/8 "2024-12-19T14:07:27Z")

</div>

sorry dont have it anymore but here is something you can play around with,but build with a curve from revit…probably another way in c3d maybe… and i recommend go through primer if you are very new…

 ![Skærmbillede 2024-12-19 104026](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/3/b3bdfe82c0f451096d66567d3ce154a4d090fd2b.png)

[forum loft.dyn](https://forum.dynamobim.com/uploads/short-url/dmZSHCScn92GuH4GKC7XZrsIlVL.dyn) (63.8 KB)

or try with coordinate system by point, but sometimes i have issue with direction with that depends on the path nurbscurve how much its skew, the most stable for me is actuelly tangent at parameter and normal and vector cross…but probably just me 😉

 ![forum loft_2024-12-19_04-13-10](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/e/ce0a1bf37c099e6b3aaec987633b5510c8a9719b.png)

---

<div class="post-metadata">

**Author:** ![LasmaDzintare](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/lasmadzintare/32/200204_2.png) [@LasmaDzintare](https://forum.dynamobim.com/u/LasmaDzintare)\
**Post date:** [December 19, 2024, 6:42pm UTC](https://forum.dynamobim.com/t/revit-dynamo-tunnel-modelling-by-sweep/106059/9 "2024-12-19T18:42:23Z")

</div>

Thank you very much
