[Help] Get all 3D polylines near an given Autocad point

Hi everyone,

I want to know, is it possible to get all 3D polylines near a given autocad point(not Cogo point)?

For my current work, I put a point presents as a manhole and there are several 3d polylines present as pipes and attached on it. I need to get the lowest elevation of those 3d polylines vertex as the outlet level of the point(manhole).

If it is can be done by dynamo, Please give me a help. Appreciate very much!

@Seanc9XFAH

I am not an expert but the crude way to do this would be to get X and Y coordinate of points
compare it with the polyline coordinate (Start or end point) Assuming the lines are terminated at point locations. so coordinates wll match after that check the Z elevation and pick the lowest elevation.

LowestElevation@point.dyn (34.8 KB)

Hope this helps.

1 Like

I would draw a circle around your point at whatever distance you deem as “near” and then check for intersecting polylines.

1 Like

Hi Shahid,

Appreciate so much for your help. Your model is working well when whole plan only existing one 3d Polyline and one point(manhole).

However, there is another story in my case. when I have many points and many 3Dpolylines, all of points under the same layers pick up the same lowest value to themselves.

For example, point A and Point B under the same layer, point C and point D are under the another same layer. And base on your scripts I got 4 values, “1”,“2”,“3”,“4”, as I have 4 pipes connect to four manholes, but the result is the pointA and B pick up value “1” , point C and D pick up value “2”. The correct result supposed be Point A picks up value “1”, Point B picks up value “2”, Point C picks up value “3”, point D picks up value “4” because values “1”, “2”, “3”, “4” are the lowest value for Point A,B,C,D.

I need to take these lowest values to fill up a table automatically. Therefore, it requires the values must to meet the relevant manholes.

Thanks again.

@Seanc9XFAH Could you drop relevant dwg file. It will help others who’s trying to help you.

Thanks for reminding this. The details has been attached.

Manhole Elevations.dwg (1.4 MB)

Property Dataset Manhole Bottom Elevation.dyn (242.9 KB)

Hi @Seanc9XFAH thanks for sharing the files, please find attached updated code, hope this helps.

LowestElevation@point.dyn (54.1 KB)

The excel output will look like this,
image

Hi Shahid,

Thank you for helping me to create this. The elevations in the excel that you have made, looks all right, but I have to show the right elevation in the field of Civil 3D object property dataset, shown as attached screen capture, rather than create an excel table. Sorry for confusing you.

Hi @Seanc9XFAH,
I am not from drainage background so apologies not aware of the nodes to set the invert of manhole but i am sure a quick search on forum will guide you there. rest the script will be useful to get the minimum elevation from 3D polylines at a manhole location.

So you want @shahid.shaikh_C3D script to update your OD data? Here’s my take; let me know if that’s what you’re looking for.

LowestElevation@point v2.dyn (68.7 KB)

1 Like

Hi Kirk,

Appreciate so much for this. If you have an another scripts I more than happy to refer it. Your modified scripts base on Shahid’s scripts is working, but only after I created the “OD:SWMHData” table.

Therefore, I have to run my scripts at the first time to create the “OD:SWMHData” table and then close the dynamo and open your modified scripts, click “Run” agian, if I want to create more new points and 3dpolylines. This is because of the “OD:SWMHData” is not exist in original property dataset for all new added objects.

I have tried to combine both scripts, but could not make it.

I have uploaded my current dynamo file and typed some notes on the screen captures for your reference. Appreciate agian.

Manhole Elevations.dwg (1.5 MB)

Property Dataset Manhole Bottom Elevation.dyn (269.9 KB)

Check this is out if you want to avoid running separate graphs.

Hi Mzjensen,

Thanks for trying to help. I am a new Dynamo user. Sorry for I did not make it by your scripts after I read the article you have attached. I am not sure what is the problem, I got an error when I simply copied your scripts to my code block. If it is possible, please help with the basic style scripts, which I can get some descriptions that help me to learn more about the Dynamo, from the scripts searching bar.

Thanks again.

What is the warning?