How do I code the Document.Current node into Python?

Does this help?

import System
from System import *

input = IN[0]

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

OUT = adoc, adoc.Name

Have a look into the LinkDWG package as well. :wink:

Also, this topic is great for working with multiple DWG files.

1 Like