# Touch base with Python in dynamo for civil 3d

**URL:** <https://forum.dynamobim.com/t/touch-base-with-python-in-dynamo-for-civil-3d/70940>\
**Category:** Civil 3D\
**Tags:** python, dynamo, civil3d\
**Created:** [December 1, 2021, 7:20am UTC](https://forum.dynamobim.com/t/touch-base-with-python-in-dynamo-for-civil-3d/70940 "2021-12-01T07:20:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![MohamedR.Nasreldeen](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@MohamedR.Nasreldeen](https://forum.dynamobim.com/u/MohamedR.Nasreldeen)\
**Post date:** [December 1, 2021, 7:20am UTC](https://forum.dynamobim.com/t/touch-base-with-python-in-dynamo-for-civil-3d/70940/1 "2021-12-01T07:20:40Z")

</div>

Hi  
Any direction to a start point of learning how to write python code in dynamo for civil 3d?

thanks

---

<div class="post-metadata">

**Author:** ![hosneyalaa](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/hosneyalaa/32/100865_2.png) [@hosneyalaa](https://forum.dynamobim.com/u/hosneyalaa)\
**Post date:** [December 2, 2021, 8:15pm UTC](https://forum.dynamobim.com/t/touch-base-with-python-in-dynamo-for-civil-3d/70940/2 "2021-12-02T20:15:45Z")

</div>

Hi  
This page explains, but in C# language

There is a video on YouTube about it in Python but in Russian

[https://help.autodesk.com/view/CIV3D/2021/ENU/?guid=GUID-DE3A46DA-508E-43A0-8538-C77D978D06B2](https://help.autodesk.com/view/CIV3D/2021/ENU/?guid=GUID-DE3A46DA-508E-43A0-8538-C77D978D06B2)

 ![Screenshot_20211202-231041](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/c/dce61b5c932a3cf8224e4eebc9435a99d5e02197.png)

---

<div class="post-metadata">

**Author:** ![MohamedR.Nasreldeen](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@MohamedR.Nasreldeen](https://forum.dynamobim.com/u/MohamedR.Nasreldeen)\
**Post date:** [December 7, 2021, 11:38am UTC](https://forum.dynamobim.com/t/touch-base-with-python-in-dynamo-for-civil-3d/70940/3 "2021-12-07T11:38:40Z")

</div>

@zachri.jensen any references ?

---

<div class="post-metadata">

**Author:** ![david\_licona](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/david_licona/32/123672_2.png) [@david\_licona](https://forum.dynamobim.com/u/david_licona)\
**Post date:** [December 7, 2021, 10:06pm UTC](https://forum.dynamobim.com/t/touch-base-with-python-in-dynamo-for-civil-3d/70940/4 "2021-12-07T22:06:54Z")

</div>

For me there are basically 3 things to learn here :

- Python - there are many courses on LinkedIn, Coursera, EDX, Udemy, etc. to learn the basics of programming plus the [Python Primer](https://dynamopythonprimer.gitbook.io/dynamo-python-primer/)
- AutoCAD API
- Civil 3D API

For this two, best thing to do is look at the posts in this forum and see the code that has been posted. Like this one : [Run DYnamo Script on entire folder of dwg's - #11 by Paolo\_Emilio\_Serra1](https://forum.dynamobim.com/t/run-dynamo-script-on-entire-folder-of-dwgs/53723/11)

Personally, I’ve found that the trickiest thing is to navigate the API (particularly AutoCAD’s) to find the class/method /property that you’re looking for but there are many examples in other forums especially with C# that show you the logic needed. After, it is just a matter of syntax.

My recommendation is to first learn the basics of Python (could take a couple of weeks or months depending on your previous experience and the time you can dedicate to it) and then try to tackle a specific problem. You can get inspiration from this forum, for example solving this using the View class : [Zoom to a specific location in model space - #2 by david\_licona](https://forum.dynamobim.com/t/zoom-to-a-specific-location-in-model-space/70701/2)

---

<div class="post-metadata">

**Author:** ![mzjensen](https://avatars.discourse-cdn.com/v4/letter/m/b77776/32.png) [@mzjensen](https://forum.dynamobim.com/u/mzjensen)\
**Post date:** [December 7, 2021, 10:32pm UTC](https://forum.dynamobim.com/t/touch-base-with-python-in-dynamo-for-civil-3d/70940/5 "2021-12-07T22:32:02Z")

</div>

Great points David, I was going to say something very similar.

> [@david\_licona](#):
>
> For me there are basically 3 things to learn here :
> 
> - Python - there are many courses on LinkedIn, Coursera, EDX, Udemy, etc. to learn the basics of programming plus the [Python Primer](https://dynamopythonprimer.gitbook.io/dynamo-python-primer/)
> - AutoCAD API
> - Civil 3D API

For these items, maybe we could take it one step further and generalize it to two steps:

- Learn the basics of any object-oriented programming language
- Learn how to work with .NET

This question has been asked several times on the forum, and in my opinion, searching for a specific “Python for Dynamo” training course (or waiting for someone to create one) is a dead end. When it comes down to the fundamentals, there isn’t anything that one can do with Dynamo that can’t already be accomplished through the .NET APIs for AutoCAD/Civil 3D. Dynamo just removes a few headaches and makes creating automation routines a little easier/more accessible for beginners. But when you come to the point where you need to accomplish something beyond what is available in node form, you have to learn object-oriented programming and .NET. There’s no way around it.

The [Developer’s Guide](https://help.autodesk.com/view/OARX/2022/ENU/?guid=GUID-C3F3C736-40CF-44A0-9210-55F6A939B6F2) for AutoCAD is laid out very well and should be the starting point for anyone trying to become familiar with how the APIs work.

---

<div class="post-metadata">

**Author:** ![GavinNicholls](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gavinnicholls/32/190442_2.png) [@GavinNicholls](https://forum.dynamobim.com/u/GavinNicholls)\
**Post date:** [December 8, 2021, 3:22am UTC](https://forum.dynamobim.com/t/touch-base-with-python-in-dynamo-for-civil-3d/70940/6 "2021-12-08T03:22:36Z")

</div>

Try out my 10 part Python series (free) on YouTube. I made it with the purpose of exposing people to the fundamentals of the language as they best apply to using it in Dynamo later on. It doesn’t cover any Revit/Dynamo/API, just Python concepts and statements that you will typically be using in Python for Dynamo:

https://www.youtube.com/embed/-k81u9NNEPQ?feature=oembed&wmode=opaque&list=PLBKwx9iS-LulG3Tz10G0Fvlrk8iOOigVJ

---

<div class="post-metadata">

**Author:** ![MohamedR.Nasreldeen](https://avatars.discourse-cdn.com/v4/letter/m/59ef9b/32.png) [@MohamedR.Nasreldeen](https://forum.dynamobim.com/u/MohamedR.Nasreldeen)\
**Post date:** [December 13, 2021, 10:23am UTC](https://forum.dynamobim.com/t/touch-base-with-python-in-dynamo-for-civil-3d/70940/7 "2021-12-13T10:23:42Z")

</div>

Thanks All very much
