Hola amigos buenas, some one knows a way to get a property value or the value and name of a systemvariable that gets the Drawing Units both in Autocad and C3D, after a couple sessions with copilot i achive to get LinearUnits It works in C3D, but i don’t achive to get how to query in autocad, my first insting was to use Document.SendCommand and run simulate -DWGUNITS, but i’ve realized that runing this string i have to modify the units if i’m not match the units of the .dwg, besides i don’t have acces to the echo in dynamo, i’m quite stuck any ideas or perspectives are welcome (INSUNITS is diferent from drawing units)!
How are you going to connect AutoCAD to Dynamo? This will matter quite a bit in how you progress.
Hola amigo buenas!!
no really to conect, we are migrating old Lisp plugins to c# and not all user use C3D, so the plugin have to work in both, i’m triyng to use my C# scripts in Dynamo to test because is more familiar to my main task to achive is to get the units of current drawing to create blocks on demand on the same units!!
Ah! Gotcha.
My gut tells me you’re looking for some combination of db.Measurement, db.Insunits, db.Lunits, and db.Aunits. I don’t have AutoCAD handy to test with though.
The documentation here is sparse and contained in no one good source sadly.
You can use the GetSystemVariable from The Civil Nodes and request for the variables that Jacob mentions:
There is not a direct way of reading the Civil 3D settings. If you want to match the drawing and Civil 3D, you can run the “-DWGUNITS” command and set the “Match INSUNITS to drawing units?” to true.
Exposed in the API with SetSystemVariable and GetSystemVariable
And further to @jacob.small 's post
Database.Aunits
Database.Insunits
Database.Lunits
Database.Measurement
Haaa, that was the issue, to know wich property and in wich .dll, thanks guys for put me in the right track of documentation i think i found it:
“Autodesk.AutoCAD.DatabaseServices.UnitsValue Enumeration”
i will try to make the query node and i will keep you updated!! ![]()


