• 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 do you toggle between enterPoint() and enterBox()

Stats

  • Locked Locked
  • Replies 15
  • Subscribers 143
  • Views 19082
  • 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 do you toggle between enterPoint() and enterBox()

Adhil
Adhil over 13 years ago

Hi

I am trying to create this align function that functions similarly to that of icstation.

the following describes how the macro is used

1. you select the object that you want to move to align

2. invoke the align function via a bindkey

3. the function prompts you to enter a point which it then uses to select the reference object.

4. complete the action by moving the initially object and aligning it to the reference object.

 how can i make the selection of the reference object be versatile so that i can click to select a reference object or draw a box to select multiple reference objects. i was thinking of a function  that can toggle between enterpoint() or enterbox(), but i dont know how to do this. please help.

thanks

Adhil

  • Cancel
Parents
  • dmay
    dmay over 13 years ago

    The drawThru1Bk function that is defined on the drawThru1 enter function bindkey checks to see what function is running. It only does what you need it to do when the function name matches your command. Otherwise, it runs the command that was originally defined on the drawThru1 bindkey.

    For example, if you have nothing selected and you start the Cadence stretch command, you can select items to stretch using the drawThru1 bindkey. If I had simply replaced the drawThru1 bindkey with a custom command, this functionality would be lost. Now, if you start your enter function using either the x or y bindkeys (for xAlign or yAlign), and then use the drawThru1 bindkey, it will know to do the alignment with the references you select instead of with a single item or point.

    Actually you could tweak the code to use a more generic name than xAlign. I put that in before I modified the code to be able to do a yAlign as well. If you change the cmdName to be "myAlign", then you can change the drawThru1Bk procedure to just check for "myAlign".

    Derek

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • dmay
    dmay over 13 years ago

    The drawThru1Bk function that is defined on the drawThru1 enter function bindkey checks to see what function is running. It only does what you need it to do when the function name matches your command. Otherwise, it runs the command that was originally defined on the drawThru1 bindkey.

    For example, if you have nothing selected and you start the Cadence stretch command, you can select items to stretch using the drawThru1 bindkey. If I had simply replaced the drawThru1 bindkey with a custom command, this functionality would be lost. Now, if you start your enter function using either the x or y bindkeys (for xAlign or yAlign), and then use the drawThru1 bindkey, it will know to do the alignment with the references you select instead of with a single item or point.

    Actually you could tweak the code to use a more generic name than xAlign. I put that in before I modified the code to be able to do a yAlign as well. If you change the cmdName to be "myAlign", then you can change the drawThru1Bk procedure to just check for "myAlign".

    Derek

    • 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