• 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. Skill: How to run procedure upon the path draw?

Stats

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

Skill: How to run procedure upon the path draw?

dell1
dell1 over 14 years ago

Dear All,

I need to run certain procedure after the user click the first point to draw a path (using the "<Key>p" binding key).

Is there a way to do that in Skill?

 Thanks

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 14 years ago

    There's not really a general way of doing this, but something like this could be used:

    procedure(ABpathIntercept()
      mouseAddPt(t)
      when(hiGetCurrentCmd(hiGetCurrentWindow())=="Path"
        printf("POINT WAS %L\n" hiGetCommandPoint())
      )
    )

    hiSetBindKey("Layout" "<Btn1Down>EF" "ABpathIntercept()")

    The trouble is knowing which is the first point - there doesn't seem to be an API to know that directly. Maybe using changeEnterFun, but you'd have to know what the function that is being called for create path is, and I think that's done at the C level. One way would be to keep a list (would have to be per window though, so maybe as a property on the window, or in a global table), and then wrap the bindkey for create path so that it resets the list. Then you'd also have to change the bindkey for backspace so that it removed the last point (to allow the first point to be reentered). So it gets messy very quickly. And infix would be a different problem.

    Just tryng to point out that the above would be an imperfect solution.

    Regards,

    Andrew.

     

    • 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