• 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. Require Run time creation of unique Radio buttons

Stats

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

Require Run time creation of unique Radio buttons

JPBharti
JPBharti over 8 years ago

Hi,

I am trying to develop a GUI where the number of radio buttons will be decided once the script is run. I need to have these run time formed radio button symbols matched to a list of pin names(string type, maybe here I can use a table), so that I can do some operation when a particular radio button is selected.

I am writing down the code snippet :

myPinTable=makeTable("PINTABLEKEY" "PINTABLEVALUE")
terminalsList =car(geGetSelectedSet())~>master~>terminals~>name
numTerminals=length(terminalsList)

; radiosymbolfield creation
for(i 1 numTerminals

radiosymbol=gensym(strcat("radio" pcExprToString(i)))
myPinTable[nthelem(i terminalsList)]=radiosymbol           ; Mapping terminals names to corresponding radio symbols
radioList=list(hiCreateRadioField(

?name radiosymbol
?prompt nthelem(i terminalsList)
?choices list("Yes" "No")?
?defValue "No"

)    20:(70+(20*i)   200:(70+(20*i))    200)

)

There is also another boolean field(Select_All) when enabled will change the state of all radio buttons to "Yes". Below procedure is mentioned as the callback function of the boolean field. PINLISTFORM is the symbol for the AppForm.

procedure(selectionAll(terminalsList myPinTable)

PINLISTFORM~>Select_All~>value=t  
PINLISTFORM~>Select_None~>value=nil
foreach(elem terminalsList 

PINLISTFORM~>myPinTable[elem]~>value="Yes"

)

);proc

When I run the script, I get the following error and the AppForm does not pop up.
*Error* arrayref: can't handle nil["ithermn20_b"]

If I comment out the selectionAll procedure and remove the callback in the boolean field. I can see the form getting defined and displayed. Can someone tell me where am I going wrong in the implementation?

Thanks,
Jay

  • Cancel
  • dmay
    dmay over 8 years ago

    You can't access the value this way:

    PINLISTFORM~>myPinTable[elem]~>value="Yes"

    You can try it this way:

    get(PINLISTFORM myPinTable[elem])~>value="Yes"

    Also, the second value to the makeTable command is the default value for table items. Thus, if you access an element that has not explicitly been added to the table, you'll get a value back. You used "PINTABLEVALUE". Maybe this is what you want. I often use nil so I can easily do an existence check like: when(myPinTable[elem] 

    Derek

    • 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