How to use civil 3D commands in a Python Script?

This will send a command to the command line.

import System
from System import *

input = IN[0]

app = System.Runtime.InteropServices.Marshal.GetActiveObject("Autocad.Application")
adoc = app.ActiveDocument

adoc.SendCommand(input)							

OUT = str(input) + " sent to command line"
12 Likes