• 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 Can i distinguish the mouse click and drag in enterfunction...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 144
  • Views 9027
  • 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 Can i distinguish the mouse click and drag in enterfunction???

jjoon2
jjoon2 over 3 years ago

HI, Sir 

I have a question about input by mouse click.

I'm using the following function (using enterfunction).

"(command --> Mouse Click X 2 (objects select) --> Auto Property Change )"

But I want to add a new function. 

after entering the command, if you select an area by dragging the mouse rather than clicking the mouse, 

i want to you to do a different action on teh objects in the area.(It's a different behavior than the input through the mouse click.)

So I need to know How can i distinguish the mouse click and drag in enter function.

Please, Can i get some hint?

"(command    --> Mouse Click X 2 (objects select) --> Auto Property Change1

                      --> Mouse drag Input(area select)     --> Auto Property Change2)"

------------------------------------------------------------------------------------------------------------------------------------------------------
      • 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
            )
        )
  • Cancel
  • psill00
    psill00 over 3 years ago

    You need to load the stroke key functions to define stroke/draw feature
    To the the install path          getInstallPath()

    from your install path go to the stroke directory ( from the dfII go to the path below )
    dfII/etc/sted/


    files needed to load into cadence session
    def.strokes    ( binary file of the stroke definitions )
    defstrokes.il  ( your bindkey definitions )
    sted.env      ( environment stuff )
    stroke.il       ( cadence stuff )

    you will need a command line to bring up the gui to create your stroke keys/definitions
    readme file have the command line to bring up the stroke def gui

    I am not sure how well the stroke functions are supported now, but if you get some practice they are handy.

    Paul

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

    If you do a search for stroke in the forum you can see the method to defining the stroke for scripts or cadence functions

    Paul

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 3 years ago

    This question was re-asked in the this subsequent post.

    • 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