• 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. Custom IC SKILL
  3. Disable a menu item in schematic window but enable it in...

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 144
  • Views 6398
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Disable a menu item in schematic window but enable it in layout window

Martinsh
Martinsh over 2 years ago

A pull down menu is created and loaded in schematic and layout windows. One of the menu item is just for layout. So I'd like it being enable in layout window and disabled in schematic window. How to do?

Best regards,

Martin

  • Cancel
Parents
  • revida marcos
    revida marcos over 2 years ago

    You may use conditional expressions based on the currently active window to deactivate a menu item in the schematic window but enable it in the layout window. The specific menu item can be enabled or disabled in your code based on whether the active window is the schematic window or the layout window.

    Here is a simple pseudo-code illustration:

    if active_window == "schematic":
    menu_item.enable = False
    elif active_window == "layout":
    menu_item.enable = True


    Users won't be able to interact with the menu item since it will be disabled in the schematic window (menu_item.enable = False). The menu item will be made usable by being enabled in the layout window (menu_item.enable = True).

    you identify the presently active window in your particular programming environment or framework, be sure you replace active_window with the proper code or function call.

    Hope this is useful!

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • revida marcos
    revida marcos over 2 years ago

    You may use conditional expressions based on the currently active window to deactivate a menu item in the schematic window but enable it in the layout window. The specific menu item can be enabled or disabled in your code based on whether the active window is the schematic window or the layout window.

    Here is a simple pseudo-code illustration:

    if active_window == "schematic":
    menu_item.enable = False
    elif active_window == "layout":
    menu_item.enable = True


    Users won't be able to interact with the menu item since it will be disabled in the schematic window (menu_item.enable = False). The menu item will be made usable by being enabled in the layout window (menu_item.enable = True).

    you identify the presently active window in your particular programming environment or framework, be sure you replace active_window with the proper code or function call.

    Hope this is useful!

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Martinsh
    Martinsh over 2 years ago in reply to revida marcos

    Dear marcos,

    Yes, we can enable/disable menu items by the conditional code. But it needs a trigger event to run the conditional code. How to register the trigger event?

    Regards,

    Martin

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 2 years ago in reply to Martinsh

    Martin,

    Unfortunately the reply was rather generic; the trigger you need exists, but is not public...

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

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