• 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. Automatically modify menu items in schematic editor on ...

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 144
  • Views 14355
  • 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

Automatically modify menu items in schematic editor on startup

johancsi
johancsi over 11 years ago

I am trying to redefine bind keys and menu items for some functions within the schematic editor as well as add another pulldown menu to the banner menu.  I have working code that does this if I start the schemtic editor first by hand, and it works well.  When I open up an additional schematic window, the bind keys and menu callback function overrides are all there, but the new pulldown menu is gone.  I don't want to have to run the initialization script by hand everytime I open a new shematic window.

The code to re-assign the callback functions and new pulldown menu don't work unless a schematic window is opened first.  I therfore open up a dummy schematic window, run my setup, and then close the dummy schematic window.  I think this is kind of a kludge, and it doesn't keep my pulldown menu anyway.  I also don't want to modify the menu files.  Is there anyway to run a skill script every time a schematic editor starts up?  I am running the IC615 version.  Below is the initialization code snippet that I am using.  I load this and run it within the .cdsinit in my home directory.

svID=deNewCellView("sandbox" "temp1" "schematic" "schematic" nil)
sv1ID=geGetWindowCellView(svID)

adCreateLayoutMenuItem = hiCreateMenuItem(?name 'adCreateLayoutMenuItem ?itemText "Create Layout" ?callback "adCreateLayout")
hiCreateMenu( 'adToolsPulldown "Tools" list( adCreateLayoutMenuItem ) )
hiInsertBannerMenu( hiGetCurrentWindow() 'adToolsPulldown 5 )

hiSetBindKey("Schematics" "None<Key>i" "adHiCreateInst( )")
hiSetBindKey("Schematics" "None<Key>w" "adHiCreateWire( )")
hiSetBindKey("Schematics" "None<Key>p" "adHiCreatePin( )")
hiSetMenuItemCallback(schAddMenu 'InstItem "adHiCreateInst()")
hiSetMenuItemCallback(schAddMenu 'WireItem "adHiCreateWire()")
hiSetMenuItemCallback(schAddMenu 'PinItem "adHiCreatePin()")

dbClose(sv1ID)

  • Cancel
Parents
  • skillUser
    skillUser over 11 years ago

    Hi Johan,

    Another way to modify the tools' menus is to use the menus file approach, in this case there will be a schematic.menus file in the installation which is loaded by default.  You can have a directory named "menus" in your current or home directory that contains your own "schematic.menus" file; this can load the original and then modify or add to the structure.
    Your schematic.menus file could contain something like the following:

    ;; load the original Schematic menus
    load(prependInstallPath("/etc/tools/menus/schematic.menus"))
    

     Take a look at the structure in the original file and you can see how to modify or build new menu items and menus...
    I hope this helps,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • skillUser
    skillUser over 11 years ago

    Hi Johan,

    Another way to modify the tools' menus is to use the menus file approach, in this case there will be a schematic.menus file in the installation which is loaded by default.  You can have a directory named "menus" in your current or home directory that contains your own "schematic.menus" file; this can load the original and then modify or add to the structure.
    Your schematic.menus file could contain something like the following:

    ;; load the original Schematic menus
    load(prependInstallPath("/etc/tools/menus/schematic.menus"))
    

     Take a look at the structure in the original file and you can see how to modify or build new menu items and menus...
    I hope this helps,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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