• 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. Unable to to add pull-down menu to the schematic window

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 144
  • Views 14876
  • 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

Unable to to add pull-down menu to the schematic window

Alex Stepanov
Alex Stepanov over 9 years ago

Hi,

I am trying to add pull-down menu to the schematic window.

procedure( CCSCreateSchematicMyToolsPulldownMenu()
let(()
if( boundp( 'CCSSchMyToolsMenu )
then CCSSchMyToolsMenu
else
hiCreatePulldownMenu(
'CCSSchMyToolsMenu ; Item name
"My Tools" ; Item text
list(
hiCreateMenuItem(
?name 'GetListOfSelectedPins
?itemText "Print list of selected pins"
?callback "GetListOfSelectedPins()"
);hiCreateMenuItem

hiCreateMenuItem(
?name 'CreateAMSNetlist
?itemText "Create AMS netlist"
?callback "CreateAmsNetlistFromCurrentCell()"
);hiCreateMenuItem
);list
);hiCreatePulldownMenu
);if
) ; let
) ; CCSSchematicMenuTrigger


procedure( CCSSchematicMenuTrigger(@optional (triggerArgs getCurrentWindow()))
let(( banner window )

; Determine if the argument is a trigger argument list or a window.
if( typep( triggerArgs ) == 'list then
window = triggerArgs->window
else
window = triggerArgs
)

banner=hiGetBannerMenus( window )
unless( member( 'CCSSchMyToolsMenu banner )
printf("Creating custom menu in window %L\n" window)
CCSCreateSchematicMyToolsPulldownMenu()
hiInsertBannerMenu( window CCSSchMyToolsMenu length(banner)-3 )
);unless
);let
) ; procedure

deRegUserTriggers("schematic" nil nil 'CCSSchematicMenuTrigger)
deRegUserTriggers("schematicXL" nil nil 'CCSSchematicMenuTrigger)

If i am opening schematic view directly or if i am opening schematic inside ADE-XL and running CCSSchematicMenuTrigger procedure manually menu is added. But when I am opening schematic from ADE-XL (open design in tab) the menu is not added. What am I doing wrong?

Thank you.

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 9 years ago

    You just need to register it for two additional apps:

    deRegUserTriggers("analogArtist-schematic" nil nil 'CCSSchematicMenuTrigger)
    deRegUserTriggers("adexl-schematic" nil nil 'CCSSchematicMenuTrigger)

    Note however that you're really doing this the wrong way - I've seen things break when people use the post-install trigger for installing menus. The right way is really to define a menu trigger which returns a list of the pulldown menus you wish to add, and then let the Design Editor ("de") take care of it. This is done using the 3rd (rather than 4th) argument of deRegUserTriggers - and your trigger function should not do hiInstallBannerMenu(). 

    The function could be as simple as:

    procedure(CCSbannerMenuTrigger(args)
      list(CCSCreateSchematicMyToolsPulldownMenu())
    )

    then:

    deRegUserTriggers("schematic" nil 'CCSbannerMenu)
    deRegUserTriggers("schematicXL" nil 'CCSbannerMenu)
    deRegUserTriggers("analogArtist-schematic" nil 'CCSbannerMenu)
    deRegUserTriggers("adexl-schematic" nil 'CCSbannerMenu)

    something like that (I didn't test it).

    Andrew 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Alex Stepanov
    Alex Stepanov over 9 years ago
    I changed to menu trigger and it works. Thank you.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • fatcat1206
    fatcat1206 over 8 years ago

    Hi Andrew

    I have used your method, it's quite easy to implement.

    Much clear than the documentation.

    One extra question about the "deRegUserTriggers("schematic" nil 'CCSbannerMenu)"

    Is there any way to check whether "ÇCSbannerMenu" has been registered?

    As if I run the "deRegUserTriggers("schematic" nil 'CCSbannerMenu)" for second time, a warning message pops up.

    I just want to add some conditional statement to avoid double registering.

    Best Regards

    Yi

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 8 years ago

    Hi Yi,

    member('CCSbannerMenu deGetAppInfo("schematic")->userMenuTrigList)

    will return non-nil if it's been defined already. You can check the user app trigger and user post-install trigger by using a similar expression but with ->_userAppTrigList or ->_userPostInstallTrigList . Don't ask me why those have underscores at the beginning but the menu trigger doesn't. Some strange historical decision that was made 15 years ago, I expect...

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • fatcat1206
    fatcat1206 over 8 years ago
    Hi Andrew

    Happy new year :)

    Thank you for the info.
    It's very helpful.

    Best Regards

    Yi
    • 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