Inkscape.org
Beginners' Questions An error occurs when saving an SVG file as DXF R14
  1. #1
    Liyade888 Liyade888 @Liyade888

    Steps to reproduce:

    • open Inkscape
    • Open an SVG file
    • Save as a DXF R14 file

    What happened?

    Traceback (most recent call last): File "C:\Program Files\Inkscape\share\inkscape\extensions\dxf_outlines.py", line 455, in DxfOutlines().run() File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 250, in run self.save_raw(self.effect()) File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\base.py", line 296, in save_raw self.save(self.options.output) File "C:\Program Files\Inkscape\share\inkscape\extensions\dxf_outlines.py", line 385, in save self.preprocess(["flowRoot", "text"]) File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\extensions.py", line 150, in preprocess self.document = load_svg(stream) ^^^^^^^^^^^^^^^^ File "C:\Program Files\Inkscape\share\inkscape\extensions\inkex\elements_parser.py", line 98, in load_svg parsed = etree.parse(stream, parser=SVG_PARSER) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "src/lxml/etree.pyx", line 3541, in lxml.etree.parse File "src/lxml/parser.pxi", line 1900, in lxml.etree._parseDocument File "src/lxml/parser.pxi", line 1920, in lxml.etree._parseFilelikeDocument File "src/lxml/parser.pxi", line 1814, in lxml.etree._parseDocFromFilelike File "src/lxml/parser.pxi", line 1204, in lxml.etree._BaseParser._parseDocFromFilelike File "src/lxml/parser.pxi", line 618, in lxml.etree._ParserContext._handleParseResultDoc File "src/lxml/parser.pxi", line 724, in lxml.etree._handleParseResult File "src/lxml/etree.pyx", line 334, in lxml.etree._ExceptionContext._raise_if_stored File "src/lxml/parser.pxi", line 370, in lxml.etree._FileReaderContext.copyToBuffer UnicodeDecodeError: 'gbk' codec can't decode byte 0x8d in position 1983: illegal multibyte sequence

    What should have happened?

    Should be able to save as a DXF R14 file

    Inkscape Version and Operating System:

    • Inkscape Version: 1.3.2
    • Operating System: Windows 10
    • Operating System version: ...
    图纸目录模板
  2. #2
    Polygon Polygon @Polygon🌶

    You have to do something with your text in general; seems you‘re using „Symbols“ and deep stacked groups. DXF needs paths and no groups afaik.

  3. #3
    Liyade888 Liyade888 @Liyade888

    Thank you for your response. I have no clue and no ideas on how to solve the problem.

  4. #4
    Polygon Polygon @Polygon🌶

    Is the DXF file needed for any CAD/CAM purpose? What‘s the target application?

  5. #5
    Liyade888 Liyade888 @Liyade888

    Thank you for your response. The purpose of the application is to convert PDF or SVG files into the DWG format that CAD software can open.

  6. #6
    Polygon Polygon @Polygon🌶

    I did Extensions->Arrange->Deep Ungroup - select all text elements and go Path->Stroke to Path - then adjust line width and export to DXF/R14. Will this work in your case?

     

  7. #7
    Paddy_CAD Paddy_CAD @Paddy_CAD

    Though Inkscape can read pdf files and write dxf files, it's not a good tool for document conversion. The pdf specification is expansive, allowing many methods to achieve a printed image. Inkscape is good at converting this multitude of possibilities while preserving visual fidelity, but the result is often a very complex svg file. However, exporting a dxf file works best for basic line drawings in a simple svg file structure. It doesn't cope well with the tangled mess that often comes from an imported pdf.

    If your goal is transferring tabular data to Autocad, there are several tools that can help. Okular is an open source pdf reader that understands table layouts. Select and copy the table. Paste into Excel. Copy the spreadsheet range. Paste into Autocad. Autocad recognises the structured data and will create a table to receive it. I don't know if this works with other spreadsheet and CAD applications.

  8. #8
    Liyade888 Liyade888 @Liyade888

    thank you

Inkscape Inkscape.org Inkscape Forum Beginners' Questions An error occurs when saving an SVG file as DXF R14