← Back to team overview

kicad-developers team mailing list archive

Re: BOM support

 

On 31 July 2010 09:32, Dick Hollenbeck <dick@xxxxxxxxxxx> wrote:
> On 07/30/2010 12:03 PM, Dick Hollenbeck wrote:
>>> I am trying to reach the right comprise between clarity and lack of
>>> verbosity, and to avoid situations where we have to change ' ' with
>>> '_' by keeping things wrapped with proper XML syntax.
>>>
>>
>> The attached file is a revision that actually passes through xmllint.
>> I am calling it "version A" format.
>> We can switch to version="1" after it stabilizes, using letters until then.
>>
>>
>> Changes:
>>
>> 1) Promoted <value>, <footprint> <datasheet> outside <fields> so they
>> are easier to reference with xpath and faster to find.
>>
>> 2) Wrap the fields in a <field> element so the names can have spaces in
>> them.
>>
>> 3) Separated the libsource element's value up into two attributes, lib
>> and part.
>>
>> 4) changed <image> to <libpart>
>>
>> 5) added <sheetpath> to <component>.
>>
>> 6) added attributes lib and part to <libpart>.
>>
>> 7) changed <nodes>'s part to ref.
>>
>>
>> As I say, this passes xmllint now so Brian you can see if your python
>> code can start to load it, and of course you can add additional records
>> with a text editor.
>>
>> And for others, feedback is still welcomed.
>>
>> I am not totally comfortable with the name <component> as it is a bit
>> too long for my taste.
>>
>
> Brian S:
>
> I revised the format again, now up to format version B:
>
> Attached is a sample, with comments in it, of format version B.
>
> Also, you can now generate partial forms of these files yourself from
> eeschema:
>
> I have checked in a some xml code that you can use to generate this
> generic netlist, format version B.  To generate the file, select after
> loading your schematic, Netlist -> Add Plugin.  Then provide a dummy
> post processor command, i.e. plugin, since we are not ready for that
> yet, or maybe you are.  I supplied "ls" as the post processor, i.e.
> plugin.  Give the plugin tab a name, such as "Generic".  The actual file
> is XML file is saved with a *.tmp extension even though the file
> selection dialog is has you believing *.net in the file save dialog when
> you go to run it.  Of course the reason for that was to anticipate the
> plugin being run on the *.tmp file to generate the *.net file.
>
> For eventual BOM generation, we may have to provide even more
> flexibility, so this may not be the final behavior, but with this email
> I am trying to get you the ability to generate these files here, nothing
> more yet.
>
> The main changes from format version A to B were:
>
> 1) <component> is now <comp>
>
> 2) added a single <components> element to identify a "section" within
> which all <comp>s can reside.
>
> 3) added a single <libparts> within which all <libpart>s can reside.
>
>
> When generating the *.xml from eeschema using the above technique, you
> will not see populated <libparts> or <nets> yet.  But I don't think this
> affects our initial python code which is more interested in handling the
> <comp> elements for BOM generation.
>
> I will be adding more support to the xml export Saturday.
>
>
> Thanks,
>
> Dick
>

Hi Dick,

Just a quick ping to say that I have not gone AWOL! I have been away
for three days and just got back today. As soon as I'm home tonight,
I'll read this thread properly and give feedback and/or start work.

Best Regards,

Brian.



References