• 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. bindkey to move selected object

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 143
  • Views 17341
  • 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

bindkey to move selected object

mctang
mctang over 9 years ago

Hi All,

I want to create my own bindkey to use key 5/6/7/8 to move a select object left/right/up/down, and the moving distance is 0.005 upon each key-pressing.

eg, if I press key ‘5’, the selected(highlighted) object will move up 0.005, press ‘6’ will move it down 0.005, etc.

 

Currently in Virtuoso, we can only move the object by dragging the mouse.  But I’m used to use bindkey in other layout tools, and I want to do the same in Virtuoso.

 

I myself tried following , but it didn’t work (it always popped out Move window which I do not like) :

 

procedure( leMoveObj(deltx delty)

    leHiMove()

    le0MoveForm->moveXField->value=deltx

    le0MoveForm->moveYField->value=delty

    _leApplyDeltaCB(hiGetCurrentWindow())

)

 

hiSetBindKey("Layout" "<Key>5" "leMoveObj(-0.005 0)")

hiSetBindKey("Layout" "<Key>6" "leMoveObj(0.005 0)")

hiSetBindKey("Layout" "<Key>7" "leMoveObj(0 0.005)")

hiSetBindKey("Layout" "<Key>8" "leMoveObj(0 -0.005)")

Any suggestion ?

Thanks,

ManChak

  • Cancel
  • RK56
    RK56 over 9 years ago

    Hi ManChak

    You can try with hiReplayFile and put all the commands related to form like invoking the form, entering x and y fields and pressing ok or apply in the form.

    Having said the above, your way for moving objects is not my favorite.

    • I have created a toolbar with direction buttons and delta XY entries.
    • Or you may use non HI procedures like leMoveFig or leMoveObject
    • Or Instead of move function you can try with Stretch. Advantage with stretch is that if a object is fully selected, it moves else it stretches.
    • Or You may use cadence's dx and dy by pressing TAB button

    Thanks

    Ramakrishnan

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

    I agree with Ramakrishnan. Something like:

    procedure(MyMoveSelected(deltax deltay)
      let((xform)
        xform=list(deltax:deltay "R0" 1)
        foreach(obj geGetSelSet()
          dbMoveFig(obj nil xform)
        )
      )
    )

    The above is untested, but it would be something like that to move all the selected objects.

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • mctang
    mctang over 9 years ago

    Hi Andrew and Ramakrishnan,

    Thank you for your suggestions. I modified Andrew 's code "dbMoveFig(obj nil xform)". It works well now. (Moderator note: corrected Andrew's original code to add the missing argument)

    Thanks,

    ManChak

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Rakesh 25
    Rakesh 25 over 5 years ago

    What is the purpose of this syntax  " le0MoveForm"    I tried searching in API finder but Im not able to find.
    Please can explain exactly what does this line do 

    mctang said:

    le0MoveForm->moveXField->value=deltx

        le0MoveForm->moveYField->value=delty

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to Rakesh 25

    Well, as described in the thread above, this is not a terribly good way of doing it because it depends on the interactive forms having been run. What has happened here is that the original poster will have used the interactive move command in the layout editor, and typed in values on fields on the form - and then captured the commands in the CDS.log (and the CIW if the log filter settings are set appropriately) which record how the form was filled in. In general we don't document those - they're there to enable replay of the log file in the same conditions. In this case the form has a number as part of it - I think (if I remember rightly) this is because we keep the form unique for different technologies (may be for different windows - I didn't check). 

    Anyway, the point is that this is precisely why you don't want to be using this approach to do your automation, as it relies on both undocumented behaviour, and also potentially the form name may change depending on what you've done before. Hence the suggestion to use the dbMoveFig approach.

    • 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