• 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. Use for loop to create dynamic field in hiCreateAppForm

Stats

  • Locked Locked
  • Replies 11
  • Subscribers 143
  • Views 17845
  • 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

Use for loop to create dynamic field in hiCreateAppForm

mantang
mantang over 5 years ago

Hi 

I use for loop to generate same two fields 10 times, so I could change # of two fields easily in the future. Since nameHandle "symmetry1" and "group_instance" or symbol "'instances" and "'symmetry1" are same for two fields (10 times), how could I access the value of 20 fields (10 x 2 fields) in the form callback procedure ? Is it the correct approach ?

I could create 20 fields one by one using different symbol and nameHandle manually, but I don't think it is a good approach for code maintenance. Any suggestion ?  

I saw an article about dynamic field https://community.cadence.com/cadence_technology_forums/f/custom-ic-skill/35948/accessing-dynamic-form-fields  , but I do not know how to use the code in hiCreateAppForm and nameHandle is the same for different symbol name of hiCreateRadioButton.

 

group_instance = hiCreateStringField(
?name 'instances
?prompt "Group instances"
)
symmetry1 = hiCreateRadioField(
?name 'symmetry1
?prompt "Device symmetry"
?choices list("Y" "N")
?value "Y"
?callback "symmetry1CB(hiGetCurrentForm())"
)


allList = nil
startx = 0
starty = 210
width = 600
height = 30

for(i 0 9
finalx = startx
finaly = 210 + (i*height)
finalx_f2 = finalx
finaly_f2 = finaly + height
flist = list(list(group_instance finalx:finaly width:height) list(symmetry1 finalx_f2:finaly_f2 width:height))
allList = append(allList, flist)
)

hiCreateAppForm(
?name 'ExampleForm
?formTitle "example form"
?callback 'ExampleFormCB
?fields allList

..

)

Thanks,

ManChak

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 5 years ago in reply to mantang

    I guess you need to see my answer to your other post which seems to be asking for related information?

    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