I have created dry utility networks for electrical Medium voltage, low voltage, telephone etc using pressure network pipes. I need to convert these to shape files to make it visible in infraworks. Please help.
I saw another dynamo script to convert pressure networks into feature lines but it does not convert all the pressure pipes to feature lines.
Are you wanting to export information for the fittings and appurtenances (assuming your networks have them), or are you wanting the curves that represent the pipes to join at each node? I ask because if you have fittings and appurtenances, the pipes do not share a common end point.
Are you wanting to export 2D geometry with embedded 3D information (invert, slope, etc.) or actual 3D geometry?
Are you also wanting to automate the export process to SHP files?
If all you’re looking for is to get the pipes into InfraWorks for visualization purposes (i.e. you don’t really need the data), you can add the DWG as an “AutoCAD DWG (3D Objects)” data source.
I am only trying to export Civil 3d Pressure (straight & curved) pipes without any fittings (bends, Tees, etc). The straight & cuved pipes represent LV, MV, Telephone cables and hence have curves and straight paths & also common nodes.
logically I just need to replace pipes with poly lines / polycurves which is I guess shape files. Eventually Infraworks will be able to read these shape files to generate the 3D pipe geometry . So to answer the 2nd question … i guess I just need to extract 3d geometry.
automatic export process to shp file will definitely be a awesome feature.
Use the PressurePipe.Curve node from the Civil 3D Toolkit to get the curves (lines and arcs) for the pipes. Then you could either add those to model space as feature lines and then explode them (which will create tessellated 3D polylines) or just tessellate them first in Dynamo and create 3D polylines directly using Polyline3D.ByPoints. It doesn’t matter when you do the tessellation, but it will have to happen at some point in the process because InfraWorks can’t handle true curved pipes anyway.
You could look at my code here to try and automate the MAPEXPORT process.
I haven’t tried this, but another option might be to use the PressurePipe.Curve2D node to get 2D lines and arcs, and then include the start and end elevations in the shapefile export (probably via OD data). Then map those values to the start and end elevations for the features in the InfraWorks data source settings. Then the tessellation would be handled directly in InfraWorks.
Currently I am working in a script to export pressure networks (geometry and data) to shapefile file.
Pressurepipes is previously converted to AutoCAd 2D lines/arcs without elevation (z=0), fittings/appurtenances is previouly converted to AutoCad points with elevation data (z<>0).
All data is reading from part properties (Content Catalog Editor) then attached to te lines/arcs/points like OD tables.
Finally I want to export it (mapexport command)
I have some questions. I will ask one at a time. First one:
I use the PressurePipe.Curve2D node (Civil3DToolkit) to obtain the Dynamo 2D geometry (arcs for curved pipes, lines for straight pipes). Then I use Object.ByGeometry node (Dynamo default nodes) and Arc.ByGeometry node (Civil3DToolkit) respectly, to obtain AutoCad Lines/Arcs from Dynamo geometry.
So far everything seems to be going well, but arcs of length zero with center point 0,0,0 are created !!!
What you suggest works but it is not the best solution. it take more time to run, and then I need to explode two times the featurelines to obtain lines and arcs (Mapexport command does not accept featurelines, but it does accept lines, arcs and polylines.)
Using Civil3DToolkit Arc.ByGeometry node works, but some Arcs with zero length and 0,0,0 central point are created too!!! Then I need to delete it (not an elegant solution). I don’t understand what I’m doing wrong.
I also tried to make a DesignScript node whit some conditional statement and for loop to filter the objects that will then pass through the Arc.ByGeometry node, but no arcs was created!!! What is wrong with my code???