Importing 2D drawing coordinates to create Civil 3D objects with Dynamo

Hi,

I’m fairly new to Dynamo in Civil 3D. Appreciate all the help!

I need to translate coordinates of 2D object in AutoCAD into Civil 3D environment so that 3D objects reflecting those 2D drawings can be automatically created. As far as I understand Dynamo capability this should be pretty straight forward task.

Could anyone point me into the direction of any tutorials, examples, lisps, dynamo threads where achiving this is explained?

Much appreciated,
Matt.

Hi @maciek.olejniczak, welcome to the forum.

It would be helpful if you could go into a little more detail about what you’re trying to do. But here is a general process:

  1. Use Dynamo to select CAD objects, either by layer, by type, or explicit selection. Look at the “Selection” nodes under the AutoCAD or Civil 3D shelfs.

  2. Convert the CAD objects into Dynamo objects that can be manipulated in the Dynamo workspace. The Object.Geometry node works well for this.

  3. Do whatever needs done in Dynamo (eg. create new geometry, import/export data, assign property sets, etc.)

  4. Output what you did in Dynamo back into the host application (i.e. AutoCAD or Civil 3D). The Object.ByGeometry node is good for this.

Here is a simple example to illustrate selecting circles in CAD, extruding them as solids in Dynamo, and then outputting the result back to CAD.

Columns.dyn (28.2 KB)

Columns

Columns Dynamo

1 Like

That is very helpful thanks.

The actual issue I’m facing is a bit more complex hence I wanted to start with basic features.

I have a 2d drawing of polylines and squares with XY coordinates and a civil 3d model of ducts and chambers. I.m attempting to write dynamo script that would take those XY from 2D drawing and move/adjust corresponding 3D ducts and chambers (polylines - ducts, squares chambers), ideally maintaining the Z values that are already in the 3D file.

2D drawing contains layers for each line but there is no clear connection between corresponding elements in 2D and 3D. So I guess this is another issue to tackle.

Bottom line is to figure out how to read 2D coordinates to adjust existing 3D model and to do this how to create connection between both.

Many thank for such a quick reply @mzjensen !

Regards,
Matt

This is going to be the biggest challenge, especially if the 2D elements are in a separate drawing. Is it a possibility to generate the 3D models from the 2D linework in Dynamo instead of creating them separately and then shifting the coordinates?

Unfortunately it is not an option. But I think it might be actually easier to create a new 3D model first and then adjust the existing one manually comparing to 3D model rather than 2d drawings. I will play around with it a bit more and come back here if I can provide any more details or solutions. Many thanks for you help!

1 Like