Home > Community > Forums > PCB Design > Running a script on Package library...

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 Running a script on Package library... 

Last post Thu, May 22 2008 6:24 AM by archive. 7 replies.
Started by archive 22 May 2008 06:24 AM. Topic has 7 replies and 1513 views
Page 1 of 1 (8 items)
Sort Posts:
  • Thu, May 22 2008 6:24 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    Running a script on Package library... Reply

    Not sure if I'm posting in the proper place. How would I run a scrip on all out package library parts (.dra files)?


    Originally posted in cdnusers.org by F150
    • Post Points: 0
  • Thu, May 22 2008 7:08 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Running a script on Package library... Reply

    Use a batch file to call your script:

    # batch file to process all *.dra files through an Allegro script in a directory
    #
    set noconfirm=t
    for %%f IN (*.dra) DO start /wait /min allegro -s libfix2.scr %%f

    "libfix2.scr" is my script in this case.

    I always copy the *.dra files to a separate directory before running the script, then overwrite the original files if the desired results are obtained.

    Dave


    Originally posted in cdnusers.org by dschaefer
    • Post Points: 0
  • Thu, May 22 2008 7:14 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Running a script on Package library... Reply

    Thanks for the quick reply!

     

    At the end of the script, do I need to do a save or does the batch file do that?

     

    John


    Originally posted in cdnusers.org by F150
    • Post Points: 0
  • Thu, May 22 2008 7:19 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Running a script on Package library... Reply

    Script needs to include save - sample tail of a script:

    # call asysize.il
    #
    setwindow pcb
    asysize
    #
    # call delsilk.il
    #
    setwindow pcb
    delsilk
    #
    # redraw, save & exit
    #
    setwindow pcb
    redisplay
    save
    exit

    Dave


    Originally posted in cdnusers.org by dschaefer
    • Post Points: 0
  • Thu, May 22 2008 7:22 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Running a script on Package library... Reply

    Thanks!

    I'll give it a try and let you know how it works out (may not be until next week).

    John


    Originally posted in cdnusers.org by F150
    • Post Points: 0
  • Thu, May 22 2008 7:38 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Running a script on Package library... Reply

    Did a quick test and got this message-

    E- Command not found: for %%f IN (*dra) DO start /wait /min allegro -s jwz_text_block_a.scr %%f


    Originally posted in cdnusers.org by F150
    • Post Points: 0
  • Thu, May 22 2008 7:49 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Running a script on Package library... Reply

    Create a batch file "yourbatch.bat" which calls your script/skill "yourscript.scr":

    set noconfirm=t
    for %%f IN (*.dra) DO start /wait /min allegro -s yourscript.scr %%f

    Create a directory for processing, and copy all of your target .dra files, the .bat file, and the .scr file into the directory. (No need to mess with system env variables or path using this method).

    From DOS, navigate to the folder and type the name of the batch file.


    Originally posted in cdnusers.org by dschaefer
    • Post Points: 0
  • Thu, May 22 2008 8:33 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Running a script on Package library... Reply

    Works like a charm, Thanks!!


    Originally posted in cdnusers.org by F150
    • Post Points: 0
Page 1 of 1 (8 items)
Sort Posts:
Started by archive at 22 May 2008 06:24 AM. Topic has 7 replies.