• 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 Scripting - Skill
  3. Make a whole layer visible with SKILL

Stats

  • Replies 5
  • Subscribers 19
  • Views 13304
  • Members are here 0
More Content

Make a whole layer visible with SKILL

Lamoureuxf
Lamoureuxf over 5 years ago

Hi,

I want to make visible a whole layer (pin, via, etch, etc...) with a command SKILL like this on PCB Editor v17.2

I know how to do it for 1 item : axlVisibleLayer("pin/top" t)      it worked.

So i tried this: axlVisibleLayer("all/top" t)       but it didn't work even with the path.

Is there a way to do it ?

Thanks, Florent

  • Cancel
  • Sign in to reply
  • DavidJHutchins
    DavidJHutchins over 5 years ago

    below is a simple skill function that scans all the Classes for a specific layer name & displays them:

    procedure((view_layer \@optional (Layer ""))
    let((Classes SubClasses layer)
    foreach(Class ((axlGetParam "paramLayerGroup")->groupMembers)
    foreach(SubClass ((axlGetParam sprintf(String "paramLayerGroup:%s/paramLayer" Class))->groupMembers)
    when(equal(SubClass Layer)
    axlVisibleLayer(strcat(Class "/" SubClass) t)
    )
    )
    )
    axlFlushDisplay()
    (axlVisibleUpdate t)
    )
    )
    axlCmdRegister( "view_layer" 'view_layer ?cmdType "general")

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • Lamoureuxf
    Lamoureuxf over 5 years ago in reply to DavidJHutchins

    Hi,

    Thanks for your quick answer but is it mandatory to have all these lines just to select the case "All" of the top line in color dialog because that's all I want.

    Florent

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • soll
    soll over 3 years ago in reply to DavidJHutchins

    Hello David,

    I know it has been 2 years since you posted this code, but I just stumbled upon it, and while trying to make it work, I realized I had to change a line to have it display the layers.
    As is, when I run the function (view_layer("INT2") for instance), it didn't displayed anything but returned t.

    I change this line :
    foreach(SubClass ((axlGetParam sprintf(String "paramLayerGroup:%s/paramLayer" Class))->groupMembers)

    To this :
    foreach(SubClass ((axlGetParam sprintf(String "paramLayerGroup:%s" Class))->groupMembers)
    (I removed /paramLayer after %s)

    And now it works. I am not exactly sure why Stuck out tongue
    If you still come around here, could you please tell me what is the meaning of this /paramLayer statement ? Do you know why it doesn't work for me ? Did SKILL changed since then ?

    Anyway, thank you for this !
    Best regards

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • DavidJHutchins
    DavidJHutchins over 3 years ago

    That code was wrong, the paramLayer field should only be used to get the information for a specific subclass name, for example:

    Skill > (etch_param = axlGetParam("paramLayerGroup:ETCH/paramLayer:TOP"))
    param:00000090075950A0
    Skill > etch_param->??
    (objType "paramLayer" userDefined t thickness
    "1.200000 mil" material "COPPER" type "CONDUCTOR"
    number 0 drcPhotoType "positive" nextLayer
    "GND" visible t parentName "ETCH"
    name "TOP" isEtch t color
    2 pattern 0
    )

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • soll
    soll over 3 years ago in reply to DavidJHutchins

    Thank you for the reply. That is what I thought after looking at the algroskill.pdf manual, but thought there might be something else I wasn't seeing about paramLayer.

    To anyone who might be interested, I "updated" the procedure a bit, so that it toggle layers on/off. It also doesn't turn on the Boundary layer at all, because I only use it at some rare occasions, same could be done with via/route keepout and regions. if someone has a better idea to do this, don't hesitate to share ! At the moment the only issue I see is that if some of the subclasses are already turned on while the procedure is used, it will toggle them respective to their current state.

    procedure(toggleLayer(\@optional (Layer ""))
    let((Classes SubClasses layer)
    foreach(Class (axlGetParam("paramLayerGroup")->groupMembers)
    foreach(SubClass (axlGetParam(sprintf(String "paramLayerGroup:%s" Class))->groupMembers)
    when(equal(SubClass Layer)
    if(axlIsVisibleLayer(strcat(Class "/" SubClass))
    then
    axlVisibleLayer(strcat(Class "/" SubClass) nil)
    else
    axlVisibleLayer(strcat(Class "/" SubClass) t)
    ) ;if
    ) ;when
    ) ;foreach
    axlVisibleLayer(strcat("BOUNDARY/" Layer) nil)
    ) ;foreach
    axlFlushDisplay()
    axlVisibleUpdate(t)
    )) ;let,procedure

    • 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