Generating .pos files with Part Number (e.g. MPN/HPN)

The default .pos output includes lines associating a RefDes with a “Value” etc (besides other vital info). That is,

Ref , Val , Package, PosX …etc
C21 100n/16V-X7R C0603 53.66 4.45 top 180

Is there a way to get a Part Number to be output instead of the “Val” field (or in addition to it) for example:
C21 K120052 C0603 53.66 4.45 top 180

The desired second field is an HPN (House Part Number, defined as custom property for every component used).

Short of messing the the Value field – is there a way?

(Also, the Value field has no expectation of being uniqe in identifying the part, but part numbers are supposed to be unique, by definition)

With out of the box KiCad, I don’t think there is. The custom fields in the schematic are not held in pcbnew, so you would need a custom script to combine the POS output with the data from the schematic (or netlist).

That makes sense. The schematic and pcbnew programs seem to be living fairly independent lives, so to speak.

It seems feasible to get what I want by “joining” a BOM generated with one RefDes per record (line), with the .pos file using RefDes as the foreign key.

A pcbnew plugin which cross references the schematic, as you suggest, would achieve the same objective albeit better.

I wonder if anyone here can point me to any .pos generator plugins (than have to start from scratch, wary of the unbeaten path)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.