• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Allegro X PCB Editor
  3. PIN select issue

Stats

  • Replies 7
  • Subscribers 159
  • Views 14511
  • Members are here 0
More Content

PIN select issue

catalineacsu
catalineacsu over 9 years ago

Hello,


I am working on a skill that generates a report with vias in pad but I am having problems using the single select function. It selects pins that are not overlapping the via but instead are 20 mils away. When I am running running the code line by line it works fine. If anyone spots a mistake please let me know. Or a workaround better than axlSingleSelectBox, which works better but not perfect...

The logic behind it is:

1. turn on vias and pads on one side of the pcb

2. select all visible vias

3. parse the list and select the pins overlapping the center of the via

4. report the result

The code is below (please forgive minor mistakes in the code if any. I have a 99% working code implemented with axlSingleSelectBox function and the one below is recreated from memory):

    axlWindowFit()
    axlVisibleDesign(nil)
    axlVisibleLayer("PIN/TOP" t)
    axlVisibleLayer("VIA CLASS/TOP" t)
    axlUIWRedraw(nil)
    
    axlClearSelSet()
    axlSetFindFilter(?enabled '(noall VIAS) ?onButtons '(noall VIAS))
    topvias = axlGetSelSet(axlAddSelectAll())
   

    axlClearSelSet()
    axlSetFindFilter(?enabled '(noall PINS) ?onButtons '(noall PINS))
    foreach(via topvias
        axlAddSelectPoint() ; this is the line that is not working!!!
    )

    vippinlist = axlGetSelSet()
    axlClearSelSet()

  • Sign in to reply
  • Cancel
Parents
  • B Bruekers
    B Bruekers over 9 years ago

    Try this piece of code:

    ;first get only pins which are not through-hole
    l_pins= tconc(nil nil)
    foreach(symb axlDBGetDesign()->symbols foreach(pin symb->pins unless(pin->isThrough l_pins= tconc(l_pins pin))))
    ;make a flat list, remove nil
    l_pins= remq(nil car(l_pins))

    axlVisibleDesign(nil)
    axlSetFindFilter(?enabled '("NOALL" "VIAS") ?onButtons '("NOALL" "VIAS"))
    l_padvia = tconc(nil nil)
    foreach(pin l_pins
    if(car(pin->startEnd)=="ETCH/BOTTOM"
    then lay= "ETCH/BOTTOM", axlVisibleLayer( "VIA CLASS/TOP" nil), axlVisibleLayer( "VIA CLASS/BOTTOM" t)
    else lay= "ETCH/TOP", axlVisibleLayer( "VIA CLASS/TOP" t), axlVisibleLayer( "VIA CLASS/BOTTOM" nil)
    )
    poly = car( axlPolyFromDB(pin ?layer lay))
    pinxy= pin->xy
    when(poly
    axlClearSelSet()
    ;make small selection around pin, only continue when a via found
    when(axlSingleSelectBox(poly->bBox)
    l_vias = axlGetSelSet()
    foreach(via l_vias
    ;check if via is within the pin poly, if so add to list
    when(axlGeoPointInShape(via->xy poly) l_padvia = tconc(l_padvia via))
    )
    )
    )
    )
    l_padvia= remq(nil car(l_padvia))
    axlClearSelSet()
    ;l_padvia contains a list of via DBID which are in pad.
    pprint(length(l_padvia))
    pprint(l_padvia)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • B Bruekers
    B Bruekers over 9 years ago

    Try this piece of code:

    ;first get only pins which are not through-hole
    l_pins= tconc(nil nil)
    foreach(symb axlDBGetDesign()->symbols foreach(pin symb->pins unless(pin->isThrough l_pins= tconc(l_pins pin))))
    ;make a flat list, remove nil
    l_pins= remq(nil car(l_pins))

    axlVisibleDesign(nil)
    axlSetFindFilter(?enabled '("NOALL" "VIAS") ?onButtons '("NOALL" "VIAS"))
    l_padvia = tconc(nil nil)
    foreach(pin l_pins
    if(car(pin->startEnd)=="ETCH/BOTTOM"
    then lay= "ETCH/BOTTOM", axlVisibleLayer( "VIA CLASS/TOP" nil), axlVisibleLayer( "VIA CLASS/BOTTOM" t)
    else lay= "ETCH/TOP", axlVisibleLayer( "VIA CLASS/TOP" t), axlVisibleLayer( "VIA CLASS/BOTTOM" nil)
    )
    poly = car( axlPolyFromDB(pin ?layer lay))
    pinxy= pin->xy
    when(poly
    axlClearSelSet()
    ;make small selection around pin, only continue when a via found
    when(axlSingleSelectBox(poly->bBox)
    l_vias = axlGetSelSet()
    foreach(via l_vias
    ;check if via is within the pin poly, if so add to list
    when(axlGeoPointInShape(via->xy poly) l_padvia = tconc(l_padvia via))
    )
    )
    )
    )
    l_padvia= remq(nil car(l_padvia))
    axlClearSelSet()
    ;l_padvia contains a list of via DBID which are in pad.
    pprint(length(l_padvia))
    pprint(l_padvia)

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information