• 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
  • Ejlersen
    Ejlersen over 12 years ago

    Hi

    That is possible. You'll have to save all current visibility settings - the easiest thing would probably be to create a script that saves a temp colorview file to disk. When you close the program this color view should be reselected and then the temp file deleted.

     Similarly selecting a film could load the corresponding film.

    (defun _ns_save_org_colorview ()
    let((tmp_file)
     ;------------------- save the original color view for later restoration
     tmp_file = axlDMOpenFile("ALLEGRO_SCRIPT", "tmp", "w")
     fprintf(tmp_file "scriptmode +i +n +w +c\n")
     fprintf(tmp_file "setwindow pcb\n")
     fprintf(tmp_file "colorview create\n")
     fprintf(tmp_file "setwindow form.colorview_create\n")
     fprintf(tmp_file "FORM colorview_create colorview_name ns_pdf_out\n")
     fprintf(tmp_file "FORM colorview_create save\n")
     fprintf(tmp_file "FORM colorview_create done\n")
     fprintf(tmp_file "setwindow pcb\n")
     axlDMClose(tmp_file)
     axlShell("replay tmp")
     if( isFile( "tmp.scr") then deleteFile("tmp.scr"))
    )
    )

    (defun _ns_load_view (f2view)
    let((tmp_file)
     ; load the original color view
     tmp_file = axlDMOpenFile("ALLEGRO_SCRIPT", "tmp", "w")
     fprintf(tmp_file "scriptmode +i +n +w +c\n")
     fprintf(tmp_file "setwindow pcb\n")
     fprintf(tmp_file "setwindow form.vf_vis\n")
     fprintf(tmp_file "FORM vf_vis colorview_list %s\n" f2view)
     fprintf(tmp_file "setwindow pcb\n")
     axlDMClose(tmp_file)
     axlShell("replay tmp")
     if( isFile( "tmp.scr") then deleteFile("tmp.scr"))  
    )
    ) 

     

     

     

    Best regards

    Ole

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • Ejlersen
    Ejlersen over 12 years ago

    Hi

    That is possible. You'll have to save all current visibility settings - the easiest thing would probably be to create a script that saves a temp colorview file to disk. When you close the program this color view should be reselected and then the temp file deleted.

     Similarly selecting a film could load the corresponding film.

    (defun _ns_save_org_colorview ()
    let((tmp_file)
     ;------------------- save the original color view for later restoration
     tmp_file = axlDMOpenFile("ALLEGRO_SCRIPT", "tmp", "w")
     fprintf(tmp_file "scriptmode +i +n +w +c\n")
     fprintf(tmp_file "setwindow pcb\n")
     fprintf(tmp_file "colorview create\n")
     fprintf(tmp_file "setwindow form.colorview_create\n")
     fprintf(tmp_file "FORM colorview_create colorview_name ns_pdf_out\n")
     fprintf(tmp_file "FORM colorview_create save\n")
     fprintf(tmp_file "FORM colorview_create done\n")
     fprintf(tmp_file "setwindow pcb\n")
     axlDMClose(tmp_file)
     axlShell("replay tmp")
     if( isFile( "tmp.scr") then deleteFile("tmp.scr"))
    )
    )

    (defun _ns_load_view (f2view)
    let((tmp_file)
     ; load the original color view
     tmp_file = axlDMOpenFile("ALLEGRO_SCRIPT", "tmp", "w")
     fprintf(tmp_file "scriptmode +i +n +w +c\n")
     fprintf(tmp_file "setwindow pcb\n")
     fprintf(tmp_file "setwindow form.vf_vis\n")
     fprintf(tmp_file "FORM vf_vis colorview_list %s\n" f2view)
     fprintf(tmp_file "setwindow pcb\n")
     axlDMClose(tmp_file)
     axlShell("replay tmp")
     if( isFile( "tmp.scr") then deleteFile("tmp.scr"))  
    )
    ) 

     

     

     

    Best regards

    Ole

    • 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