• 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. User post install trigger 'add_my_menu' is already registered...

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 149
  • Views 2335
  • 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

User post install trigger 'add_my_menu' is already registered for viewType maskLayout

danmac
danmac over 10 years ago

Hi,

When I load a script to add a menu "add_my_menu" in the ciw window, it reports warning: 

User post install trigger 'add_my_menu' is already registered for viewType maskLayout

code like this:

.......

procedure(add_layout_menu(args)
hiInsertBannerMenu((getCurrentWindow) 'trPulldownMenu (hiGetNumMenus (getCurrentWindow)));
)
deRegUserTriggers("maskLayout" nil nil 'add_layout_menu)

Could you please check this?

Thanks!

danmac

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    You must be calling the deRegUserTriggers more than once with the same function name. The solution is obvious - don't do that or call deUnRegUserTriggers first.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • danmac
    danmac over 10 years ago
    Andrew, thanks for your help, and I use deUnReg**** and it works. But the menu added by other guys are lost after I do this. How can I make a another new menu just for myself, and not loss the menu add by other guys at the same time.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 10 years ago

    In that case, don't call deUnRegUserTriggers but instead call your function something else! Isn't that fairly obvious?

    BTW, the approach being used is incorrect - you're using a user post-install trigger, whereas you should use the user menu trigger for this. That's the third argument to deRegUserTriggers so your code should be like this:

    procedure(MY_add_layout_menu(args)
    list(MYPulldownMenu)
    )
    deRegUserTriggers("maskLayout" nil MY_add_layout_menu) 

    Of course, make sure your variable containing the menu is unique too.

    The only exception to what I'm saying is if you're using an ancient version - I think it was in IC446 we changed to support multiple user triggers of each type being registered, but I'd be surprised if you're using a 14-15 year old release (at least without mentioning that).

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • danmac
    danmac over 10 years ago
    Thanks very much!
    • 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.

© 2026 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information