• 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. Allegro X PCB Editor
  3. Modify film_reorder.il

Stats

  • Replies 9
  • Subscribers 163
  • Views 15995
  • Members are here 0
More Content

Modify film_reorder.il

bulldog
bulldog over 12 years ago

I have been looking at the program "film_reorder.il" (available at cadence.com) and have found it useful but would like to make a small modification to it.  After you have selected a layer to be moved (up or down) in the list you have to re-select it if you want to move it more than one position.  Does anyone know of a way to modify this program so the selected layer stays selected until another layer is selected?  I would like to just click the up/down arrow X times until it is moved into the correct position without having to keep re-selecting the layer.

Thanks!

  • Sign in to reply
  • Cancel
Parents
  • Johnny Lam
    Johnny Lam over 9 years ago

    Hi Ole,

         I like this film_reorder skill file, But when I insert code. did not work for me. Please help.            

    )
    ("UP"
    for(key 0 film_count-1
    film_order[key] = nth(key val)
    ); end for unless
    (setq count -1) (setq j -1)
    (prev_list = final_list = next_list = nil)
    (setq sel_index 0 )
    sel_items = axlFormListGetSelItems(myform "FILMS_LIST")
    unless(length(sel_items) != 1
    foreach(items val
    j++
    unless(items != car(sel_items)
    sel_index = j
    ) ; end unless
    ) ; end foreach
    (setq haha film_order[sel_index])
    if(sel_index != 0 then
    current_prev = film_order[sel_index-1]
    else (setq current_prev nil) final_list = val); end if
    unless(current_prev == nil
    for(key 0 sel_index-2
    prev_list = append(prev_list list(film_order[key]))
    ); end for
    for(key sel_index+1 length(brd_films)-1
    next_list = append(next_list list(film_order[key]))
    ) ; end for
    unless(sel_index-2 == -1
    final_list = append(prev_list final_list)
    ) ; end unless
    final_list = append(final_list list(haha))
    final_list = append(final_list list(current_prev))
    unless((sel_index+1 > length(brd_films)-1)
    final_list = append(final_list next_list)
    ) ; end unless
    ) ; end unless
    ) ; end if
    axlFormListDeleteItem(myform, "FILMS_LIST" val)
    if(final_list == nil then (setq final_list val))
    axlFormListAddItem(myform, "FILMS_LIST" final_list 0)
    (setq val final_list)
    if(sel_index > 0 then
    axlFormListSelect(myform "FILMS_LIST" sel_index-1)
    else
    axlFormListSelect(myform "FILMS_LIST" 0)
    )
    ("DOWN"

    Thanks

      

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Johnny Lam
    Johnny Lam over 9 years ago

    Hi Ole,

         I like this film_reorder skill file, But when I insert code. did not work for me. Please help.            

    )
    ("UP"
    for(key 0 film_count-1
    film_order[key] = nth(key val)
    ); end for unless
    (setq count -1) (setq j -1)
    (prev_list = final_list = next_list = nil)
    (setq sel_index 0 )
    sel_items = axlFormListGetSelItems(myform "FILMS_LIST")
    unless(length(sel_items) != 1
    foreach(items val
    j++
    unless(items != car(sel_items)
    sel_index = j
    ) ; end unless
    ) ; end foreach
    (setq haha film_order[sel_index])
    if(sel_index != 0 then
    current_prev = film_order[sel_index-1]
    else (setq current_prev nil) final_list = val); end if
    unless(current_prev == nil
    for(key 0 sel_index-2
    prev_list = append(prev_list list(film_order[key]))
    ); end for
    for(key sel_index+1 length(brd_films)-1
    next_list = append(next_list list(film_order[key]))
    ) ; end for
    unless(sel_index-2 == -1
    final_list = append(prev_list final_list)
    ) ; end unless
    final_list = append(final_list list(haha))
    final_list = append(final_list list(current_prev))
    unless((sel_index+1 > length(brd_films)-1)
    final_list = append(final_list next_list)
    ) ; end unless
    ) ; end unless
    ) ; end if
    axlFormListDeleteItem(myform, "FILMS_LIST" val)
    if(final_list == nil then (setq final_list val))
    axlFormListAddItem(myform, "FILMS_LIST" final_list 0)
    (setq val final_list)
    if(sel_index > 0 then
    axlFormListSelect(myform "FILMS_LIST" sel_index-1)
    else
    axlFormListSelect(myform "FILMS_LIST" 0)
    )
    ("DOWN"

    Thanks

      

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
Cadence Guidelines

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