• 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. Create Route Keep Out Using Screw Hole and NPTH...

Stats

  • Replies 2
  • Subscribers 159
  • Views 13055
  • Members are here 0
More Content

Create Route Keep Out Using Screw Hole and NPTH...

eDaNoy
eDaNoy over 13 years ago

 Hello everyone, i am developing a module that will create RKO on inner layer

for Screw Hole and NPTH Hole...

I used axlPolyFromDB, and i targeted symbol pin as target,

although i made it work already, i am not satisfied by its speed and credibility

I have to search through its deepest property,

here is my code, pls help me to make it short and to enhanced its speed and credibility

 

            (unless shapeDbid
                myComp=axlDBGetDesign()->symbols
                (when myComp
                    (foreach pinSelected myComp
                         (when pinSelected->name==itemName
                            symbolPins=pinSelected->pins
                            (when symbolPins
                                (foreach symPinSelected symbolPins
                                padCntr=0
                                    selectedPin=symPinSelected->pads
                                    (foreach _xx selectedPin
                                         (unless pinSelected->component
                                             (unless pinSelected->net->name
                                                (when _xx->objType=="pad"
                                                    (when _xx->type == "REGULAR"
                                                        (when _xx->layer == "PIN/SOLDERMASK_TOP" || _xx->layer == "PIN/SOLDERMASK_BOTTOM"
                                                            ++padCntr
                                                            (unless padCntr>1 ;avoid repeatation
                                                                polyList = car(axlPolyFromDB(car(_xx->figure), ?layer itemLayer ?padType 'REGULAR))
                                                                polyList = car(axlPolyExpand(polyList 20 "NONE"))
                                                                shapeCreatedDBid=axlDBCreateShape(polyList t itemLayer)
                                                                (when listp(shapeCreatedDBid)
                                                                    shapeCreatedDBid=car(shapeCreatedDBid)
                                                                )
                                                                axlDBCreatePropDictEntry("FR_SKILL_HOLECHECK" "string" , list("shapes"))
                                                                axlDBAddProp(shapeCreatedDBid list("FR_SKILL_HOLECHECK" itemName))
                                                                axlDBAddProp(shapeCreatedDBid list("FIXED" t))
                                                                printf("%s for %s  created.\n" itemLayer itemName)
                                                            )
                                                        )
                                                    )
                                                )
                                             )
                                         )
                                    )                                   
                                )
                            )
                         )
                    )
                )       
            )

 

as you noticed i used "padCntr" to avoid repeatation, because each pins could find attributes with thesame type, pad, layer and objType

  • Sign in to reply
  • Cancel
  • eDave
    eDave over 13 years ago
    (unless shapeDbid
    (foreach mechSymbol setof(sym, axlDBGetDesign()->symbols, sym ->name == itemName && !sym ->component)
    (foreach mechPin setof(pin, mechSymbol ->pins, !pin ->net)
    pad  = car(setof(p, mechPin ->pads, pad ->type == "REGULAR" && (p ->layer == "PIN/SOLDERMASK_TOP" || p ->layer == "PIN/SOLDERMASK_BOTTOM")))
    when(pad
    polyList = car(axlPolyFromDB(car(pad ->figure), ?layer itemLayer ?padType 'REGULAR))
    polyList = car(axlPolyExpand(polyList 20 "NONE"))
    shapeCreatedDBid = car(axlDBCreateShape(polyList t itemLayer))
    (when shapeCreatedDBid
    axlDBCreatePropDictEntry("FR_SKILL_HOLECHECK" "string" , list("shapes"))
    axlDBAddProp(shapeCreatedDBid list("FR_SKILL_HOLECHECK" itemName))
    axlDBAddProp(shapeCreatedDBid list("FIXED" t))
    printf("%s for %s  created.\n" itemLayer itemName)
    ); when shapeCreatedDBid
    ); when pad
    ); foreach mechPin
    ); foreach mechSymbol
    ); unless
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDaNoy
    eDaNoy over 13 years ago

     thanks Dave, im will try to incorporate it today on my module

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
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