• 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. Need the X:Y co-ordinates of the point

Stats

  • Locked Locked
  • Replies 12
  • Subscribers 149
  • Views 9117
  • 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

Need the X:Y co-ordinates of the point

Chin Cypress
Chin Cypress over 16 years ago

Hello all

          I need the x:y co-ordinates of the point where i clicked in the layout editor window.

Requirement : need to get the points and print in to the file.

 Please suggest the command to be used ASAP

Rgds

Chin 

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

    Did you actually try this? If  you try it, you'll get error messages which make it very clear. For example, when you try to pass a cellView id to hiGetCommandPoint, it says:

    *Error* hiGetCommandPoint: argument #1 should be a window type (type template = "w") - db:202165292

    If you read the manual for this function, that is also clear. So something like:

    coordlist=hiGetCommandPoint()

    would do it. However, this would need to be triggered by a bindkey, because if you just type it in the CIW, the cursor would have left the window, and hence it will return  nil.

    The next problem is that you're trying to do use %d to print a list. %L would be better - %d will give an error because the return value of the function is not an integer.

    So if you do:

    procedure(MYgetPoint()
      let((coord)
        coord=hiGetCommandPoint()
        printf("Point was %L\n" coord)
      )
    )

    hiSetBindKey("Layout" "<Key>x" "MYgetPoint()")

    It will work.

    It may be your English, but people will be more willing to help if you appear to have tried to figure it out yourself, explaining what you tried, what the errors were and so on. As it is, your post looks more like "please do my work for me"...

    Regards,

    Andrew.

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

    Did you actually try this? If  you try it, you'll get error messages which make it very clear. For example, when you try to pass a cellView id to hiGetCommandPoint, it says:

    *Error* hiGetCommandPoint: argument #1 should be a window type (type template = "w") - db:202165292

    If you read the manual for this function, that is also clear. So something like:

    coordlist=hiGetCommandPoint()

    would do it. However, this would need to be triggered by a bindkey, because if you just type it in the CIW, the cursor would have left the window, and hence it will return  nil.

    The next problem is that you're trying to do use %d to print a list. %L would be better - %d will give an error because the return value of the function is not an integer.

    So if you do:

    procedure(MYgetPoint()
      let((coord)
        coord=hiGetCommandPoint()
        printf("Point was %L\n" coord)
      )
    )

    hiSetBindKey("Layout" "<Key>x" "MYgetPoint()")

    It will work.

    It may be your English, but people will be more willing to help if you appear to have tried to figure it out yourself, explaining what you tried, what the errors were and so on. As it is, your post looks more like "please do my work for me"...

    Regards,

    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