Batch Processing for Windows

Batch Processing for Windows There are several possibilities for running CADfix in batch mode without the GUI. From an MS-DOS prompt, the following co...
Author: Kenneth Goodman
13 downloads 1 Views 159KB Size
Batch Processing for Windows There are several possibilities for running CADfix in batch mode without the GUI. From an MS-DOS prompt, the following command will start CADfix and process the file “cube.igs” using the CADfix Wizard settings specified in the CADfix Wizard Control (CWC) file “wizard.cwc”. "c:\Program Files\CADfix 5.0\bin\runcadfconsole.exe" -BATCH -config wizard.cwc cube.igs When the command is executed, you will see the progress of the process on the screen in the MS-DOS window. This method can be started from a directory where your files reside. Quotation marks must be used if the path to the CADfix bin directory contains any spaces. They must be placed as shown in the example command.

The first part of the command specifies the location of the CADfix bin directory, and the command to start the CADfix batch process, in this case, „runcadfconsole‟. -batch specifies that CADfix will be run in batch mode. -config specifies that a CADfix Wizard Control (CWC) file will be used to determine the settings for the process. In the case, the file is named wizard.cwc. You may name the file any

name. To simplify entering the command, it is good practice to place the wizard.cwc file in the directory where your files reside The last part of the command is the filename Note: You may process any file type that you have enabled by the cadfix.dat license file. In addition, you may process several of the same file types at once by replacing the single filename with *.igs (or *.stp, *.fbm, etc.) as long as all of the files are in the same directory.) An alternate method is to modify the command line as follows: "c:\Program Files\CADfix 5.0\bin\runcadfconsole.exe" -BATCH -config wizard.cwc –models files.list -models specifies that a collection of models will be processed, in this case "files.list". files.list is simply a text file containing the names of the files that you wish to process. For example, files.list may contain:    

test.igs bracket.igs cube.igs lid.igs

If you create a batch script, it will save you the trouble of entering the information at the command line. You can also save this as a shortcut on the Windows desktop. ****************************************************************************** *** echo off rem set top level directory set FEGS_TOP=C:\Program Files\CADfix 5.0 echo Running CADfix in batch mode, Please wait... "%FEGS_TOP%\bin\runcadfconsole.exe" -BATCH wizard.cwc -models files.list ****************************************************************************** *** Start the batch script from the directory that contains files.list, or include the path to files.list in the command line. You could also make the BAT file a bit more general by inserting '%1' and '%2' in place of the

control file names for example: ------Start BAT file-----echo off rem set top level directory set FEGS_TOP=D:\Program Files\CADfix 5.0 echo Running CADfix in batch mode, Please wait... "%FEGS_TOP%\bin\runcadfconsole.exe" -batch %1 -models %2 ------End BAT file-------To run the batch file from the DOS prompt, use the following example: D:\users\mf\CADfix\Testing\Wizard>cadfix.bat wizard.cwc files.list There is also another option on the command line that can be used. -damemory . The -damemory option is followed by the memory required in words e.g. 16777216 for 64MB and 8388608 for 32MB. This is the same as setting the memory buffer using the CADfix Preferences window.

Creating a .cwc File To create a CADfix Wizard Control (.cwc) file: Use the CADfix GUI – When you start CADfix, you will see the CADfix Wizard window

Select the Wizard options you want the batch file to perform. For example, select Repair, Prepare, and Export and choose any appropriate options. Refer to Section 3 – The CADfix Process for more information in creating a batch process using the GUI). Next, click on the File pull down menu in the CADfix Wizard window and choose "Save Configuration". Type in the name of your configuration and specify the directory where you want to save it.

Batch Processing for UNIX For UNIX Platforms: Prepare to start CADfix as you normally would. Go to the directory where you have installed CADfix. Execute the "source cadfix_setups" script to prepare the CADfix environment variables. Next, access the directory where the files to be processed are located. On UNIX the command line is: # cadfix –BATCH -config file.cwc *.igs where file.cwc is the CADfix Wizard configuration file (see previous section). You can also create a .txt file as in the NT instructions and use the –models option with the batch script. This will run CADfix in batch using the wizard control file 'file.cwc' and will process all files *.igs in the launch directory. This can be put into a script.

Uses of the Batch Process If you need to frequently send CADfix databases between UNIX and Windows systems, you might want to set up a batch run just to export CADfix CAG files or read them in to create CADfix databases. Once you have determined a process that provides good success for getting files between particular systems, you may want to save the process and run your files in batch to allow CADfix to process several files overnight.

Suggest Documents