Home > Community > Forums > Custom IC SKILL > How to set F3 as a pop-up menu for particular function?

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

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

Last post Fri, Mar 1 2013 2:42 PM by kpai. 4 replies.
Started by kpai 28 Feb 2013 11:06 AM. Topic has 4 replies and 873 views
Page 1 of 1 (5 items)
Sort Posts:
  • Thu, Feb 28 2013 11:06 AM

    • kpai
    • Not Ranked
    • Joined on Tue, Jul 21 2009
    • Posts 13
    • Points 215
    How to set F3 as a pop-up menu for particular function? Reply

    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

    • Post Points: 20
  • Thu, Feb 28 2013 2:26 PM

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

    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)
            )
        )
        )
    )

     

    • Post Points: 20
  • Fri, Mar 1 2013 2:06 PM

    • kpai
    • Not Ranked
    • Joined on Tue, Jul 21 2009
    • Posts 13
    • Points 215
    Re: How to set F3 as a pop-up menu for particular function? Reply

    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

    • Post Points: 20
  • Fri, Mar 1 2013 2:15 PM

    Re: How to set F3 as a pop-up menu for particular function? Reply
    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
    • Post Points: 20
  • Fri, Mar 1 2013 2:42 PM

    • kpai
    • Not Ranked
    • Joined on Tue, Jul 21 2009
    • Posts 13
    • Points 215
    Re: How to set F3 as a pop-up menu for particular function? Reply

    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

    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by kpai at 28 Feb 2013 11:06 AM. Topic has 4 replies.