• 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. How to switch off and on the String fields option using...

Stats

  • Locked Locked
  • Replies 3
  • Subscribers 143
  • Views 11871
  • 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

How to switch off and on the String fields option using radio button

saurabh96
saurabh96 over 4 years ago

Hi,
I have created two radio button 1 and 2 respectively and below that two string fields 1 and 2 with browse button for each .Now I want that when I select radio button 1, string filed 2 automatically gets disabled and when I select radio button 2, string filed 1 get disabled.
How to create it using SKILL GUI.
I am new to the skill. Any guidance will be appreciated.

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

    You'd call a callback function from the radio button fields which then calls hiSetFieldEnabled with the string fields to enable them or not.

    Andrew

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • saurabh96
    saurabh96 over 4 years ago in reply to Andrew Beckett

    Hello Andrew,

    Thanks for quick reply. 
    Although am still getting error and warning ...

    net= hiCreateStringField(
    ?name 'net
    ?prompt "Enter Netlist Path"
    ?value ""
    )

    button_net_data = hiCreateButton(
    ?name 'button_net_data
    ?buttonText "Browse"
    ?callback "ddsFileBrowseCB(hiGetCurrentForm() 'net \"\" 'fileOnly)"
    )

    libNameField = hiCreateStringField(
    ?name 'libName
    ?prompt "library_name"
    ?value ""
    )

    browseSourceButton = hiCreateButton(
    ?name 'browseSource
    ?callback "dmbSyncWithForm(AppForm 'browse 'libName 'CycField)"
    ?buttonText "Browse"
    )

    netlists=hiCreateRadioField(
    ?name 'netlists
    ?prompt ""
    ?choices list("Netlist Path" "Cell View")
    ?value "Cell View"
    ?enabled t
    ?callback list("(hiSetFieldEnabled() 'netlists 'net '(t nil ) ;;)"
    )
    )

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • saurabh96
    saurabh96 over 4 years ago in reply to Andrew Beckett

    Hello Andrew,

    Thanks for quick reply. 
    Although am still getting error and warning ...

    net= hiCreateStringField(
    ?name 'net
    ?prompt "Enter Netlist Path"
    ?value ""
    )

    button_net_data = hiCreateButton(
    ?name 'button_net_data
    ?buttonText "Browse"
    ?callback "ddsFileBrowseCB(hiGetCurrentForm() 'net \"\" 'fileOnly)"
    )

    libNameField = hiCreateStringField(
    ?name 'libName
    ?prompt "library_name"
    ?value ""
    )

    browseSourceButton = hiCreateButton(
    ?name 'browseSource
    ?callback "dmbSyncWithForm(AppForm 'browse 'libName 'CycField)"
    ?buttonText "Browse"
    )

    netlists=hiCreateRadioField(
    ?name 'netlists
    ?prompt ""
    ?choices list("Netlist Path" "Cell View")
    ?value "Cell View"
    ?enabled t
    ?callback list("(hiSetFieldEnabled() 'netlists 'net '(t nil ) ;;)"
    )
    )

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
  • Andrew Beckett
    Andrew Beckett over 4 years ago in reply to saurabh96

    Your callback was completely wrong. I've no idea how you ever thought that would work as it seems a fairly random set of words you've put in the string, rather than actually being code (hiSetFieldEnabled is a function that needs two arguments, and you've provided no arguments). Perhaps you should follow the SKILL Language Programming course on http://support.cadence.com ?

    I updated the code (I added a very simple form at the end just to prove it works), so you wouldn't need that bit. I call the callback after the form is created just to set the initial enabled/disabled settings appropriately:

    net= hiCreateStringField(
      ?name 'net 
      ?prompt "Enter Netlist Path"
      ?value "" 
    )
    
    button_net_data = hiCreateButton(
      ?name 'button_net_data 
      ?buttonText "Browse" 
      ?callback "ddsFileBrowseCB(hiGetCurrentForm() 'net \"\" 'fileOnly)"
    )
    
    libNameField = hiCreateStringField(
      ?name 'libName
      ?prompt "library_name"
      ?value ""
    )
    
    browseSourceButton = hiCreateButton(
      ?name 'browseSource
      ?callback "dmbSyncWithForm(AppForm 'browse 'libName 'CycField)"
      ?buttonText "Browse"
    )
    
    netlists=hiCreateRadioField(
      ?name 'netlists
      ?prompt ""
      ?choices list("Netlist Path" "Cell View")
      ?value "Cell View"
      ?enabled t
      ; no idea how this was supposed to work - it's a random set of values!
      ;?callback list("(hiSetFieldEnabled() 'netlists 'net '(t nil ) ;;)"
      ?callback list("MyEnableFields(hiGetCurrentForm())")
    )
    
    procedure(MyEnableFields(form)
      let((netEnabled)
        case(form->netlists->value
          ("Cell View"
            netEnabled=nil
          )
          ("Netlist Path"
            netEnabled=t
          )
        )
        hiSetFieldEnabled(form->net netEnabled)
        hiSetFieldEnabled(form->button_net_data netEnabled)
        hiSetFieldEnabled(form->libName !netEnabled)
        hiSetFieldEnabled(form->browseSource !netEnabled)
      )
    )
    
    hiCreateAppForm(?name 'forum86 ?fields list(net button_net_data libNameField browseSourceButton netlists))
    MyEnableFields(forum86)
    hiDisplayForm(forum86)
    • 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