• 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. hiInsertMenuItem Error When Adding Custom Menu to CIW with...

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 5294
  • 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

hiInsertMenuItem Error When Adding Custom Menu to CIW with .cdsinit

sts
sts over 1 year ago

Hi,

When I loading below code with SKILL IDE it adds a custom menu to CIW window and doesn't give any error for IC23.1-64b.ISR3.27. However, for again same Virtuoso version if I load the code at .cdsinit it still adds the menu to CIW but also gives below error at CIW which I have no idea.

*Error* hiInsertMenuItem: argument #1 should be a defstruct (type template = "rgg") - nil


Then, I changed Virtuoso version to 6.1.8-64b-500.27 and loading the code with both IDE and .cdsinit worked properly without any error.

;;; creating menu items for the slider menu
trA_MenuItem = hiCreateMenuItem(
   ?name  'trA_MenuItem
   ?itemText "A"
   ?callback "println('A)" ;;; prints A in the CIW
)
trB_MenuItem = hiCreateMenuItem(
   ?name 'trB_MenuItem
   ?itemText "B"
   ?callback "println('B)" ;;; prints B in the CIW
)
trC_MenuItem = hiCreateMenuItem(
   ?name 'trC_MenuItem
   ?itemText "C"
   ?callback "println('C)" ;;; prints C in the CIW
)
;;; building the slider menu
hiCreatePulldownMenu(
   'trSubMenu
   ""
   list( ; the list of menu items in the slider menu
      trA_MenuItem
      trB_MenuItem
      trC_MenuItem
   )
)
;;; creating the first menu item for the pulldown menu
trSliderMenuItem = hiCreateSliderMenuItem(
   ?name 'trSliderMenuItem
   ?itemText "Print"
   ?subMenu trSubMenu
)
;;; creating the second menu item for the pulldown menu
trMenuItemResize = hiCreateMenuItem(
   ?name 'trMenuItemResize
   ?itemText "Resize"
   ?callback "hiResizeWindow( window(1) list(0:0 500:500))"
)
;;; creating the Example Menu pulldown menu
hiCreatePulldownMenu(
   'trPulldownMenu
   "Example Menu"
   list( trSliderMenuItem trMenuItemResize )
)
;;; inserting the pulldown menu in the CIW
hiInsertBannerMenu( window(1) trPulldownMenu 0 )

Thanks in advance,

Sedat

  • Cancel
Parents
  • AurelBuche
    AurelBuche over 1 year ago

    Hi

    This kind of errors might occurs when the graphical environment is not fully loaded yet

    you should queue your final call using hiEnqueueCmd to make sure everything is properly setup before inserting your menu

    cheers

    Aurelien

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • sts
    sts over 1 year ago in reply to AurelBuche

    Thanks

    As you suggested loading menu with hiEnqueueCmd command at .cdsinit caused error to disappear.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • sts
    sts over 1 year ago in reply to AurelBuche

    Thanks

    As you suggested loading menu with hiEnqueueCmd command at .cdsinit caused error to disappear.

    • 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