• 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. How to set F3 as a pop-up menu for particular function?

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 143
  • Views 14994
  • 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

How to set F3 as a pop-up menu for particular function?

kpai
kpai over 12 years ago

I have a function call AddBLKLayers that can create add-on mutilple layers base on particular selected rectangle.  Now I would like to use F3, such as in Rule function, once the user press F3, it will have a particular pop-up that associate with AddBLKLayers function.

Can anyone show me how to set F3 key to have a pop-up menu when AddBLKLayers in use?

Thanks,

Kathy

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    Kathy,

    Are you talking about an Options form, as many of the commands implemented as enterFunctions provide (e.g. they are prompting you to enter a point or points, and you can hit F3 to bring up a form which provides options to alter the behaviour?)

    Here's a partial example of doing this (I didn't post the entire code because it's old and doesn't work that well, but it illustrates the point). You create an options form with hiCreateAppForm, and then reference it from the ?form argument to an enter function (enterPath in this case):

    procedure(abCreateGuardring()

        unless(boundp('abCreateGuardringForm)
        abCreateGuardringOptionsForm()
        )
        enterPath(?prompts list("Enter points for guard ring")
        ?doneProc "abCreateGuardringDoneProc"
        ?points nil
        ?addPointProc "abCreateGuardringPointTracker"
        ?delPointProc "abCreateGuardringPointTracker"
        ?form abCreateGuardringForm
        ?alwaysMap t
        ?pathWidth abCreateGuardringForm->diffWidth->value
        )
    )

    procedure(abCreateGuardringOptionsForm()
        let((diffWidth)
        diffWidth=hiCreateFloatField(
            ?name 'diffWidth
            ?value 10.0
            ?callback "abChangeGuardringWidth()"
            ?prompt "Diffusion Width"
        )
        hiCreateAppForm(
            ?name 'abCreateGuardringForm
            ?formType 'options
            ?buttonLayout 'HideCancelDef
            ?fields list(
            list(diffWidth 0:0 400:30 100)
            )
        )
        )
    )

     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • kpai
    kpai over 12 years ago

    Hi Andrew,

    Thanks for showing me how to generate the menu. My question here is where can I setup the F3 key for the pop-up as need.

    I have setup my hiSetBindKey("Layout" "Ctrl<Key>Q" "AddBLKLayers()") to start my AddBLKLayers function.

    The AddBLKLayers procedure look like this

    procedure(AddBLKLayers(@optional (LayerSel car(geGetSelSet()~>lpp)))

    ....

    Should I set the @optional to @key ?

    Again, thank!

    best regards,

    Kathy

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 12 years ago
    Hi Kathy,

    Do you really mean popup menu? I was guessing you really meant a form appearing when you hit F3 in the middle of the enterFunction - if so that would happen automatically if you used enterPoints, enterBox etc and have ?form specified in the arguments to that function.

    Changing @optional to @key won't affect this in the slightest.

    If you showed your complete code and have enough details to explain precisely what you want to happen when you press F3, we might be able to help you.

    Kind Regards,
    Andrew
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • kpai
    kpai over 12 years ago

    Here is the code that I completed yesterday when I select a layer, it will add-on the rest of blockage layers or exclusive layers as needed.   This code only to add-on the extra layers that I defined without any other choices for user; hence, I thought of to add on F3 key as an option for user to have the choice of choose particular layers to add-on.

    I'm just about to start to write the OptionsForm as you suggested.   I'm not familiar this and definitely will need your help later.

    exLayers = '(("ex_R_rule" "guideline") ("ex_R_rule" "require") ("ex_R_rule" "recommend") ("ex_R_rule" ("analog"))

    dmyLayers = '(("ODBLK" "dummy") ("POBLK" "dummy") ("DMEXCL" "dummy1") ("DMEXCL" "dummy2").....("DMEXCL" "dummya"))

    procedure(AddBLKLayers(@optional (LayerSel car(geGetSelSet()~>lpp)))

      CurSel = car(geGetSelSet()~>lpp)

      LayerSel = car(CurSel)

      if( CurSel != nil && CurSel != "drawing" && CurSel != "pin" then

         if(LayerSel == "ex_R_rule" then   /* Place additional exclusive layers */

            foreach(layer exLayers

               if( layer != CurSel then

                     printf("Added layer = %L\n" layer)

                     dbCreateRect(

                          geGetEditCellView()

                          layer

                          CCSgetBBox()

                     ) ;dbCreateRect

                else

                   printf("\n %L exist and skipped !\n\n" layer)

            );if

         );foreach

        else  /* Place additional blockage layers */

          foreach(layer dmyLayers

             if(layer != CurSel then

                 printf("Added layer = %L\n" layer)

                 dbCreateRect(

                        geGetEditCellView()

                        layer

                        CCSgetBBox()

                  );dbCreateRect

             else

               printf("\n %L exist and skipped !\n\n" layer)

         );if dmyLayers

       );foreach dmyLayers

      );if LayerSel

      else /* nothing is selected */

          printf("Please select a ex_R_rule layer or Blockage layer, then press Ctrl-Q again !\n")

      );if CurSel = nil

    ) ;procedure AddBLKLayers

    I know in order to add-on option form, I might need to modify my code agagin.

    Again, any commend or suggestion is welcome.

    best regards,

    Kathy

    • 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