• 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. Help on menu's

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 143
  • Views 843
  • 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

Help on menu's

venuuuuu
venuuuuu over 13 years ago

 hi all,

          I had created two menus FPStools and FPSoptions. When iam going to hierarchy level then FPtools is appears two times and FPSoptions doesnot appear on the banner. What's the problem.  Iam using the verson 5141 and my codes are below.

           procedure(AmitAddMenu10(_args)
  let( (item1 item2 item3 item4 item5 item6 item7 item8 item9 item10)
    ;; create a couple of menu items
    item1 = hiCreateMenuItem( ?name 'item1 ?itemText "Layer Generation"
              ?callback "CCShiHierLayerOps()"
            )

    item2 = hiCreateMenuItem( ?name 'item2 ?itemText "Automatically fixing Path Width"
              ?callback "path()"
            )
      
       item3 = hiCreateMenuItem( ?name 'item3 ?itemText "Routing"
              ?callback "venurout()"
            )
 
       item4=hiCreateMenuItem( ?name 'item4 ?itemText "create via in box"    
         ?callback "contact1()"
            ) ;venu() is a procedure which i did not shown here
    ;; create a menu that includes the menu items and return a list of the
    ;; pulldown menus
item5 = hiCreateMenuItem( ?name 'item5 ?itemText "Change labels in bus"
              ?callback "labelChange()"
            ) ;venu() is a procedure which i did not shown here
  item6 = hiCreateMenuItem( ?name 'item6 ?itemText "magic ruler"
              ?callback "")
  item7 = hiCreateMenuItem( ?name 'item7 ?itemText "half ruler"
              ?callback "CCScreateRuler()")
  item10 = hiCreateMenuItem( ?name 'item10 ?itemText "test visible & invisible"
              ?callback "textDisplays()")

    list(hiCreatePulldownMenu('AmitMenu "FPSoptions" list(item1 item2 item3 item4 item5 item6 item7 item10 )))
  );let
); procedure
;; create a userMenuTrigger trigger that automatically adds the menu
deRegUserTriggers("maskLayoutXL" nil 'AmitAddMenu10)
deRegUserTriggers("maskLayout" nil 'AmitAddMenu10)

 

 

  procedure(AmitAddMenu3(_args)
  let( (item1 item2 item3 item4 item5 item6 item7 item8 item9 item10)
    ;; create a couple of menu items
    item1 = hiCreateMenuItem( ?name 'item1 ?itemText "Assign labels for every instances"
              ?callback "labels()"
            );labels() is a procedure which ididn't shown here

    item2 = hiCreateMenuItem( ?name 'item2 ?itemText "Create Bus"
              ?callback "bus()"
            )


       ; AB - this was item2 in the code as posted on the forum.
       ; so was obscuring the item2 above.
       item3 = hiCreateMenuItem( ?name 'item3 ?itemText "Present layers"
              ?callback "venu()"
            ) ;venu() is a procedure which i did not shown here
 
       item4=hiCreateMenuItem( ?name 'item4 ?itemText "substrate contacts"              ?callback "substrate()"
            ) ;venu() is a procedure which i did not shown here
    ;; create a menu that includes the menu items and return a list of the
    ;; pulldown menus
item5 = hiCreateMenuItem( ?name 'item5 ?itemText "Object information "
              ?callback "displayinfo()"
            ) ;venu() is a procedure which i did not shown here
  item6 = hiCreateMenuItem( ?name 'item6 ?itemText "Object information off"
              ?callback "CCSobjInfoOFF()")
  item7 = hiCreateMenuItem( ?name 'item7 ?itemText "hierarchy library check"
              ?callback "TrlibraryReport()")
  item10 = hiCreateMenuItem( ?name 'item10 ?itemText "hierarchy Views check"
              ?callback "TrviewReport()")
   item8 = hiCreateMenuItem( ?name 'item8 ?itemText "Pin label Change"
              ?callback "CCSchangeLabelDelimiter(cv)")
 item9 = hiCreateMenuItem( ?name 'item9 ?itemText "Bindkeys"
              ?callback "bindkeys()")
    list(hiCreatePulldownMenu('AmitMenu "FPStools" list(item1 item2 item3 item4 item5 item7 item10 item8 item9)))
  );let
); procedure
;; create a userMenuTrigger trigger that automatically adds the menu
deRegUserTriggers("maskLayoutXL" nil 'AmitAddMenu3)
deRegUserTriggers("maskLayout" nil 'AmitAddMenu3)

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 13 years ago
    I've not tried your code as I'm only on a handheld device right now, but the problem is almost certainly due to the fact that you've given ?name 'AmitMenu for both hiCreatePulldownMenu calls. Since the ?name is the name of the variable used to store the menu data, the second call will overwrite the first.

    So you need to give them unique names.

    Also, usually one would avoid recreating the menu each time by doing:

    procedure(myMenuTrigger(args)
    unless(boundp('myMenuName)
    ; function that creates myMenuName
    myCreateMenuFunction()
    )
    list(myMenuName)
    )

    This second thing is just a suggestion on how you can further improve the code.

    Regards,

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