
You can choose to place them right after the BLOCKS or ENTITIES line, which is easier (just use the "search" function of your text editor to find them), or at the end, just before the "0 ENDSEC" lines (beware that there is one for each SECTION, make sure to use the ones relative to BLOCKS and ENTITIES). They must exist in the template, and they must be placed on their own line. The two lines that FreeCAD will be looking for are "$blocks" and "$entities". If you create your DXF file with a CAD application, there will likely be much more content inside the HEADER, BLOCKS and ENTITIES sections.

The above template doesn't contain any entity. You then need to edit them with a text editor, and add two additional lines, one at the beginning or end of the BLOCKS section, and another at the beginning or end of the ENTITIES section, which are where FreeCAD will add its own blocks and entities.

If not, a default empty template is created on the fly.Ĭonsequently, if you create your own SVG templates, and wish to be able to export the Drawing pages that you create with it to DXF, you just need to create a corresponding DXF template, and save it with the same name in the same folder.ĭXF templates can be created with any application that produces DXF files, such as LibreCAD. If a dxf file with the same name is found in the same folder as the SVG template used for a page, it will be used for export. Since version 0.15, FreeCAD can reliably export a Drawing page to the DXF format. The list of currently supported attributes is available on the Svg Namespace page.

Several objects (specifically those created with the Draft Drawing command and if your template has editable texts) use a special Svg Namespace specific to FreeCAD.You will need to edit it with a text editor and isolate the comment above on its own line again. Beware that if you reopen and resave your template in inkscape, after adding the above line, inkscape will keep the line, but will add other xml elements on the same line, causing the template to not work anymore. This text above (which is actually an XML comment) must be on a separate line, and not embedded in the middle of other pieces of text.
