Electronic – Programmatically generate padstacks for Cadence Allegro

allegrocadencepadspadstack

I am laying out a complex board, with many components. One of the steps is to create padstacks for the footprints of each component. It turns out I have (nearly only) two types of padstacks to generate:

  • For through-hole components, the pads are circular with a circular drill hole.
  • For surface-mount components, the pads are rectangular.

In both cases, the pastemask is 0.07mm all around the pad.

The problem is that those padstacks come in about 50 different sizes. I want them to be consistently specified and typoless, and the Cadence Allegro padstack editor being awful makes generation tedious and error-prone. The obvious solution, given I only have two types of padstacks, is to script the padstack creation with the dimensions nicely specified in just one clean file.

Unfortunately, the .pad output files of the Cadence Allegro padstack editor are binary files, meaning that I cannot just follow a "template" and populate the numbers programmatically.

Is there a way to programmatically generate Cadence Allegro .pad padstacks?

Best Answer

Use the File > Script command in Pad Designer to record your actions as you create a padstack. You can then use the resulting (ASCII) script file as a template, which you can run from the command line by invoking pad_designer with the -s argument.