I got tired of firing up Inkscape to convert DXF to SVG, so I figured out how to do it from the command line. The obvious method of using the inkscape command line script doesn’t work because DXF input is an extension and it can’t find your files for some reason.
You need to run the python input extension directly. First, you must get the lxml library installed. You can use easy_install as outlined in that link, but I prefer pip. Unfortunately, then you need pip installed. I prefer to use the python from Homebrew (install homebrew, then “brew install python”), in which case you will be using “python2” and “pip2” below, and omitting “sudo”.
So, get the lxml library, however you want:
sudo pip install lxml
then to convert a file:
python /Applications/Inkscape.app/Contents/Resources/share/inkscape/extensions/dxf_input.py --scale=25.4 file.dxf > file.svg
You can automate this with Automator by creating a new Folder Action:
This lets me save DXF files to a ConvertDXF folder on my desktop, and an SVG file appears within the SVG subfolder immediately.
Leave out the “–scale=25.4” if you work in mm. You can also try --scalemethod=file to read the scale automatically, but my workflow from Fusion360 outputs DXF files with no explicit scale.