Scriptable PCB packages

Besides part numbering, there's another thing we'd like to do: automatically produce a parts library for each board, containing only the parts actually used. Seems like that would save time and blunders.

BLH has used mostly Eagle, but seems to prefer Diptrace. Unfortunately DT isn't scriptable, so to do that we'd have to suss out the library format.

Suggestions?

Cheers

Phil Hobbs

Reply to
Phil Hobbs
Loading thread data ...

There is a BOM function in diptrace. I would think thats what you need.

Cheers

Reply to
Martin Riddle

Thanks, but that goes in the wrong direction. I produce paper schematics an d flat ASCII BOMs in a standard format (lines pasted from a master list). I want to make a tool that will produce a CAD library containing just what's in the BOM.

I already have a script that generates Digikey-compatible CSV files for N b oards' worth of parts, and I want to do the same for libraries.

I can see how to do that with an Eagle ULP, but there's no scripting in Dip trace.

Cheers

Phil Hobbs

Reply to
Phil Hobbs

and flat ASCII BOMs in a standard format (lines pasted from a master list). I want to make a tool that will produce a CAD library containing just what 's in the BOM.

boards' worth of parts, and I want to do the same for libraries.

iptrace.

I use Eagle, and always end up appending our part numbers to the Eagle BOM. One Eagle part could link to more than one of our part numbers.

George H.

Reply to
George Herold

Turns out that Diptrace has an ASCII import/export function, and provides an Eagle ULP to convert Eagle schematics, boards, and libraries to Diptrace. We ought to be able to use that as a template for reading and writing ASCII Diptrace libraries.

'tother hunchback wants to use KiCad--apparently the CERN folks have improved it out of all recognition, and of course it's scriptable and has a command line and all that manly stuff.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
 Click to see the full signature
Reply to
Phil Hobbs

I've been playing around with it and the push-and-shove routing is worth it alone compared to eagle.

as for a lib per project, it should sorta happen automatically with most tools in that they keep a cache of the used parts and footprints. No one wants old projects to break because you changed something in you main library

-Lasse

Reply to
Lasse Langwadt Christensen

The goal of the lib-per-board is to eliminate all that screwing around finding the right 0603 metal film resistor out of hundreds. Just open the one library, and all the parts are right there. The cache idea is nice, but given our workflow (paper schematic plus flat ASCII BOM -> capture -> layout) it doesn't quite get us there.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
 Click to see the full signature
Reply to
Phil Hobbs

in that case you just copy one of the existing resistors on the schematic

I think Kicad can do most of what you want. Schematic symbols are in a cache library in standard library format so if you really wanted a separate lib you can probably just copy that file

PCB has function to create a footprint library and export all the used footprints

Reply to
Lasse Langwadt Christensen

But there _aren't_ any until you select them from some gigundo library out of a big long list of other libraries, which is slow and error-prone compared with having a single library supplied with the paper schematic and BOM, containing only entries for the 37 unique components on the board (for arbitrary values of 37).

Fixing that is the point of the exercise.

Maybe so. We'll look at it over the weekend.

But I want it there _before_ schematic capture. We're starting with paper, because that's how I work best.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
 Click to see the full signature
Reply to
Phil Hobbs

at some point you have to pick them out from your main libraries

In kicad schematic libs are just a file with chucks of text per symbol so it would be easy enough to generate

the easy way would probably to open a dummy schematic, place one of each component and save the cachelib as you project lib, that I think also mean you can assign footprints, kicad symbols doesn't have to have a default footprint then you have to assign one after making a netlist

-Lasse

Reply to
Lasse Langwadt Christensen

Well, if you used a spreadsheet, you could embed the path to the datasheet into the BOM. ;-)

Reply to
krw

The idea is to have a script do that, based on the ASCII BOM for the given board.

It sounds great--we'll have a look over the weekend.

To do that, you still have to navigate the entire library hierarchy. That's what we want to avoid.

Thanks

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
 Click to see the full signature
Reply to
Phil Hobbs

Two keystrokes in Altium: D, P.

Or did you mean, a package /for Eagle or Diptrace/?

Tim

--
Seven Transistor Labs, LLC 
Electrical Engineering Consultation and Contract Design 
 Click to see the full signature
Reply to
Tim Williams

I use Mentor Graphics PADS2004sp2, which is the last version that does not require a hardware dongle. It has a fairly extensive scripting capability using VBA, and I have a script that creates a BOM from the schematic in various formats. I use CSV which can be imported into Excel or Open Office. PADS schematics contain the complete parts library information, except for the actual decals, which are in the PCB file.

The schematics and PCB layouts can be exported in ASCII format, and a complete specification is supplied so you can perform various manipulations on the data. I have made some applications with Borland Delphi that uses OLE automation to interface to the PCB files, and I have been able to read the ASCII format and produce copies of parts of a design for panelization including rotation.

I have also used the scripting capability of TurboCAD to import an XYRS file from a PADS design, and create a 3-D image of the board. I think KiCad has this and so do other packages.

formatting link

You can get various parts libraries for PADS and other formats:

formatting link

formatting link

ASCII specification:

formatting link

I have built a library of parts that I commonly use in my designs, including manufacturer, vendor, and cost information. It is fairly easy to select parts since I use a part numbering method that starts with the reference designator (C_, R_. U_, etc.) and then I add the values for generic parts, like R_24K9_1/8W_1% or C_22N0_50V_5%_CM, and finally the parts decal (0805,

1210, 6MM, etc). For ICs I use something like U_LT1112_SO8. I have separate libraries for SMT and thru-hole parts, and others for special items.

Paul

Reply to
P E Schoen

What's two keystrokes?

Cheers

Phil Hobbs

Reply to
Phil Hobbs

Ahh OK (I didn't understand what you were doing.) So you'll have a different library for each schematic. If you stay pretty small that is fine. What happens in ~10 years, when some part used in several places goes away and you have to replace with a new part?

George H.

Reply to
George Herold

Nothing at all, unless we have to spin the board. If we do, still no problem. The library and BOM are under version control, so when the BOM gets changed, I re-run the script and presto, a new library with the new part in it. Nothing gets lost, nothing gets missed.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
 Click to see the full signature
Reply to
Phil Hobbs

That's more or less what I want to be able to do. Diptrace has ASCII import/export, and they supply code (an Eagle ULP) that knows how to write their file format, so we can just hack that up in Python or Rexx or something.

Diptrace has 3-D as well.

Interesting, thanks. I'm probably not going to go use an unsupported tool for anything major, unless I'm already thoroughly familiar with it. (Freelance for DOS comes to mind, as well as my favourite editor, xx.)

My master BOM list is like that, and we'll be rejiggering our CAD libraries in a similar way, to match. The master library will have all the parts we use, but will be primarily for use as input to the scripts.

Cheers

Phil Hobbs

--
Dr Philip C D Hobbs 
Principal Consultant 
 Click to see the full signature
Reply to
Phil Hobbs

you want to have a separate library for each project, that is why most tools cache the libraries

imagine if someone moves a pin on a symbol or tweaks a footprint in your library, and that automatically propagated to all you old projects

Suddenly there is missing connections in schematics and DRC errors on PCBs

-Lasse

Reply to
Lasse Langwadt Christensen

As an aside - have you considered investing in a commercial schematic/layout package?

UK) presumably targeted at small start ups. If I had not already purchased a perpetual Altium licence I would have gone that route.

Reply to
JM

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.