I looked pretty hard and can’t find much on just having Dynamo run a command in Civil 3D as part of a Dynamo script. I would like to do something like select all Polylines and run a certain command on them. Here is what I have:
What is the warning?
Thanks Zach!
import System
from System import Array
CADCC=System.Runtime.InteropServices.Marshal.GetActiveObject("Autocad.Application")
DOCv = CADCC.ActiveDocument
DOCNAME = DOCv.Name
DOCdata = DOCv.Database
MyList = []
MyList.extend([1, 1, 0])
MyList.extend([10, 10, 0])
MyList.extend([15, 15, 0])
lstvertex = Array[float](MyList)
SPACE = DOCv.ModelSpace
poly = SPACE.AddPolyline(lstvertex)
poly.Closed = True
OUT = poly
1 Like