Imports subcircuits and netlist data from the schematics (or some other source). The first parameter, which is optional, is the mode. If not specified, the import::mode attribute in the board is used. Possible values: gnetlist means gnetlist is used to obtain the information from the schematics; make invokes make, assuming the user has a Makefile in the current directory. The Makefile will be invoked with the following variables set:

PCB The name of the .pcb file
SRCLIST A space-separated list of source files
OUT The name of the file in which to put the command script, which may contain any @pcb{} actions. By default, this is a temporary file selected by @pcb{}, but if you specify an import::outfile attribute, that file name is used instead (and not automatically deleted afterwards).

The target specified to be built is the first of these that apply:

If you specify an import::makefile attribute, then "-f that file" will be added to the command line.

If you specify the mode, you may also specify the source files (schematics). If you do not specify any, the list of schematics is obtained by reading the import::srcN attributes (like import::src0, import::src1, etc).

For compatibility with future extensions to the import file format, the generated file must not start with the two characters #%.

If a temporary file is needed the TMPDIR environment variable is used to select its location.

Note that the programs gnetlist and make must be configured.

If pcb-rnd cannot determine which schematic(s) to import from, the GUI is called to let user choose (see ImportGUI()).

Note that Import() doesn't delete anything - after an Import, subcircuits which shouldn't be on the board are selected and may be removed once it's determined that the deletion is appropriate. TODO: is this still true?

If Import() is called with setnewpoint, then the location of new components can be specified. This is where parts show up when they're added to the board. The default is the center of the board. Argument combinations:

Import(setnewpoint) Prompts the user to click on the board somewhere, uses that point. If called by a hotkey, uses the current location of the crosshair.
Import(setnewpoint,mark) Uses the location of the mark. If no mark is present, the point is not changed.
Import(setnewpoint,center) Resets the point to the center of the board.
Import(setnewpoint,X,Y,units) Sets the point to the specific coordinates given.
Import(setnewpoint,50,25,mm)

Note that the X and Y locations are stored in attributes named import::newX and import::newY} so you could change them manually if you wished.

Calling Import(setdisperse,D,units) sets how much the newly placed subcircuits are dispersed relative to the set point. For example, Import(setdisperse,10,mm) will offset each part randomly up to 10mm away from the point. The default dispersion is 1/10th of the smallest board dimension. Dispersion is saved in the import::disperse attribute.