• 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. About method to distinguish mouse inpust.

Stats

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

About method to distinguish mouse inpust.

jjoon2
jjoon2 over 3 years ago

Hi. sir

Honestly I asked about this problem a few days ago. But I could not get answer...

So I organized the questions and uploaded them again.

I'm making some automation utility in Virtuoso Layout.

Fisrt, leRoutingAssistance can automatically modify property of selected two objects (Select two objects with two mouse clicks).

Second, if there are many object to choose from, using leRouitngAssistance_Multi. It allows you to select multiple objects at once by dragging mouse.

The algorithm for the function is as follows.

-------------------------------------------------------------------------------------------------------------------------------------------------------------

leRouitngAssistance Start --> Mouse click to 1st object --> get data of 1st object
--> Mouse click to 2nd object --> get data of 2nd object

--> Compare 1st / 2nd object, 1st / 2nd click point and modify property

--> leRouitngAssistance END

leRouitngAssistance_Multi --> Mouse drag --> get data of objects

--> Compare the all selected objects and modify property

--> leRouitngAssistance_Multi END

-------------------------------------------------------------------------------------------------------------------------------------------------------------

Each function was completed through Enterfunction. But I want combine function of each to only one function like the algorithm below.


Function Start
==> if Mouse click to 1st object --> After that, proceed in the same way as operation leRouitngAssistance
==> if Mouse drag --> After that, proceed in the same way as operation leRouitngAssistance_Multi

currently i use bindkey and enterfuction bindkey like this : list("<Key>D" "leRoutingAssistance()" "cancelEnterFun() leRoutingAssistance_Multi()")

It may be greedy, but I want to reduce what I have to input the keyboard twice to one. So I want to distinguish the mouse input.

Is there any way to solve this problem?

====================================================================================================

Please understand that we only brought the core part of the code for readability.

procedure(leRoutingAssistance()
prog((layerData rtData)

unless(boundp('RoutingAssistanceForm)
RoutingAssistanceOptionForm()
); unless

enterPoints(
?prompts list("First Object" "Second Object")
?form RoutingAssistanceForm
?wantPoints 2
?initProc "initProc_setSelectMode" ;; EnterFunction select mode = dynamic highlight on
?doneProc "doneProc_RoutingAssistance" ;; Function to automatically change property of selected objects
?addPointProc "addPointProc_getSelectObj" ;; gets the information of the objects selected by the mouse click(using geGetSelSet() )
?noInfix ,window(1)->infix ;; Infix Mode T / Non Infix Mode nil
); enterPoins
) ; prog
); procedure

procedure(leRoutingAssistance_Multi()
prog((layerData rtData)

unless(boundp('RoutingAssistanceForm)
RoutingAssistanceOptionForm()
); unless

enterBox(
?doneProc "rtData = doneProc_RoutingAssistance_Multi" ;;
?noInfix ,window(1)->infix ;; Infix Mode T / Non Infix Mode nil
); enterBox
) ; prog
); procedure

  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 3 years ago

    It's not entirely obvious what you are trying to do, but maybe you just need to define an enter function bindkey for <DrawThru1>EF which calls leRoutingAssistance_Multi - maybe only when it's already inside the other enterFunction? Something like:

    procedure(MyDrawThru() printf("INFO: %L %L\n" hiInEnterFun() hiGetCurrentCmd(hiGetCurrentWindow())) enterBox(?doneProc "MyDoneProc"))
    procedure(MyDoneProc(@rest args) printf("FINISHED: %L %L %L\n" hiInEnterFun() hiGetCurrentCmd(hiGetCurrentWindow()) args))

    then having the bindkey for <DrawThru1>EF calling MyDrawThru - of course it probably should be selective and call the default function for DrawThru1 EF if not in the current enter function.

    Something like that - I've not really tried all this out.

    Andrew

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

    It's not entirely obvious what you are trying to do, but maybe you just need to define an enter function bindkey for <DrawThru1>EF which calls leRoutingAssistance_Multi - maybe only when it's already inside the other enterFunction? Something like:

    procedure(MyDrawThru() printf("INFO: %L %L\n" hiInEnterFun() hiGetCurrentCmd(hiGetCurrentWindow())) enterBox(?doneProc "MyDoneProc"))
    procedure(MyDoneProc(@rest args) printf("FINISHED: %L %L %L\n" hiInEnterFun() hiGetCurrentCmd(hiGetCurrentWindow()) args))

    then having the bindkey for <DrawThru1>EF calling MyDrawThru - of course it probably should be selective and call the default function for DrawThru1 EF if not in the current enter function.

    Something like that - I've not really tried all this out.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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