I believe that method 1 is the only one that will work well - and it does work.
You need to define the pads for every layer using make_axlPadStackPad and then create the padStack using axlDBCreatePadStack before using axlPadstackToDisk.
Works for me.
I was able to pull it off, here are my couple of my observation and hope it helps people who want's to go on this route
First and foremost, understand and be aware of the the field mappings, for example
if you are deriving values from an pad-def (padstackdbid->pads->pad) using make_axlPadstackPad then
this is the mappig you have to follow
Rectangle, shape, square*
Make ANTI to ANTIPAD
You have to derive the figure width and height
Make sure that you provide proper checks for figure names like rectangle, square, shape
for square you should only one value for the figuresize
similarly for make_axlPadStackDrill the arrival figureSize has to be correct
there is no way to grab the drill tolerance, you have to find the plating status of the drill using the axl function axlDBGetDrillPlating
plus if you are touching all the padstacks then I found out that axlReplacePadstack would take a tremendous amount of time since I am passing the dbids of all the pins for a particular padstack
for a big design it woudl take hours
my way of getting around it is I created the new instances of the padstacks i am modifying and use the allegro's refresh padstack list option
for a test case i was able to do things in 90 secs from 5 minutes
Hope this is helpful for people who is messing around with padstacks :-)
As a kind of follow up on this it seems like the documentation for make_axlPadStackDrill (part of axlDBCreatePadStack) not has been updated.
If I pull the record for a padstack I get a lot of more options than what is documented.
Anyone know the most recent argument list for make_axlPadStackDrill and also if it is possible to change the slot symbol in this way? How can we get the complete parameter list for a function?
The undocumented parameters at least are
drillFigureHeightdrillFigureWidthdrillFigureNamedrillSizeHeightdrillFigureNamedrillSizeHeightdrillSizeWidthdrillDiameterdrillOffset (suppose this is what was offset, but has the name changed for the function?)
(prop nil bBox ((-1.842 -1.842) (1.841 1.841) ) readOnly t pads (pad:200849088 pad:200849064 pad:200849040 pad:200849016 pad:200848992 pad:200848968 pad:200848944 pad:200848920 pad:200848896 pad:200848872 pad:200848848 pad:200848824 pad:200848800 pad:200848776 pad:200848752 pad:200848728 pad:200848704 pad:200848680 ) objType "padstack" startEnd ("ETCH/TOP" "ETCH/BOTTOM") parent dbid:189357224 name "HOLE110" drillChar nil plating "NON_PLATED" holeType "rectangle_slot" drillNonStandard nil multiDrillData nil uvia nil type "through" keepout nil holeTolerance (0.0 0.0) drillFigureHeight 1.23 drillFigureWidth 2.794 drillFigureName "RECTANGLE" drillSizeHeight 1.23 drillSizeWidth 2.794 drillDiameter 1.23 drillOffset (0.0 0.0) isThrough t definition nil isPadRef nil)
The 16.5 the padstack dbid attributes are:
Padstack Attributes: padstacks in Allegro
NAME TYPE DESCRIPTION
Also includes generic object attributes
definition o_dbid (see isPadRef) Points to padstack definition if this is
padReference otherwise nil
drillChar string drill characters (max 3)
drillDiameter float Drill hole diameter (0 if slot)
drillSizeWidth float width of slot, diameter if hole and extents of mulidrill
drillSizeHeight float height of slot, diameter if hole and extents of mulidrill
drillOffset point offset of drill hole
drillFigureName string type of drill symbol (circle, square, etc.)
drillFigureWidth float Width of drill symbol (for slots same as drillSizeWidth)
drillFigureHeight float Height of drill symbol (for slots same as drillSizeHeight)
drillNonStandard string Type of drill (nil is standard) (not supported by slots)
holeTolerance l_float A list of two numbers reporting the + and -
drill hole tolerance
multiDrillData l_values If not multidrill then nil otherwise list
of (rows columns clearanceX clearanceY
staggered) both clearances are in dbreps
and staggered is t/nil
holeType string Type of hole (circle_drill, oval_slot, etc.)
keepout t/nil Padstack built to accomodate anti-pads as
Route keepouts for mechanical pins. This
padstack can also be used for logical
connections but this option is ignored.
isPadRef t/nil t = padstack is a padstack reference. This means that the
actual padstack is a template and the padstack's start
end layers is dynamically mapped depending upon its
use with a pin or via.
isThrough t/nil t = through padstack
name string Padstack name
objType string Type of object, in this case "padstack"
pads ll_dbid List of pads
parent dbid Design
plating string One of "Plated", "Non-Plated", "Plating-Optional"
prop nil Always nil, padstacks do not support properties
startEnd lt_layer Start and end layer of padstack
type string Type of padstack; through, smd, bbvia, uvia
uvia t/nil A sub-type of bbvias, to differentiate in
Thanks for that - a bit more comprehensive than the database model description and the axlDBCreatePadstack.txt description - I got some of them from enquiering the dbid - but the exact naming and types are good giveaways.