Batch Releasing Print packages

This batch file is to be executed from the top level folder of a project. All the drawings in the folder and all sub-folders will be released per the steps defined in the Trail file.

  1. Start ProE
  2. Perform all the steps required to release a drawing (In our case we pull up the drawing and press one key to run a mapkey). (Note: It is simpler to type in the name of the drawing it be released instead of browsing for it).
  3. Exit ProE
  4. Edit the trail file with "notepad" or equivalent
  5. You want to find the place where you entered the name of the drawing. For example:

    !trail file version No. 1255
    !Pro/ENGINEER TM Wildfire (c) 1988-2002 by Wisdom Systems All Rights Reserved.
    < 0 1.147259
    ~ Activate `main_dlg_cur` `main_dlg_cur`
    < 0 0.955000
    ~ Activate `main_dlg_cur` `main_dlg_cur`
    ~ Select `main_dlg_cur` `MenuBar1` \
    1 `File`
    ~ Close `main_dlg_cur` `MenuBar1`
    ~ Activate `main_dlg_cur` `File.psh_open`
    < 2 0.256000
    ~ Input `file_open` `Inputname` \

  6. Copy this section to another text file (i.e. BatchRelease1.txt) and remove the "'sample_drawing.drw'" line and replace it with a blank line.
  7. Copy the remaining lines to another text file (i.e. BatchRelease2.txt).
  8. Place a "config.pro" file in the top folder that contains the lines:

    search_path <Folder with your Library parts>
    search_path <Folder with your Formats, etc>\Configs
    search_path_file .\search.pro

    Note: The "search.pro" files must contain paths to all required files. You can automatically create a "search.pro"  in the current folder with all sub-folders by the command line "dir /a:d /b /s >search.pro".

  9. Now create a batch file:

    set CONTINUE_FROM_OOS=true
    path=%path%;<ProE load Point>\bin
    dir /a:d /b /s >search.pro
    md run_batch_release
    for /r %%i in (*.drw.*) do (
      echo. `%%~ni`>.\run_batch_release\%%~ni.txt
      copy BatchRelease1.txt+.\run_batch_release\%%~ni.txt+BatchRelease2.txt .\run_batch_release\%%~ni
      del .\run_batch_release\%%~ni.txt
    echo Running ProE
    for /r %CD%\run_batch_release %%i in (*.drw*) do (
      move /y %%i %CD%\%%~ni.txt
      echo. Processing %%~ni
      call proe.bat %%~ni.txt -g:no_graphics pro_wait
      if exist <Folder were your output files show up>\%%~ni*.* (
        del %%~ni.txt
        echo Successful

  10. Now execute your batch file from the top folder!

Note: I believe there is a better way to search and replace a string in a batch command but since this works I have not investigated it yet.