• 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 IDE bind key to run code in selection

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 4997
  • 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 IDE bind key to run code in selection

zigi
zigi over 1 year ago

Hi,

I am trying to create a bindkey for skill IDE that will enable me to select part of the code in the IDE window and execute it. (similar to load , but only for the selected portion.)

(similar to Jupiter-NB  Ctrl-Shift-Enter :) )

I did something like this:

hiSetBindKey("SkillIDE" "Shift Ctrl<Key>R"
"
active_tab=hiGetActiveTabWindow(ilGetIdeSessionWindow())
_ilgGetFromActiveTab('copy)
_ilgFileNew()
_ilgGetFromActiveTab('paste)
_ilgFileLoad()
_ilgSetFocus(active_tab)
hiRaiseWindow(active_tab t)
"
)

It works but I face 2 issues:

1. I am not able to jump back the original tab (the hiRiseWindow - does not work).

2. and I was not able to find a way to close the temporal created new tab. I dried to close it, but then it asks for confirmation, and I was not able to pass to it the discard directive.

Any idea how to fix it?

Or - is there a better way to achieve it?

Thanks,

Zelig.

  • Cancel
  • AurelBuche
    AurelBuche over 1 year ago

    Hi,

    The following solution should work nicely : 

    (when (ilgGetSelectedLocation) (evalstring (pcreReplace (pcreCompile "\n") (destructuringBind (beg end) (ilgGetSelectedLocation) (ilgGetText beg end)) " " 0)))

    Cheers

    Aurélien

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
  • Andrew Beckett
    Andrew Beckett over 1 year ago in reply to AurelBuche

    Thanks Aurélien - that's a much better approach since it use public functions; the approach that Zelig was taking is full of private functions and these are a) not intended for custom SKILL code, plus b) may change or be removed unexpectedly in the future.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • zigi
    zigi over 1 year ago in reply to AurelBuche

    Thank you - it works like magic. Very cool. Appreciate your help. Happy holidays.

    • 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