I am working on a design where I would like to add items to my schematic only in order to be picked up by my BOM generation script without PCBNEW picking them up. The items are such as pin sockets and board spacers, which would not affect the layout, which is complete.
You can put them on your schematic in a separate area/page (just for clarity sake) and make sure the reference designators start with a pound/hashmark (#) and that will tell eeschema not to add it to the netlist so it wouldn’t effect your PCB layout.
For clarity when building (or documenting) to the schematic, you may want to match their REFD numbers. For example, if U5 has a socket, the socket’s reference would be XU5 (see the “X” line in the table for reference designators on wikipedia), and then add the hashmark so you would enter “#XU5”. Similarly, for the board spacers, you can match the reference for the spacers to the mounting hole reference (if available).
Argh! Rene reminds me/us (see below) that this trick with the hashmark will not work because they are also ignored in BOM creation.
Ignoring my incorrect references to using a hashmark (along with paulvdh’s response, below) the rest of the technique that I mention may work for future designs. I’ve done this with IC sockets. In my cases, the schematic symbol doesn’t have any pins and the footprint only has silkscreen and courtyard (both obviously larger than the bare IC) for me to line up with the IC footprint to keep me from trying to put adjacent parts (like bypass capacitors) under the socket frame…) I would put the socket refd under the part so it will be hidden by the parts, but the IC’s refd outside the silkscreen for the socket so it can be referenced on a populated board.
I fear devices with “#” as the start of the reference are not only ignored by the netlist export but also by the BOM creator. (Tested in my 1 year old nightly. I can test it on stable and current nightly in a few hours when i am back at my other PC.)
The only way i can think of would be to assign a dummy footprint to the “virtual” symbols. This only kind of works if the symbol has no pins and the dummy footprint is empty except for reference and value field (these can be made invisible) and has the virtual flag set. (This avoids it being included in the pos file)
Yes, symbols with no pins get exported in the netlist. I use this to my advantage for adhesive rubber feet. I put the feet in the schematic, and I have a corresponding footprint for a foot, which is just silkscreen showing where to attach the foot.