I am trying to create a dynamo script to automate the creation of pipe networks. Our company is a standard that we generate pipe networks for our dry utilities regardless of their SUE status. We typically show dry utilities 2.5 feet below existing ground until we confirm the exact location. Our typical workflow is as follows.
Copy polylines from the existing utility file
Create existing ground profiles
Generate profile views
Generate pipe networks from polylines
Project pipe networks to profile views
Adjust pipes in profile view as need it.
I can get the dynamo script to do steps 2-5 if I have only one polyline in the drawing. The question is, is it is possible to select multiple polylines? can dynamo do multiple objects in one run? Or may there is a different approach?
Another idea here is to skip the process of copying the Polylines in from the other file and just get the geometry directly from an XREF. You can do that using the Block.Objects node because an XREF is a Block Reference. Here’s an example to get all the Polylines from an XREF and then group them by layer.
Unless there is an explicit need to have the Alignments, Profiles, and Profile Views, I think these steps could be simplified. Here’s an example of sampling a Surface along the Polylines and then dropping the geometry down. From there you can create Pipes or Solids depending on what you need.
Hi @mzjensen, I believe in the near future we no longer be needing plans and only models; in the meantime, we typically project the existing utility crossings into the design profiles. I use alignments and profiles so later, when we get depth information, we can adjust the pipe networks.
I tried your script. I added the PipeNetwork node to create the pipes and it worked, however, it only created one pipe regardless of the vertices in the polyline. This is what I noticed about the pipe creation.
It creates one pipe ignoring the vertices on the polyline, however, the pipes are at elevation.
If I used Geometry.Explode node, explodes the vertical component not the horizontal component of the polyline and it adds lots of pipes, little segments and it drops the elevations to zero.
I have another script to create the pipes. The script works, it creates multiple pipes from multiple polylines. It adds all the pipes to one network. However, I get an error message in CAD “unable to run macro C:////… ApplyRule" therefore the all the pipes are at zero elevations.
Attached are the cad file and the two dynamo scripts. Is there a way you can look at them and see is what I am doing wrong. The goal is to create multiple pipes from multiple polylines and apply the ruleset so the pipes are at elevation.
first i want to thank you for your script and let me give you a hint for the cause of the problem you face,
this is because the pipes have not a reference surface consequently the program will not be able to apply rules.
I used this one and tried to create mapper (set corridor’s targets from xref) but it’s not work.
I just start with Dynamo so sorry for mistakes.
I would like upload but… “Sorry, new users can not upload attachments”