I am looking to convert 3D corridors into 2D using Dynamo.
The process that is followed in converting it using Civil 3D is as given below:
- Export Civil 3D drawing to AutoCAD drawing. (This file contains only corridor feature lines)
- Select all the elements in the exported file and set the Colors, Line Weight, and Line type to “ByLayer”.
- Convert the exported Corridor feature lines (which are 3D polylines here) into 2D.
- And set the elevation for all the elements in the model space as 0
- Delete the objects on the 0 layer.
- Purge unused Layers.
is it possible to do it with Dynamo? at least after step 2 mentioned above?
I am not sure about step 1, can’t think about any node that exists but maybe it can be done with python. Haven’t really tried.
For point 2 : you can use the Civil 3D toolkit - ObjectExtensions.SetParameterValueByName. I have had some trouble with the color but maybe someone here has some tip/trick
I will combine point 3 and 4 : Get the 3d polyline into dynamo (PolylineExtensions.GetGeometry) get the vertices, send them to the XY plane and create a polyline directly in Autocad by joining the points Polyline.ByPoints
Point 5 : Select all objects on layer 0 and use the Object.Delete node
Point 6 : I cannot think of any node that will let you delete layers but you can hide them or freeze them for example, change their name. Maybe with python you can also delete them
@Kaustubh_93 here’s another method. You could add some more nodes to assign the polylines to different layers, I’m just keeping it simple in this example.
Thank You. this was very useful.
I couldn’t set the parameter-colors but was able to extract the polylines and change the elevation to 0 by the process suggested by @mzjensen.
I could also delete the objects on 0 layer by node “all objects in layer”
wherein still searching the nodes to delete the unused layers.