• 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. Please tell me How can I make option window that open by...

Stats

  • Locked Locked
  • Replies 8
  • Subscribers 143
  • Views 12583
  • 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

Please tell me How can I make option window that open by F3 Key.

jjoon2
jjoon2 over 3 years ago
My skills automatically change the properties (location, size, etc.) of the two selected objects.
It is a process that enters a skill execution command (or BindKey) into the CIW and clicks two objects with a mouse.
(command --> Mouse Click X 2 (objects select) --> Auto Property Change )

But I want to press the "F3 key" (hiToggleEnterFun) to launch an option window for this skill.
When executing a skill, I would like the window to appear only when I want the F3 input, not the option window.
Like the features provided by Virtuoso by default(leHiCreateRect, leHiCreatePath, etc). 

i know how to make a desired form of format using hiCreateAppForm, but I don't know how to connect it to HitoggleEnterFun (F3).
Please tell me How can I make option window that open by F3 Key.
  • Cancel
  • AurelBuche
    AurelBuche over 3 years ago

    Hi,

    You might have two way of doing this:

    1.

    If your mouse clicks to select objects are done using an enter function: enterPoint, enterPoints, ...

    Then you just have to bind your menu using the arguments of the enter function, see bold arguments below:

    (enterPoint
     [ ?prompts l_promptList ]
    [ ?points l_pointList ]
    [ ?form s_form ]
    [ ?addPointProc t_addProcName ]
    [ ?delPointProc t_delProcName ]
    [ ?initProc t_initProcName ]
    [ ?doneProc t_doneProcName ]
    [ ?formProc t_formProcName ]
    [ ?alwaysMap g_alwaysMap ]
    [ ?acceptString g_acceptString ]
    [ ?acceptNumber g_acceptNumber ]
    [ ?noInfix g_noInfix ]
    [ ?cmdName t_cmdName ]
    [ ?cursor x_cursor ]
    )

    2.

    If you are doing things differently, you might still be able to bind F3 to the function to display your form and re-bind it afterward

    (let ((bk (hiGetBindKey "Layout" "<Key>F3")))
    (hiSetBindKey "Layout" "<Key>F3" "(display_your_form)")
    ;; Safely re-bind F3
    (unwindProtect
    (progn
    ;; Run your code
    ...
    )
    (hiSetBindKey "Layout" "<Key>F3" bk)
    ))



    Note that I haven't ran this code snippet


    Hope this might help,

    Cheers,
    Aurel
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to AurelBuche

    The main approach is the first one that Aurel mentioned, and it requires an enter function (e.g. enterPoint, enterBox etc) or geHiDragFig, and these being passed a form which was created with ?formType 'options to indicate that it's an "options" form (it has the right types of buttons for an options form). Here's a (cut down) example - I removed the actual bit that drew the guard ring as that was technology-specific. Unfortunately I don't have too many examples of these types of forms lying around...

    /* abGuardRing.il
    
    Author     A.D.Beckett
    Group      Custom IC (UK), Cadence Design Systems Ltd.
    Language   SKILL
    Date       Sep 13, 2002 
    Modified   
    By         
    
    This code defines two functions and a key-binding that allows the
    automatic creation of an arbitrary guard-ring structure.
    
    Could do with a few more comments...
    
    ***************************************************
    
    SCCS Info: @(#) abGuardRing.il 09/13/02.14:03:39 1.1
    
    */
    
    hiSetBindKey("Layout" "<Key>F10" "abCreateGuardring()")
    
    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)
    		)
    	)
        )
    )
    
    
    procedure(abChangeGuardringWidth()
        ; need this to stop recursion (not sure why)
        unless(abCreateGuardringForm->currentWidth==
    	abCreateGuardringForm->diffWidth->value
    	abCreateGuardringForm->currentWidth=
    	    abCreateGuardringForm->diffWidth->value
    	changeEnterFun(
    	    'enterPath
    	    ?pathWidth abCreateGuardringForm->diffWidth->value
    	    ?doneProc "abCreateGuardringDoneProc"
    	    ?points abCreateGuardringForm->points
    	    ?addPointProc "abCreateGuardringPointTracker"
    	    ?delPointProc "abCreateGuardringPointTracker"
    	    ?prompts list("Enter points for guard ring")
    	    ?form abCreateGuardringForm
    	)
        )
    )
    
    procedure(abCreateGuardringPointTracker(win points)
        abCreateGuardringForm->points=points
    )
    
    procedure( abCreateGuardringDoneProc( win done points )
        let((
    	(cv geGetEditCellView())
    	)
    	; now create the guard right itself - removed for simplicity
    	t
        )
    )
    

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • jjoon2
    jjoon2 over 3 years ago in reply to Andrew Beckett
    Thank you for your kindness!
    I understand two ways you recommended.
    I think first method is better than second one in my situation.
    Because My code will be used repeatedly, and I expect some cases will be cancelled in the middle of the process.
    it is not possible to re-specify the Bindkey if I press the ESC key in the middle of the process.

    I can initialize the F3 BindKey in the ESC Key itself, but I think it will be troublesome it to the shared recipients.
    So I select First Method. But I have new problem.
    Using enterPoint or enter commands don't show in advance which object the mouse cursor will select.
    Before Using enterfunction, if the mouse cursor is located over any object,  the object is changed Hilight or active state. So We can know  which of the overlapping objects we will choose. It is important at my code.
    My code automatically distinct the type of object selected and changes the properties differently depending on the type. And there are a lot of overlapping objects.
    So I want to know in advance which object will be chosen.

    Below is part of my code. Select two objects with a mouse click and take the coordinates.
    testEnter() is main function 
    RoutingAssistancOptionForm is only for Option Form
    testFun() is actually modify property function
    So At CIW type testEnter()
    by ?point option input point value
    and then start testFun()
    -------------------------------------------------------------------------------------------------------------------------------------------------------
    procedure(testEnter()
     
         unless(boundp('RoutingAssistanceForm)
              RoutingAssistanceOptionForm()
         )
         enterPoint(
              ?prompts list("TEST prompt")
              ?points list(0:0)
              ?form testForm
              ?alwaysMap t
              ?initProc "testFun" ; init / addPoints / delPoints / done
     )
    ) ; procedure
    procedure(RoutingAssistanceOptionForm()
           let((tempIndex)
                 tempIndex=hiCreateFloatField(
                       ?name 'tempIndex
                       ?value 10.0
                       ?callback "testprint()"
                       ?prompt "RoutingAssistanceOprionForm"
                      )  ;  hiCreateFloatField

                 hiCreateAppForm(
                       ?name 'testForm
                       ?formType 'options
                       ?buttonLayout 'HideCancelDef
                       ?fields list(
                        list(tempIndex 0:0 400:30 100)
                        )   ;; ?fileds list
                     )  ;; hiCreateAppForm1
               ) ;; let
    ) ;; procedure
    procedure(testFun()
          if(geSingleSelectPoint() then sel1 = geGetSelSet() sel1MousePoint = hiGetCommandPoint()); if  ;  select first obj
          if(geSingleSelectPoint() then sel2 = geGetSelSet() sel2MousePoint = hiGetCommandPoint()); if  ;  select second obj
         ;; Modify Propertys ~~~~
     
    ); procedure
    ----------------------------------------------------------------------------------------------------------------------------------
    I thought the problem would be solved using "Enterfunction's ?points Optiion". 
    If I force the input value to "?points option", testFun will be executed. 

    But as soon as testFun is executed, F3 Key does not work.
    I understood that when testFun is executed, EnterFunction mode stops for a while.
    Is there any other way in this case?
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • jjoon2
    jjoon2 over 3 years ago in reply to jjoon2

    I solved this problem using "?poins" option.

    I really appreciata your kindness. 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • jjoon2
    jjoon2 over 3 years ago in reply to AurelBuche

    I solved this problem using "?poins" option.

    I really appreciata your kindness.혻

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • jjoon2
    jjoon2 over 3 years ago in reply to jjoon2
    I replied because I thought I solved the problem, but it doesn't work.
    Can you check it again?

    "I solved this problem using "?poins" option.
    I really appreciata your kindness. "
    Ignore the above article.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • AurelBuche
    AurelBuche over 3 years ago in reply to jjoon2

    Hi,

    I don't believe you will be able to use the preselection highlight during an enter function call

    I think this is some internal code not available directly in SKILL

    I guess you will have to re-implement something simillar to the "(De)Select Under Cursor" feature when the entered point is where several shapes overlap

    Cheers,

    Aurel

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago in reply to AurelBuche

    The solution is (I think) to use the geSetEnterFunctionSelectionMode() function which allows you to turn on the dynamic highlighting during an enter function. I adapted your code to use this - rather than first selecting anything, instead it prompts for two points and then the addPointProc takes care of the selection. I may have misinterpreted your needs, but I think this probably does what you want? F3 can be used to toggle the form throughout the entire operation, you see the dynamic highlighting of the potential selection, and at the end you have found two selected objects and coordinates (I changed the function names and cleaned up the code a bit to make it clearer):

    procedure(CCFtestEnter()
        unless(boundp('RoutingAssistanceForm)
            RoutingAssistanceOptionForm()
        )
        ; store some properties on the form to record objects selected
        RoutingAssistanceForm.firstSelection=nil
        RoutingAssistanceForm.firstPoint=nil
        RoutingAssistanceForm.secondSelection=nil
        RoutingAssistanceForm.secondPoint=nil
        enterPoints(
            ?prompts list("First Object" "Second Object")
            ;   ?points list(0:0)
            ?form RoutingAssistanceForm
            ?alwaysMap t
            ?wantPoints 2
            ?initProc "CCFtestFun" ; init / addPoints / delPoints / done
            ?doneProc "CCFtestDone"
            ?addPointProc "CCFtestAddPointProc"
        )
    ) 
    
    procedure(RoutingAssistanceOptionForm()
        let((tempIndex)
            tempIndex=hiCreateFloatField(
                ?name 'tempIndex
                ?value 10.0
                ?callback "CCFtestprint()"
                ?prompt "RoutingAssistanceOptionForm"
            ) 
    
            hiCreateAppForm(
                ?name 'RoutingAssistanceForm
                ?formType 'options
                ?buttonLayout 'HideCancelDef
                ?fields list(
                    list(tempIndex 0:0 400:30 100)
                ) 
            )  
        ) 
    ) 
    
    procedure(CCFtestFun(wid)
        geSetEnterFunctionSelectionMode(wid 4)
        t
    )
    
    procedure(CCFtestAddPointProc(wid pointList)
        let((newPt selection)
            ; probably want to record the two selections
            newPt=car(last(pointList))
            geSingleSelectPoint(wid nil newPt)
            selection=geGetSelSet()
            if(RoutingAssistanceForm.firstSelection then
                RoutingAssistanceForm.secondSelection=selection
                RoutingAssistanceForm.secondPoint=newPt
            else
                RoutingAssistanceForm.firstSelection=selection
                RoutingAssistanceForm.firstPoint=newPt
            )
        )
    )
    
    procedure(CCFtestDone(wid ok pointList)
        printf("FIRST point %L selection %L\n"
    	RoutingAssistanceForm.firstSelection
    	RoutingAssistanceForm.firstPoint
        )
        printf("SECOND point %L selection %L\n"
    	RoutingAssistanceForm.secondSelection
    	RoutingAssistanceForm.secondPoint
        )
    )

    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