# pcb-rnd - user manual

## 2. Utilities

## 2.1. gsch2pcb-rnd

Gsch2pcb-rnd is a standalone utility that can extract netlists and element data from a schematics produced by gschem. Thus it is a glue between gschem and pcb-rnd, doing forward annotation. It is ideal for automating the design process as it can be easily called from Makefiles, shell scripts or other programs/scripts, whereas the "import schematics" feautre (import_sch plugin) is more geared for the GUI user.

Multiple methods of operation are offered - the user can select one of these by name, using the -m command line argument (e.g. gsch2pcb-rnd -m importsep foo.sch):

method name | description
pcb | The classic approach: load the existing extract elements from the .sch file, load the .pcb file, compare element lists, load footprint libraries and create .new.pcb and .net and .cmd and let the user handle the rest. Does not work with anything else than the .pcb format. This method is deprecated and is provided only for compatibility with some old workflows.
import | Runs the same gnetlist backend as the import_sch plugin. A single action command file generated with .cmd suffix. When executed (using action ExcuteFile(foo.cmd)), it syncs (replaces/creates) every element and sets up all nets. Pro: single-command import. Con: can't load netlist only or elements only.
importsep | Similar to import, but produces two files: a .cmd file with element updates only (can be appled the same way as import's) and a separate .net netlist file that can be imported the same way as the .net of the pcb method. Pro: the user can update elements-only or nets-only. Con: requires two user actions to get a full impoty.