DXF output

General discussions about Inkscape.
Bendragon1337
Posts: 13
Joined: Sun Apr 28, 2013 6:51 pm

DXF output

Postby Bendragon1337 » Sat Nov 11, 2017 9:28 pm

Hey

I've been looking around for a reliable way to get object & vehicle diagrams into blender, so I found this extraordinary file called the DXF format which for a long time, has allowed me to export diagrams with a reliable degree of accuracy until it recently broke.

I knew that there were .dxf exporters for Inkscape, so I looked around for the most modern & up to date exporter, to try to get the best results, and I found a few, but they seem to require something called "lxml" to be downloaded from http://cheeseshop.python.org/pypi/lxml/

The message came was the following:

The fantastic lxml wrapper for libxml2 is required by inkex.py and therefore this extension.Please download and install the latest version from http://cheeseshop.python.org/pypi/lxml/, or install it through your package manager by a command like: sudo apt-get install python-lxml

Technical details:
No module named lxml
While I could find the lxml, I couldn't find out how to actually install the package.

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: DXF output

Postby tylerdurden » Sat Nov 11, 2017 10:38 pm

G'day,

On Windows systems, other users have had success with lmxl errors by re-installing Inkscape 0.92.2, particularly if Inkscape was most recently updated from 0.91.
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

Bendragon1337
Posts: 13
Joined: Sun Apr 28, 2013 6:51 pm

Re: DXF output

Postby Bendragon1337 » Sun Nov 12, 2017 12:26 am

Do I need to install lxml from http://cheeseshop.python.org/pypi/lxml/ or should I just reinstall?

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: DXF output

Postby tylerdurden » Sun Nov 12, 2017 2:57 am

I'd reinstall first... a recent user with a similar issue seemed to get going with just a uninstall/reinstall.

There may be some relevance to 32 bit, 64 bit exe or msi, etc., so I'd try the same as I used before.

TD
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: DXF output

Postby Moini » Sun Nov 12, 2017 5:06 am

A full uninstall and reinstall of the Inkscape program is necessary on Windows when you update Inkscape, as tylerdurden said.
If you do a full uninstall, it doesn't matter which version you were using before.
Link: https://inkscape.org/en/release/0.92.2/windows/
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

Bendragon1337
Posts: 13
Joined: Sun Apr 28, 2013 6:51 pm

Re: DXF output

Postby Bendragon1337 » Sun Nov 12, 2017 6:17 am

Yeah, I did that and I get a new error message.

Traceback (most recent call last):
File "inch_dxf_outlines.py", line 200, in <module>
e.affect()
File "inkex.py", line 283, in affect
self.effect()
File "inch_dxf_outlines.py", line 118, in effect
h = inkex.unittouu(self.document.getroot().xpath('@height',namespaces=inkex.NSS)[0])
AttributeError: 'module' object has no attribute 'unittouu'


I'm using http://www.bigbluesaw.com/saw/big-blue-saw-blog/general-updates/big-blue-saws-dxf-export-for-inkscape.html

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: DXF output

Postby Moini » Sun Nov 12, 2017 7:33 am

Ah, yes. That error is due to the extension being outdated now... :-/ The last version it can work with is Inkscape 0.48.5 (from July 2014).

It can be fixed, if you know a little python.

What about the built-in dxf export, didn't that work for you?
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: DXF output

Postby ragstian » Sun Nov 12, 2017 8:21 am

Hi.

Type unittouu in the search field on this forum to find recipes on how to fix this.
By the way "unittouu" is abbreviation for "unit to user unit".

There are a few different ways of fixing this depending on how the extension was programmed.

You can first try: change all occurrences of inkex.unittouu to self.unittouu in the extension python file(s).

If this does not work try changing self.unittouu to inkex.Effect.unittouu.
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

Bendragon1337
Posts: 13
Joined: Sun Apr 28, 2013 6:51 pm

Re: DXF output

Postby Bendragon1337 » Sun Nov 12, 2017 8:41 pm

Moini wrote:Ah, yes. That error is due to the extension being outdated now... :-/ The last version it can work with is Inkscape 0.48.5 (from July 2014).

It can be fixed, if you know a little python.

What about the built-in dxf export, didn't that work for you?
Last time I had checked, Inkscape didn't have an ability to export to .dxf, and since then, I checked it out and it does work.

As for changing the inkex.unittouu to self.unittouu or inkex.Effect.unittouu, self.unittouu worked the best, but also failed.

Thank you for assisting me through what was a tough day for me.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: DXF output

Postby Moini » Mon Nov 13, 2017 2:56 am

Great :) Happy 3D modeling! (If you like, would you some day post a picture of your result here? We're always curious to know what people make!)
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

tylerdurden
Posts: 2344
Joined: Sun Apr 14, 2013 12:04 pm
Location: Michigan, USA

Re: DXF output

Postby tylerdurden » Fri Dec 01, 2017 6:25 am

FYI...

I just had the error message when importing/opening a dxf, despite not getting the error message before.

A reboot of the computer resolved the issue. :-/
Have a nice day.

I'm using Inkscape 0.92.2 (5c3e80d, 2017-08-06), 64 bit win8.1

The Inkscape manual has lots of helpful info! http://tavmjong.free.fr/INKSCAPE/MANUAL/html/

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: DXF output

Postby Moini » Fri Dec 01, 2017 9:02 am

mmmh... :-/
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)


Return to “General Discussions”