Cogo points from AutoCAD points & OD

I have several shape file points that I have imported into Civil 3D as AutoCAD points that also have object data (OD) attached. I need to convert these AutoCAD points to cogo points and also include the OD items.

Is there a collection of nodes that will allow me to make this happen? I have some experience with Dynamo and I just want to know if this is possible. Any and all suggestions are welcome. Thank you for taking the time to read and I hope respond.

Something like this should get you going. I didn’t test it on sample data so you’ll probably have to adjust a little.

ODExample.dyn (31.1 KB)


Thank you so much! I owe you several beers sir! you got me 90% of the way there. I just had to add an additional set of nodes to take a specific OD record and input it as the point name.

1 Like

this is a better screenshot of the nodes I added. @mzjensen thank you again so much!

You’re welcome! Glad you got it working.

I hope my screenshot shows up.
I just tried your ODExample.dyn graph on a drawing containing AutoCAD Points with OD Numbers. It worked, creating COGO Points, after I put in the Table Name. I have some questions.

  1. How do you add the helpful titles on the colored rectangle collections?
  2. What are Dictionary Keys and Dictionary Values?
  3. What is a DBPoint?
  4. What is the difference between OdRecord.Create and OdRecord.SetValueByName?
    Thank you.

Select any group of nodes, then right-click and select “Add to Group”. Then double-click the title to edit it.

This should help:

A DBPoint is just AutoCAD’s internal name for a basic point object. So if you type POINT at the command line, you are creating a DBPoint.

An OD record is basically a row in the OD table, so there is an OD record for each object that has OD data ‘attached’ to it. The OdRecord.Create node essentially says “attach OD data to this object”, which in turn creates a record in the OD table. But after doing that, none of the OD values have actually been set - they will just be blank. So the OdRecord.SetValueByName node sets the values, just like if you were typing them in the Properties pane.


Thank you. Good explanations.

1 Like

Nice to see you popping into the Dynamo forum @Pointdump :+1:t3: welcome!

1 Like

Thanks Kirk. I’m just getting started. Been reading and watching videos.

1 Like

Hi Mike,
I’m trying to add OD to both Point Name and Description.
I can’t get your added Nodes to work. Can I get a screen shot of the Min, Max, and Step values you used in the Number and Integer Sliders?
Also, what does Flatten do?

Hi Zachri,
Thank you. Yup, I’ve been reading the Dynamo Primer non-stop for a week now. Every page. I just don’t understand much of it.
I’d really like to understand why Mike chose List.Flatten and what it does with your graph. It seems like such a simply thing, just add the OD to each COGO Point Name and Raw Description.
Dynamo holds such promise, but I don’t think I’m smart enough to even modify a graph.

1 Like

Of course you are! You just need some more practice.

One difference I see between your graph and the screenshot here is the lacing on the List.GetItemAtIndex node (check the lower right-hand corner). It’s a subtle thing but makes a big difference. The lacing is set to “Longest”, whereas in your example it is left set at the default of “Auto”. More on lacing here:

1 Like

Thank you. A key distinction indeed that I wasn’t paying attention to. I had wondered whether lacing was global or needed to be set for each node.

Hi, I would like to ask you about a problem i have that is related to this topic. I have in Civil 3D some polygons that I import from a SHP and I try to obtain the values of the attributes in Dynamo as you show, but all the values come out as 0. I would like to know if I am not extracting the information as I should or if there is some other way to do it.

I would be very grateful if any of you have any idea that could help me.