# Pipe Network to Polylines with Object Data

**URL:** <https://forum.dynamobim.com/t/pipe-network-to-polylines-with-object-data/86840>\
**Category:** Civil 3D\
**Tags:** dynamo\
**Created:** [March 1, 2023, 8:05pm UTC](https://forum.dynamobim.com/t/pipe-network-to-polylines-with-object-data/86840 "2023-03-01T20:05:15Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![btillett](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/btillett/32/155302_2.png) [@btillett](https://forum.dynamobim.com/u/btillett)\
**Post date:** [March 1, 2023, 8:05pm UTC](https://forum.dynamobim.com/t/pipe-network-to-polylines-with-object-data/86840/1 "2023-03-01T20:05:15Z")

</div>

I hope you are all doing well.

Are there Dynamo nodes available to prepare a pipe network to be exported to a shp file with the needed information for analysis. Our SW group exports pipe networks to line/point shapefile format when we need to export for H&H modeling. Up to this point, we have been exporting pipe networks to SDF file format then to shapefile but it still doesn’t include a lot of the data associated with the pipes and structures (e.g. pipes in SDF format don’t have correct inverts as it utilizes the pipe springline elevation, and structures don’t have inverts just rim). I have experimented with may of the nodes from Camber, Civil 3D Tools, etc… and cannot seem to get the information… Pipe Name, Start, End inverts, Start, and End structure names, etc…, even if I found a node to show the correct information in a WATCH node, I am not sure how I would then go about creating line work from the points with the information “embedded”.

Autodesk’s export pipe network to shp file ([Export pipe network to SHP file from Civil 3D | Civil 3D | Autodesk Knowledge Network](https://knowledge.autodesk.com/support/civil-3d/troubleshooting/caas/sfdcarticles/sfdcarticles/Export-pipe-network-to-SHP-file.html)) directions have you first exporting to an sdf file. If the Dynamo script replaced (or created new linework) the pipes and structures with lines and points that had the needed information as object data or in a property set, it would dramatically simplify the process.

Any help would be appreciated.

Thank you,

Boris

---

<div class="post-metadata">

**Author:** ![hosneyalaa](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/hosneyalaa/32/100865_2.png) [@hosneyalaa](https://forum.dynamobim.com/u/hosneyalaa)\
**Post date:** [March 1, 2023, 9:15pm UTC](https://forum.dynamobim.com/t/pipe-network-to-polylines-with-object-data/86840/2 "2023-03-01T21:15:56Z")

</div>

Hi  
I think, you can start to toolkit  
Gis.Map, gis.mapfeature notes  
And shapefile type polyline

Can you attached example drawing

And finally shapefile you want

![IMG_٢٠٢٣٠٣٠٢_٠٠١٩٤٢](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/2/a2cb4b02ac544bcdbfe7167d793eeb62f265e376.jpeg)

---

<div class="post-metadata">

**Author:** ![hosneyalaa](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/hosneyalaa/32/100865_2.png) [@hosneyalaa](https://forum.dynamobim.com/u/hosneyalaa)\
**Post date:** [March 2, 2023, 4:45am UTC](https://forum.dynamobim.com/t/pipe-network-to-polylines-with-object-data/86840/3 "2023-03-02T04:45:07Z")

</div>

HI @btillett  
USE Command: \_ArcGISExportToFGDB

 ![22](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/6/06cf1eb1311750f449cdf08818332e09f8aea51a.jpeg)

YOU WILL GET ALL DATA

 ![3](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/5/153f7958665764309b531e78a994bbb024fe0c7a.jpeg)  
 ![11](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/7/c77aab082f744be7ec67d26ce441f4a16b14c8f9.jpeg)

IF YOU WANT TO CHANGE VALUE

 ![1111](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/1/41917856cd83b0e12b5edce802e4362ba912ad01.jpeg)

---

<div class="post-metadata">

**Author:** ![btillett](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/btillett/32/155302_2.png) [@btillett](https://forum.dynamobim.com/u/btillett)\
**Post date:** [March 2, 2023, 8:42pm UTC](https://forum.dynamobim.com/t/pipe-network-to-polylines-with-object-data/86840/4 "2023-03-02T20:42:10Z")

</div>

I would like to complete the task of making the shp files entirely from within Civil 3D. The FGDB export is not always importable and editable in Civil 3D. It seems to only import if you have InfraWorks installed.

The method we follow now is outlined in this video [Civil 3D Pipe Networks to ESRI Shapefiles - YouTube](https://www.youtube.com/watch?v=F021W1HV_vY)

Summary of the video:

1. We export to an SDF.  
Since the SDF reports the Center of the pipe as the Inverts new invert fields need to be added.
2. We connect to SDF using the Planning and Analysis workspace in Civil 3D and create Invertin2 [Invertin2 = Invertin - (inside diameter /2)] and invertout2 fields. Invertout2 uses same calculation as the in… [Invertout - (inside diameter /2)]
3. Export layer(s) data to sdf files Pipes.sdf, & Structures.sdf
4. MAPImport the Pipes.sdf and do not import the bad invert fields.
5. MapExport the sdf files to shp files.

DWG, attached. Upload does not take a zip file so not sure how to upload the shp file group.  
[PipeNetwork\_testing.dwg](https://forum.dynamobim.com/uploads/short-url/frOYhCAoE8HfzcHkP10HKuR4pZJ.dwg) (1.9 MB)

 ![1st Pipe Info](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/1/81bdb5294a0df610c185b24e06fcb984d1e9e7a3.jpeg)

---

<div class="post-metadata">

**Author:** ![geert.drijfhout](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@geert.drijfhout](https://forum.dynamobim.com/u/geert.drijfhout)\
**Post date:** [March 3, 2023, 11:15am UTC](https://forum.dynamobim.com/t/pipe-network-to-polylines-with-object-data/86840/5 "2023-03-03T11:15:28Z")

</div>

if no off-the-shelf solution suffits you may use something like in this post: [How to create shapefile from Dynamo](https://forum.dynamobim.com/t/how-to-create-shapefile-from-dynamo/86204)

Basically you have to dress up your shapefile and input and then return the points for geometry for the shape writer.

---

<div class="post-metadata">

**Author:** ![hosneyalaa](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/hosneyalaa/32/100865_2.png) [@hosneyalaa](https://forum.dynamobim.com/u/hosneyalaa)\
**Post date:** [March 3, 2023, 11:37am UTC](https://forum.dynamobim.com/t/pipe-network-to-polylines-with-object-data/86840/6 "2023-03-03T11:37:02Z")

</div>

> [@btillett](#):
>
> Upload does not take a zip file so not sure how to upload the shp file group

can be used Same this way to upload the shp file group

> [@Pipes and parcels of land](https://forum.dynamobim.com/t/pipes-and-parcels-of-land/86328/3):
>
> I added all the files to dropbox The pipe sometimes crosses two parcels of land and sometimes it does not. If it crosses then I need information about two parcels of land and if not then one.

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [March 3, 2023, 1:09pm UTC](https://forum.dynamobim.com/t/pipe-network-to-polylines-with-object-data/86840/7 "2023-03-03T13:09:24Z")

</div>

> [@btillett](#):
>
> Upload does not take a zip file so not sure how to upload the shp file group.

Add a ‘.txt’ after the zip and it should allow you to post.

---

<div class="post-metadata">

**Author:** ![btillett](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/btillett/32/155302_2.png) [@btillett](https://forum.dynamobim.com/u/btillett)\
**Post date:** [March 3, 2023, 1:15pm UTC](https://forum.dynamobim.com/t/pipe-network-to-polylines-with-object-data/86840/8 "2023-03-03T13:15:20Z")

</div>

Awesome idea… i have done that before, cannot believe it slipped my mind.  
[Pipes.zip.txt](https://forum.dynamobim.com/uploads/short-url/txTo4WY9YLZzrOFf4y9CgNc7C45.txt) (3.6 KB)  
[Structures.zip.txt](https://forum.dynamobim.com/uploads/short-url/dC6m3beiIXxLckZPD42cdj1iz28.txt) (3.3 KB)

---

<div class="post-metadata">

**Author:** ![geert.drijfhout](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@geert.drijfhout](https://forum.dynamobim.com/u/geert.drijfhout)\
**Post date:** [March 3, 2023, 3:39pm UTC](https://forum.dynamobim.com/t/pipe-network-to-polylines-with-object-data/86840/9 "2023-03-03T15:39:10Z")

</div>

Like this… thanks to @zachri.jensen for the elaborate PipeNetwork part of the Camber package!! Amazing how almost everything is covered. Only PartSizeName I couldn’t find so I went for a python node on that field.

Reminder: You have to install the pip installer and fiona and shapely for the shapewriter to work.  
[PipeNetworkToSHP.dyn](https://forum.dynamobim.com/uploads/short-url/9hX9SuA1POniJh55U9dJzO6ZRgF.dyn) (125.3 KB)

---

<div class="post-metadata">

**Author:** ![btillett](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/btillett/32/155302_2.png) [@btillett](https://forum.dynamobim.com/u/btillett)\
**Post date:** [March 7, 2023, 7:27pm UTC](https://forum.dynamobim.com/t/pipe-network-to-polylines-with-object-data/86840/10 "2023-03-07T19:27:53Z")

</div>

It took a bit to figure out how to install PIP, Fiona, and Shapely, but it is working now, and is awesome.

Much appreciated,

Boris
