Monday, April 6, 2009

DWG support for Blender

I'm working on AR, a python library for Blender, which might be interesting for ARchitects. It targets primarily Blender python scripters, not Blender end users. However non pythoneers might be interested in the library as well, as some side products are end user friendly.

One of the features I have been working on is DWG support for Blender. It uses the DXF scripts of Blender under the hood, so it is limited to their abilities. Probably export will work better than import.

The supported DWG versions are: 9, 10, 12, 13, 14, 2000, 2004 and 2007. (It can also export to the equivalent DXF formats.)

In case you want to use this plugin for Blender, you need to install my ar package first. It has been tested both on Linux and Windows. (Mac Os X might work as well.) Afterwards read the tutorial for further instructions. You can use my DWG conversion python module also outside Blender.

Are you an architect and coding with Python in Blender? I'd love to hear from you, not just because of this blog post. Just send me an email: #


  1. FANTASTIC!!!! 1000 thanks Stani, this is unvaluable work...

  2. These are good news :)
    Many thanks, Stani!!

  3. nice script!
    just have one problem, when I change the variable of BLENDER_SCRIPTS and after "save" it doesn't assume the directory change...why?

  4. where can I get ar/ar folder???
    I cannot find it anywhere!!

  5. @Nikita

  6. Using Blender 2.49a + Python 2.6.2 I had to modify the script
    59: rdict = Registry.GetKey(key, True)
    61: Registry.SetKey(key, rdict, True)
    96: ... EveryDWG.path)

  7. Hi! I am using Blender 2.49a + Python 2.6.2
    i had to change following lines in the script in order to have it working:

    59: rdict = Registry.GetKey(key, True)
    62: Registry.SetKey(key, rdict, True)
    96: Draw.PupMenu('Error%%t|Can not find "%s"'%EveryDWG.path)

    Also install PIL-1.1.6.win32-py2.6.exe (for Python 2.6)

    All seems to work ok now!

  8. Hi dear Stani.
    I am an architect in Iran. I am also interested in open source softwares and currently I am disributing ubuntu cd's in Shiraz, Iran.
    I really want to completly migrate to Linux. I have 4 years of exprience in linux. I know GIMP, InkSpace, Blender and . . . But still could not find open source equivalents for AutoCAD and ArchiCAD -the most common architectural softwares used in Iran.
    I have tested QCad but it sucks.
    Any idea what software can replace AutoCAD and ArchiCAD ? That would be a great help to me.

    1. just pirate autocad, and run it on VMware Player with Unity. You'll need a window's license and some extra RAM but its pretty seamless, and lets you atleast pretend you're not using window. :)

    2. Iranian hello friend, I recommend the Bricscad is a powerful tool for architecture. can be found at this link:

  9. QCad is for now the best 2D option. Another promising application is FreeCAD:

    Otherwise look for freeware which can run with Wine.

  10. any suggestion for mac osx?

  11. @max
    Install wine and follow the rest of the documentation:

  12. It'very very nice. But instead of clapping de PseudoOpenDWG, I belive we should focus on the LibreDWG project: and turnover the hackish.

    Happy AR!


Filter by topic: spe, python, ubuntu