• 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 14880
  • 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
Parents
  • 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
Reply
  • 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
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