Dynamo Staking drawing script

Hi, I’m working o

n a Dynamo script to help our survey team with staking drawings. It has been working well, but I am running into a roadblock.

Here is the basic workflow.

1 > Get Objects on Layer
2 > Get coordinates for each type of object. So we have a list of coordinates
3 > Filter the coordinates sorting from lower left to upper right
4 > Prune duplicates. So if we have objects (lot lines) forming a ‘T’ we get one point instead of three.
5 > Now I can go to cogo.point.by.geometry and create my cogo points

Here is where I have an issue. I would like to include multiple layers in step 1 and have each of those link to a different description. I don’t see a great way to do that. I wanted to get an object’s layer at an xy coordinate but I don’t see a way to do that.


Hi @bstrandberg,

You can just feed in a list of layer names at the beginning to select objects on multiple layers, like this:

However, handling the duplicates is going to be tricky. For the lot line intersection that you described above, how will you determine the description for that point? If the intersecting lines are on different layers, then there are two possible answers.


Completely agree I can feed it a list of layer names at the front. But we are putting all of those into a single bucket of points and having each of those layers come out with a separate description is the sticky part for me. In your example above we would want the ditch and the gravel to be separate cogo point descriptions.

I can duplicate my entire script and give each a different layer / cogo point description, but that isn’t very elegant. Trying to find a better approach.

Thanks for the suggestion! I like several aspects of your graph.

Like this? At intersection points, the order of precedence will be in the order of the input layers. So in the first example, the point at the intersection of a lot line and ROW is first given a description of “Lot” because C-PROP-LOTS is higher in the list. Then I change the order of the inputs so that ROW is given precedence.

StakingExample.dwg (772.5 KB)
StakingExample.dyn (334.1 KB)



Thanks. I’m reviewing the script now to see what more I can learn. This seems to be similar to the issues I run into I’m working on steps 1-4 fine, but then I run into a roadblock.

Have a great day, and a big thanks.