• 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. How to get the visibility of COLOR - CLASS/SUBCLASS?

Stats

  • Replies 3
  • Subscribers 159
  • Views 2168
  • Members are here 0
More Content

How to get the visibility of COLOR - CLASS/SUBCLASS?

VytasR
VytasR over 5 years ago

I want to know if the layer is visible or not after I use:

color -toggle "PACKAGE KEEPOUT/TOP"

How can I get it?

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

    try using

    skill axlIsVisibleLayer("PACKAGE KEEPOUT/TOP")

    if the return value is 't' then it is visible

    if the return value is 'nil' then it is not

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

    If you are looking to just turn the layer on without checking you could use the -vis option instead of -toggle.

    color -vis "PACKAGE KEEPOUT/TOP"

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

    Thanks, that's exactly what I needed.

    Some offtopic:

    Why this works:
    color -toggle "PACKAGE KEEPOUT/TOP" ; skill axlIsVisibleLayer("PACKAGE KEEPOUT/TOP")

    And this gives always a "nil"
    color -toggle "PACKAGE KEEPOUT/TOP" ; skill println("toggle PACKAGE KEEPOUT/TOP (t- visible / nil - invisible):") ; skill axlIsVisibleLayer("PACKAGE KEEPOUT/TOP")

    • 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