How to use Autodesk.Civil.DynamoNodes.ObjectByName in Python

you can explore an assembly :

import sys
import clr

clr.AddReference("System.Reflection")
from System.Reflection import BindingFlags

# 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 *

clr.AddReference('AutoCADNodes')
import Autodesk.AutoCAD.DynamoNodes as aDynNodes


adoc = Application.DocumentManager.MdiActiveDocument
editor = adoc.Editor

#name_spaces = aDynNodes.GetTypes()
OUT = dir(aDynNodes), dir(aDynNodes.SelectionByQuery), aDynNodes.SelectionByQuery.ObjectOfTypeByName.__doc__
2 Likes