• 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. String parameter

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 143
  • Views 9606
  • 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

String parameter

Ali ElBoghdady
Ali ElBoghdady over 3 years ago

Hi all, I have a simple code to show only Metal layers on the keyboard pressing (1,2,3 ..) i.m trying to pass a string as a parameter for a function but i get an error as my string is inside another.  

here is the code: 

procedure( showMetal(layer)
pteSetActiveLpp(layer)
pteSetNoneVisible(?panel "Layers")
);procedure


hiSetBindKeys( "Layout" list(
list("<key>1" "showMetal("M1 drawing")" "bindKeyCommand1()")
list("<key>2" "showMetal("M2 drawing")" "bindKeyCommand2()")
list("<key>3" "showMetal("M3 drawing")" "bindKeyCommand3()")
list("<key>4" "showMetal("M4 drawing")" "bindKeyCommand4()")
list("<key>5" "showMetal("M5 drawing")" "bindKeyCommand5()")
)) ;; hiSetBindKeys

The error appears at the part:  list("<key>1" "showMetal("M1 drawing")" "bindKeyCommand1()") as M1 drawing is string, so how should i approach this? is it concatenation or something else?

Thanks in advance.

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

    A quotation mark within a string needs to be escaped with a backslash. So they should be:

    "showMetal(\"M1 drawing\")"

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 3 years ago

    A quotation mark within a string needs to be escaped with a backslash. So they should be:

    "showMetal(\"M1 drawing\")"

    Andrew

    • Cancel
    • Vote Up +1 Vote Down
    • Cancel
Children
  • Ali ElBoghdady
    Ali ElBoghdady over 3 years ago in reply to Andrew Beckett

    Thanks Andrew that worked like a charm !

    • 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