• 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. Using for loop inside hiCreateAppForm fields

Stats

  • Locked Locked
  • Replies 10
  • Subscribers 143
  • Views 15908
  • 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

Using for loop inside hiCreateAppForm fields

Sandeep4386
Sandeep4386 over 12 years ago
Hi,
I am encountering an error while using a for loop inside hiCreateAppForm fields. Here is the error message:
*Error* hiCreateAppForm: not all fields have 2D attributes specified, and/or illegal attribute values 
 
However if I comment out the for loop then error goes away. 
 
hiCreateAppForm(
?name 'Form
?formTitle "test form"
?fields
list(
      
       list(label 0:0 600:30 200)
list(all 10:30 600:30 20)
list(none 10:60 600:30 20)
list(cellviewFrame 0:90 600:30 200)
for(i 1 count 
  list(cellview[i] 10:90+(i*30) 600:30 20)
);for  
      );list
);hi createAppForm
       
hiDisplayForm(Form)
 
Any help would be appreciated.
P.S. cellview has been declared as an arry in earlier part of the code (declare(cellview[2]) ) 
 
Regards,
Sandeep 
  • Cancel
Parents
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    Sandeep,

    The code as Lawrence posted it won't work because it would not be a correctly structured list - for a 2D form you need a list of sublists, and what you would have got is a list of sublists for the first four fields, and then a sublist containing sublists for each cellView.

    So you'd need something like this:

    hiCreateAppForm(
       ?name 'Form
       ?formTitle "test form"
       ?fields
         append(
    list( list(label 0:0 600:30 200) list(all 10:30 600:30 20) list(none 10:60 600:30 20) list(cellviewFrame 0:90 600:30 200)
    ) foreach(mapcar i linRg(1 count 1) list(cellview[i] 10:90+(i*30) 600:30 20) );foreach mapcar );append );hiCreateAppForm

     

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • Andrew Beckett
    Andrew Beckett over 12 years ago

    Sandeep,

    The code as Lawrence posted it won't work because it would not be a correctly structured list - for a 2D form you need a list of sublists, and what you would have got is a list of sublists for the first four fields, and then a sublist containing sublists for each cellView.

    So you'd need something like this:

    hiCreateAppForm(
       ?name 'Form
       ?formTitle "test form"
       ?fields
         append(
    list( list(label 0:0 600:30 200) list(all 10:30 600:30 20) list(none 10:60 600:30 20) list(cellviewFrame 0:90 600:30 200)
    ) foreach(mapcar i linRg(1 count 1) list(cellview[i] 10:90+(i*30) 600:30 20) );foreach mapcar );append );hiCreateAppForm

     

    Regards,

    Andrew.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

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