Python Basics in Civil 3D

Hi All,

I’m new to dynamo using python and am trying to create basic scripts to familiarize myself. I am trying to create a cogo point at ENZ (7, 30 45) and am using the following:

import clr
clr.AddReference(“Autodesk.Civil.DatabaseServices, Version=22.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a”)
from Autodesk.Civil.DatabaseServices import *

easting = 7
northing = 30
elevation = 45

point = Point.Create()
point.X = easting
point.Y = northing
point.Z = elevation

tm = TransactionManager.Instance
tm.EnsureInTransaction(point.Database)
point.AddToDb()
tm.TransactionTaskDone()

The following error message is returned:

“Warning: FileNotFoundException : Unable to find assembly ‘Autodesk.Civil.DatabaseServices, Version=22.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’.
at Python.Runtime.CLRModule.AddReference(String name) [’ File “”, line 2, in \n’]”

I am using the following node (See attached)

Can anyone advise on what I’m doing wrong?

Hi
Looking at this

Any reason you’re trying to load assemblies in this manner? The default Python template is setup to load everything you need (and more than you need in this case):

# Load the Python Standard and DesignScript Libraries
import sys
import clr

# Add Assemblies for AutoCAD and Civil3D
clr.AddReference('AcMgd')
clr.AddReference('AcCoreMgd')
clr.AddReference('AcDbMgd')
clr.AddReference('AecBaseMgd')
clr.AddReference('AecPropDataMgd')
clr.AddReference('AeccDbMgd')

# Import references from AutoCAD
from Autodesk.AutoCAD.Runtime import *
from Autodesk.AutoCAD.ApplicationServices import *
from Autodesk.AutoCAD.EditorInput import *
from Autodesk.AutoCAD.DatabaseServices import *
from Autodesk.AutoCAD.Geometry import *

# Import references from Civil3D
from Autodesk.Civil.ApplicationServices import *
from Autodesk.Civil.DatabaseServices import *