• 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 enhancement: How to keep the function active until...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 14333
  • 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 enhancement: How to keep the function active until Escape key is pressed

ssram
ssram over 5 years ago

Hi,

I've got the following script to add markers in the layout.

Calling the function srCreateLayMarker() would keep it active until i click on the layout, and it goes away. How can i make this function stay active until an escape key is pressed?

Thanks

Ram

;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

procedure(srCreateLayMarker( @optional (pt nil) (cv geGetEditCellView()) )
let((mid lbl_txt lbl )

unless(cv && cv~>cellViewType=="maskLayout"
error("A layout cellview must be open to create the marker at current location")
)

unless(pt
pt=hiGetPoint(hiGetCurrentWindow())
)
sprintf(lbl_txt "%L %L" car(pt) cadr(pt))

mid=dbCreateMarker(cv "marker" "srCreateLayMarker" list(pt) )

lbl= dbCreateLabel(cv list("y0" "drawing" ) pt lbl_txt "centerLeft" "R0" "roman" 0.1)
lbl~>parent=mid
);let
);proc

hiSetBindKey("Layout" "F10" "srCreateLayMarker()")

;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

  • Cancel
Parents
  • mbracht
    mbracht over 5 years ago

    Hi Ram,

    I don't really understand what you mean with "Calling the function srCreateLayMarker() would keep it active".
    I tried your code - as long as the mouse pointer is in a layout window and I click F10 (the bindkey...) it works perfectly well for me. Calling the function manually from the CIW throws an error because hiGetPoint(hiGetCurrentWindow()) returns nil when the mouse pointer  is not in the layout window. This leads subsequently to an error in dbCreateMarker(..) then.
    So as I said I don't exactly understand your question but if you change the unless() statement to

    unless(pt
                pt = hiGetPoint(hiGetCurrentWindow()) || (0:0))

    ...you will be able to call the function either though the bindkey or manually from the CIW.

    Max

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

    Ram,

    I suspect that what is really wanted here is to use enterPoints() and then have the code be triggered on each point that is added until escape is pressed. That's going to be the easiest solution. There are a number of other similar posts on the forums - search for "enterPoints" or "enter function" for more details. Or look in the documentation for enterPoints.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to mbracht

    Ram,

    I suspect that what is really wanted here is to use enterPoints() and then have the code be triggered on each point that is added until escape is pressed. That's going to be the easiest solution. There are a number of other similar posts on the forums - search for "enterPoints" or "enter function" for more details. Or look in the documentation for enterPoints.

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • ssram
    ssram over 5 years ago in reply to Andrew Beckett

    Thanks 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