9.5. Other formats

9.5. Other formats

For other netlist formats you can add netlist converters in the form of plugins. These converters are automatically launched by Eeschema. Chapter 14 gives some explanations and examples of converters.

A converter is a text file (xsl format) but one can use other languages like Python. When using the xsl format, a tool (xsltproc.exe or xsltproc) read the intermediate file created by Eeschema, and the converter file to create the output file. In this case, the converter file (a sheet style) is very small and very easy to write.

9.5.1. Init the dialog window

You can add a new netlist plug-in via the Add Plugin button.

eeschema_netlist_dialog_add_plugin_png

Here is the plug-in PadsPcb setup window:

eeschema_netlist_dialog_padspcb_png

The setup will require:

  • A title (for example, the name of the netlist format).
  • The plug-in to launch.

When the netlist is generated:

  1. Eeschema creates an intermediate file *.tmp, for example test.tmp.
  2. Eeschema runs the plug-in, which reads test.tmp and creates test.net.

9.5.2. Command line format

Here is an example, using xsltproc.exe as a tool to convert .xsl files, and a file netlist_form_pads-pcb.xsl as converter sheet style:

f:/kicad/bin/xsltproc.exe -o %O.net f:/kicad/bin/plugins/netlist_form_pads-pcb.xsl %I

With:

f:/kicad/bin/xsltproc.exe

A tool to read and convert xsl file

-o %O.net

Output file: %O will define the output file.

f:/kicad/bin/plugins/netlist_form_pads-pcb.xsl

File name converter (a sheet style, xsl format).

%I

Will be replaced by the intermediate file created by Eeschema (*.tmp).

For a schematic named test.sch, the actual command line is:

f:/kicad/bin/xsltproc.exe -o test.net f:/kicad/bin/plugins/netlist_form_pads-pcb.xsl test.tmp.

9.5.3. Converter and sheet style (plug-in)

This is a very simple piece of software, because its purpose is only to convert an input text file (the intermediate text file) to another text file. Moreover, from the intermediate text file, you can create a BOM list.

When using xsltproc as the converter tool only the sheet style will be generated.

9.5.4. Intermediate netlist file format

See Chapter 14 for more explanations about xslproc, descriptions of the intermediate file format, and some examples of sheet style for converters.