Creating xgbrvu job fileThis page describes how to create the xgbrvu job file from a script. |
ProcedureWe recommend you start from a clean directory and then run the gds2gbr engine to create the gerber files. This way there are no old gerber files in the working directory. The utility assumes that your aperture file name is gerber.apt . Please make sure to name your aperture file as gerber.apt. Run the script we provide below to create the job file. The output file name is called output.job and it contains all the Gerber files (.gbr extension) that exist in the local directory. Finally, you can run the xgbrvu with the job file on the command line to view all the Gerber files. hagai@argonx6:~/cad/asm600/examples$ ~/cad/asm600/bin/xgbrvu output.job executing script /home/hagai/cad/asm600/bin/xgbrvu64 Running: /home/hagai/cad/asm600/bin/xgbrvu64 "output.job" Attempting to load font fixed ... Success ![]() |
Download ScriptPlease copy the script below and save it as an executable file to a directory in your path. It is a good idea to save it in the asm600/bin directory where the xgbrvu is located. #!/bin/bash # Output file OUTPUT_FILE="output.job" # Initialize fill option values FILL_VALUES=(2 3 4 5 6 7) FILL_INDEX=0 # Colors list COLORS=("red" "green" "yellow" "blue" "magenta" "cyan") COLOR_INDEX=0 # Clear the output file before writing > "$OUTPUT_FILE" # Write the fixed first two lines echo ":Ver 100" >> "$OUTPUT_FILE" echo ":Cfg gerber.apt" >> "$OUTPUT_FILE" # Scan for .gbr files in the current directory for FILE in *.gbr; do # Check if any .gbr files exist [ -e "$FILE" ] || continue # Get current fill and color FILL_VALUE=${FILL_VALUES[FILL_INDEX]} COLOR=${COLORS[COLOR_INDEX]} # Write to the output file echo ":Drw $FILE" >> "$OUTPUT_FILE" echo ":OnOff on" >> "$OUTPUT_FILE" echo ":Color $COLOR" >> "$OUTPUT_FILE" echo ":Fill $FILL_VALUE" >> "$OUTPUT_FILE" # Update fill index (cycle through 2-7) FILL_INDEX=$(( (FILL_INDEX + 1) % ${#FILL_VALUES[@]} )) # Update color index (cycle through colors) COLOR_INDEX=$(( (COLOR_INDEX + 1) % ${#COLORS[@]} )) done echo "Processing complete. Output saved to $OUTPUT_FILE." |