• 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 143
  • Views 8073
  • 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
  • Andrew Beckett
    Andrew Beckett over 16 years ago

    Is this some University project? This sounds remarkably like https://www.cadence.com/Community/forums/p/12606/18010.aspx#18010 posted a few minutes ago.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Austin CAD Guy
    Austin CAD Guy over 16 years ago

     My response from another post:

    There are a couple of ways to do this:

     enterPoints - This enter function can prompt for points and use the callback to enter the information into a file.

     hiGetCommandPoint - gets the location of the pointer at the last click, place in a loop and as the user clicks the points, the points will be returned.

    3 - there are 3 ways to do this:

     hiGetPoint - Gets the current xy location of the cursor. Does not need a mouse click.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • skillUser
    skillUser over 16 years ago

    Hi,

    In addition to what Ted has said, you will also probably want to use the outfile(), fprintf() and close()  SKILL functions for opening, writing to and closing the file respectively.

    Best regards,

    Lawrence.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Chin Cypress
    Chin Cypress over 16 years ago

     No. its not the university project. we both are friends but without notice bharath also raised the issue. 

    Please reply for this alone. Thanks Bracknell for pointing.

     

    Rgds

    Chin 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • kbhow
    kbhow over 16 years ago

    Hi Chin,

    Haha... looks like you and Bharath is lookign for same coding. Probably is some assignment or task. You may refer to Bharath post.

     Regards,

    How 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Chin Cypress
    Chin Cypress over 16 years ago

    Hi

       Out of your 3 ways choosen one.Can u suggest there is any syntax problem in the follwoing code.

    Please correct the code & post. 

    cvid = geGetEditCellView()
    coordlist = hiGetCommandPoint(cvid)

    printf("co-ordinate is  = %d" coordlist)

     Rgds

    Chin 

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • 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
  • Chin Cypress
    Chin Cypress over 16 years ago

    Hi Andrew

                   Sure i will correct my way of approach.But sincerly I worked on it and got the errors then only posted to the community.

    I  further worked on the script for the development purpose and got struck at a point.

    The requirement is to pass the value "coord" to the   procedure(ABcursorPoint().

    But error flasing as "*Error* eval: unbound variable - coord" . Please suggest any other way to approach the problem.

    Rgds

    Chin 

     

     

    /**************************************************************
    *                 Prints the x y coordinate                   *
    * loaded in the variable in the coord                         *
    ***************************************************************/
    cvid = geGetEditCellView()

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

    procedure(ABcursorPoint()
             (leZoomToPoint cvid coord)
    )


    hiSetBindKey("Layout" "t" "MYgetPoint()")
    hiSetBindKey("Layout" "Shift<Key>t" "ABcursorPoint()")
     

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 16 years ago
    procedure(ABcursorPoint()  
    leZoomToPoint(
    geGetEditCellView()
    hiGetCommandPoint()
    )
    )

    Should do it. I didn't test this as I'm sending this from an airport lounge...

    Regards,

    Andrew
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Chin Cypress
    Chin Cypress over 16 years ago

    Thanks for your extra effort andrew..:)

      I have tried working on your suggestion,but i found other errors,..

    \a MYgetPoint()
    \i 8.71:64.43
    \o (8.71 64.43)
    \r t
    \a ABcursorPoint()
    \i 8.065:61.91
    \o *** Error in routine leZoomToPoint:
    \o Message: *Error* leZoomToPoint: argument #1 should be a window type (type template = "wl") - db:-2072629204

         

                I will take you throught the actual requirement behind this, so that you can guide us in a better way..The requirement goes like this,

    1.We are trying to copy a xy co-ordinate by pressing a bindkey 't' from layout window 1 

    2.With the help of this co-ordinate we are pointing to exactly same location in layout window   '2' by pressing a bindkey 'shift<t>'

             Please suggest us the correct way to proceed further..

    Regards,

    --Chin 

      

      

     

    • 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