• 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 20125
  • 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
  • mesaman000
    mesaman000 over 12 years ago

    Hi Aldrin,

      Thanks for the tip.  Do you know if there's any other alternate command I can use to change vias of the same net a certain color that is compatible with 16.5? 

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

    Hi

    I think you should go for a check version strategy axlVersion('version) and if 16.6 or newer use axlCustomColorObject

    If version is older than 16.6 then you would need to go for a script methodology (you may need to check if the version is newer than 16.2 where net coloring was introduced - code could give a warning that via coloring is not supported)

    Here you would generate and replay a script inside your skill program

    Your skill program could create a scriptfile (fprint) inside working directory, replay the script and then delete the script.

    Script code would look something like below (easiest way is to record a script and mimic the syntax) - as you can see the layer windows has settings for vias and their net names. (Notice my script is recorded in 16.6 - but syntax is probably the same for 16.5 and 16.3)

    setwindow pcb
    trapsize 83
    etchedit
    color192
    setwindow cvf.dialog
    cvf layer_mode
    setwindow pcb
    etchedit
    setwindow cvf.dialog
    cvf nets_mode
    cvf select_color_cell 66
    cvf nets_color vias/ad0 67
    cvf select_color_cell 85
    cvf nets_color vias/+5v 86
    cvf nets_color vias/vcc 86
    cvf apply
    cvf nets_color vias/gnd 86
    cvf apply
    cvf okay
    setwindow pcb

    Best regards

    Ole

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

    Before I try writing a whole new script, I'm curious if I can still do this the previous way.

     

    Instead this time maybe I should try coloring the nets and then turning all etch/traces to grey afterwards.  

     After I set all nets to their respective colors, how do I color the etch on the top and bottom layers to grey?  Right now I have:

    q = axlLayerGet("ETCH"), q ->color = gray, axlLayerSet(q)

     

    and that does not work 

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

    Hi

    I used some skill code like this with 16.5, maybe you can use it?

    layerlist = axlSubclasses("ETCH")

    foreach(layername layerlist

    lid = axlLayerGet(strcat("ETCH/" layername))

    lid->color = gray

    axlLayerSet(lid)

    lid = axlLayerGet(strcat("PIN/" layername))

    lid->color = gray

    axlLayerSet(lid)

    lid = axlLayerGet(strcat("VIA CLASS/" layername))

    lid->color = gray

    axlLayerSet(lid)

    )

    axlVisibleUpdate(t)

    Best regards

    Ole

    • 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