• 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. Need guidance on how to select nets, pads, and vias with...

Stats

  • Replies 19
  • Subscribers 160
  • Views 20121
  • Members are here 0
More Content

Need guidance on how to select nets, pads, and vias with a certain property

mesaman000
mesaman000 over 12 years ago

Hi,

  I'm a beginner to SKILL programming and I took the basic tutorial class but seems to not be many resources for what I need to do.  I'm trying to initialize all pads, etch, via, nets, and shapes to a certain color like GREY.  Once I do that, I want to search the PCB editor database and identify which nets have a certain spacing class property: "1" "2" "3" or "4".   I want all pads and vias with the spacing class property 1 to be RED for example, all pads and vias with the spacing class property 2 to be BLUE, etc.

 Lastly, I want to export a PDF of this color map.  Can someone please help give me an idea of how I can achieve something like this?

 

Something I've started with is roughly like this:

design_dbid=axlDBGetDesign()

scset=axlCnsList("spacing") ;**Say my four spacing constraints are Default, 1, 2, 3, 4

**how do I traverse through all pads and vias?**

comp_dbid_list=design_dbid->components (pads isn't a property of design_dbid, is this the right method?)

foreach(comp_dbid comp_dbid_list

if comp_dbid->scset==1

**how do I change the color of these to RED? 

 

 

If anyone could provide any guidance or help it would be great!  Thank you! 

 

  • Sign in to reply
  • Cancel
  • eDave
    eDave over 12 years ago

    It's tough to start your Skill life with something like this.

    Here is some code to get you started:

     

    red = listnindex(axlColorGet('all), '(255 0 0)) || 7

    gray = listnindex(axlColorGet('all), '(190 190 190)) || 2

    spacingConstraint = "TEST"

    foreach(layer, '("ETCH/TOP" "PIN/TOP", "VIA CLASS/TOP"), q = axlLayerGet(layer), q ->color = gray, axlLayerSet(q))

    axlClearObjectCustomColor(axlDBGetDesign() ->nets)

     

    axlSetFindFilter( ?enabled '("noall" "pins") ?onButtons "pins")

    axlAddSelectAll()

    pins = axlGetSelSet()

     

    axlClearObjectCustomColor(pins)

    csetNets = axlSelectByProperty("net", "SPACING_CONSTRAINT_SET", spacingConstraint)

    red_pins = setof(pin, pins, member(pin ->net, csetNets))

     

    axlCustomColorObject(red_pins, red)

    axlVisibleUpdate(t)

    Plottting to a pdf  might be more difficult.

     

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mesaman000
    mesaman000 over 12 years ago

    Hey Dave,

      Thanks a ton for the help.

     

    Just so I can understand a little better, I have a couple questions for you if you don't mind:

    1) Do you know where I can find what arguments these functions take?  I can be a little more independent if I had access to any of these syntaxes but the basic SKILL programming class doesn't really go over any of this stuff besides basic syntax like strcat, local variables, etc.  I've tried searching google all over and can't find what arguments belong to what functions.  I've also tried in the skill prompt to type "help(listnindex)" for example and can't find any documentation

    2) When I try getting the first part to work (just setting everything to gray), nothing happens.  I actually only care about the bottom and top layers being initialized to gray, but anyway I figured it would look something like:

    gray = listnindex(axlColorGet('all), '(190 190 190)) || 2

    foreach(layer, '("ETCH/TOP" "PIN/TOP", "VIA CLASS/TOP"), q = axlLayerGet(layer), q ->color = gray, axlLayerSet(q))

    axlClearObjectCustomColor(axlDBGetDesign() ->nets)

      axlVisibleUpdate(t)

    3) lastly,  I want to set all pins AND vias to the color if they are associated with that specific spacing constraint.  I've modified it to be this:

      axlSetFindFilter( ?enabled (list "noall" "pins" "vias" "invisible")  ?onButtons (list "pins" "vias"))

    axlAddSelectAll()

    pins_and_vias = axlGetSelSet()

    axlClearObjectCustomColor(pins_and_vias)

    csetNets = axlSelectByProperty("net", "SPACING_CONSTRAINT_SET", spacingConstraint)

    red_pins_and_vias = setof(pin, pins_and_vias, member(pin ->net, csetNets))

     

    Thanks again for your help! 

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 12 years ago

    1/ The user and reference manuals are a good place to start. ...\doc\sklangref\sklangref.pdf and ...\doc\sklanguser\sklanguser.pdf. Another quick reference is to look in the documentation for each function ...\share\pcb\examples\skill\DOC\FUNCS

    2/ That should work. Do you get any error messages? Maybe you have some hilighting. Try removing that.

    3/ OK. But don't forget to set the spacingConstraint variable to something.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • mesaman000
    mesaman000 over 12 years ago

    Hi Dave,

      I'm still having trouble setting everything to a grey color initially..  I tried  

    gray = 81 ;; this is the index from the listnindex(axlColorGet('all) for the gray color I want

    foreach(layer, '("ETCH/TOP" "PIN/TOP", "VIA CLASS/TOP"), q = axlLayerGet(layer), q ->color = gray, axlLayerSet(q))

    ;;axlClearObjectCustomColor(axlDBGetDesign() ->nets) 

    axlVisibleUpdate(t) 

     

    Why won't this work?

     

    I'm able to set my pins red using the axlCustomColorObject(list,red), but for some reason I can't color everything else initially to grey.

    Really appreciate the help.  Thanks!

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • eDave
    eDave over 12 years ago
    Why have you commented out the clearing of the custom colours?
    • 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