Build a Creo Batch Export Queue
Generate validated Creo trail queues for PDF, OBJ, and IGES exports.
Introduction
30 Second Summary
Exporting the same design into several file formats means repeating a careful sequence for every model. One wrong path can leave an output missing or saved in the wrong place.
In this project, you will build a Python command-line tool that turns a CSV job list into numbered Creo 6.0 trail files. Its JSON manifest shows which PDF, OBJ, or IGES jobs are ready before you replay the queue.
What You'll Build
After one run against jobs.csv, you'll see numbered trail files in queue with a manifest that tells you what is safe to replay in Creo 6.0.
By the end of this project, you'll have:
- A repeatable batch workflow that turns multiple rows in jobs.csv into numbered trail files.
- The ability to switch between locally recorded templates for PDF, OBJ, or IGES exports.
- A readable preflight manifest that labels every job as ready or blocked with a clear reason.
- Secret Mission: Add one more locally verified export format to prove the queue can grow without changing the Python workflow.
Are there any prerequisites?
Your starting point is a Windows computer with an existing Creo 6.0 installation, a license, a trail-file playback method, and one disposable drawing or model. The setup step checks Python 3.14.7 plus Visual Studio Code before the queue work begins.
Before We Start
Before the hands-on work begins, choose the disposable Creo drawing or model that will carry every export test. Keeping this file outside production-controlled folders gives you a safe target for repeated local testing.
Set Up the Windows Automation Workspace
Your disposable test model is ready for repeated exports in Creo version 6.0. Before generated trails enter that workflow, your computer needs a dependable local runtime.
A verified Python installation prevents environment problems from looking like trail failures. Windows PowerShell provides the command line for each check. Visual Studio Code provides one workspace for the queue generator.
In this step, get ready to:
- Verify Python 3.14.7 in Windows PowerShell.
- Confirm Visual Studio Code Stable exposes the code command.
- Create the C:\CreoBatchExport workspace with its three empty folders.
Check Python first
The queue generator needs Python 3.14.7 to run consistently. Checking the active interpreter first reveals whether the correct runtime is already available.
- Press the Windows key to open Windows search.
- Type PowerShell into the search field.
- Press Enter to open Windows PowerShell.
- Check the active Python version by running this command:
python -V
What does this command check?
The python -V command asks the active Python interpreter to print its version. This confirms which runtime PowerShell uses when you run the queue generator.
✔️ I see the required Python version
Your output should show Python 3.14.7. That confirms the queue generator has its required runtime.
ⓧ I see an older Python version
The active runtime is older than the project requires. The Python Install Manager can add the required runtime locally.
- Open the official Python downloads page in your browser.
- Install the Python Install Manager from the official page.
- Approve the Windows installation prompt if one appears.
The runtime download can take a few minutes. A short wait while the installer fetches Python is expected.
- Install the Python 3.14 runtime by running this command in PowerShell:
py install 3.14
What does this command install?
The py install 3.14 command asks the Python Install Manager to install the current Python 3.14 runtime.
- Close every open PowerShell window.
- Press the Windows key to reopen Windows search.
- Type PowerShell into the search field.
- Press Enter to open a fresh PowerShell window.
- Check the updated runtime by running this command:
python -V
Why open a fresh terminal?
A fresh PowerShell window loads the commands added during installation. The version check confirms that python now resolves to the required runtime.
You should now see Python 3.14.7 in the output.
ⓧ The Python command is unavailable
PowerShell cannot find a Python runtime yet. The official Python Install Manager provides the missing command.
- Open the official Python downloads page in your browser.
- Install the Python Install Manager from Python.org or the Microsoft Store.
- Approve the Windows installation prompt if one appears.
The runtime download can take a few minutes. The installer may stay quiet while it finishes the local setup.
- Install the Python 3.14 runtime by running this command in PowerShell:
py install 3.14
What does this command install?
The Python Install Manager receives the 3.14 runtime request. It downloads the matching runtime for Windows.
- Close every open PowerShell window.
- Press the Windows key to reopen Windows search.
- Type PowerShell into the search field.
- Press Enter to open a fresh PowerShell window.
- Verify the installed runtime by running this command:
python -V
What confirms success?
The version check confirms that PowerShell can now find Python. It also identifies the runtime that future script commands use.
You should see Python 3.14.7 in the output.
Still seeing the wrong Python version?
Close every PowerShell window after the installation completes. Open a fresh window so the updated commands load.
Confirm that the Python Install Manager completed the 3.14 runtime installation.
Ask for help with my Python version
Verify Visual Studio Code
The code command connects PowerShell to Visual Studio Code. Confirming it now means you can open the project folder directly from the terminal.
- Check whether the Visual Studio Code command is available by running:
code --help
What does this command check?
The code --help command displays the Visual Studio Code command-line version information. It also displays a usage example plus the available options.
✔️ I see the command-line help
That is the second environment check complete. PowerShell can now launch Visual Studio Code with a folder path.
ⓧ The code command is unavailable
Visual Studio Code needs its Windows User setup. This installation adds the code command to your system path.
- Open the official Visual Studio Code Windows setup page in your browser.
- Download the User setup installer for Visual Studio Code Stable.
- Run the downloaded .exe file.
- Complete the installer prompts.
- Close every open PowerShell window.
- Press the Windows key to reopen Windows search.
- Type PowerShell into the search field.
- Press Enter to open a fresh PowerShell window.
- Confirm that the command is now available by running:
code --help
Why repeat the check?
The new PowerShell window loads the path change made by the installer. The help output proves that the code command is available.
You should see the Visual Studio Code CLI version information. You should also see its usage example plus its options.
Still missing the code command?
Confirm that you installed the User setup edition. Close every PowerShell window before trying the command again.
Ask for help with the code command
Create the automation workspace
The workspace separates recorded templates from generated queue files. It also gives harmless local exports their own destination.
Your selected test model stays in its existing non-production location. The new workspace contains only the automation files created during this project.
- Return to the PowerShell window from the environment checks.
- Create the C:\CreoBatchExport folder by running this command:
New-Item -Path C:\CreoBatchExport -ItemType Directory -Force
What does this command create?
The New-Item command creates a directory at C:\CreoBatchExport. The -Force option safely returns the existing folder if it is already present.
PowerShell should print a directory entry named CreoBatchExport.
- Create the three empty workspace folders by running this command:
New-Item -Path C:\CreoBatchExport\queue, C:\CreoBatchExport\templates, C:\CreoBatchExport\outputs -ItemType Directory -Force
How is the workspace organized?
- The queue folder holds generated numbered trail files.
- The templates folder holds locally recorded trail templates.
- The outputs folder holds harmless local export results.
- Confirm the three folders exist by running this command:
Get-ChildItem -Path C:\CreoBatchExport
What does this command show?
The Get-ChildItem command lists the items directly inside C:\CreoBatchExport. This provides an immediate check that each folder exists.
You should see outputs, queue, and templates in the output.
- Move PowerShell into the workspace by running this command:
Set-Location -Path C:\CreoBatchExport -PassThru
What does this command change?
The Set-Location command changes PowerShell's current folder. The -PassThru option prints the new location so you can confirm it immediately.
You should see C:\CreoBatchExport as the current path.
The first launch may show a Workspace Trust dialog. This folder contains only files you create locally.
- Open the current workspace in Visual Studio Code by running this command:
code .
What does this command open?
The code . command opens the current PowerShell folder in Visual Studio Code. The period represents C:\CreoBatchExport because that is your current location.
- Select Yes, I trust the authors if Visual Studio Code asks about Workspace Trust.
You should see CREOBATCHEXPORT in the Explorer view. The outputs, queue, and templates folders should appear beneath it.
Before the final check, which outputs do you expect from the two tool checks and the folder listing?
- Switch back to the PowerShell window from earlier.
- Verify the complete workspace by running these commands:
python -V
code --help
Get-ChildItem -Path C:\CreoBatchExport
What does the final check prove?
- The python -V command confirms the active Python runtime.
- The code --help command confirms that PowerShell can access Visual Studio Code.
- The Get-ChildItem command confirms that the workspace folders still exist.
You should see Python 3.14.7 from the first command.
You should see the Visual Studio Code CLI version information plus its usage example from the second command.
You should see outputs, queue, and templates from the final command.
Workspace check incomplete?
If a folder is missing, rerun the folder creation command from inside the same PowerShell window. If you see an access-related error, confirm that your Windows account can create folders directly under C:\.
If Visual Studio Code opened a different folder, switch back to PowerShell. Confirm the current path is C:\CreoBatchExport before running code . again.
Ask for help with my Windows workspace
Your Windows automation workspace is ready. Next, you will turn a CSV job list into a visible dry-run trail queue plus its manifest.
Generate a Dry-Run Trail Queue
Your Windows workspace now has Python 3.14 available. Your project is also open in Visual Studio Code with folders ready for templates, generated files, and harmless outputs.
Before a real Creo 6.0 recording enters the workflow, you need to prove that a CSV job list can feed paths into a template. This dry run isolates the data flow from Creo-specific actions.
In this step, get ready to:
- Create the Python queue generator in batch_trails.py.
- Define PDF, OBJ, and IGES preview jobs in jobs.csv.
- Generate numbered preview files plus a JSON manifest.
Create the queue generator
The generator keeps path validation separate from the recorded Creo actions. It blocks incomplete jobs before they reach your existing playback workflow.
- Use the new-file control in the Visual Studio Code file sidebar to create batch_trails.py inside C:\CreoBatchExport.
- Select the full-code tab below to add the complete generator source to batch_trails.py.
✔️ Awesome, I've got everything!
Great. Compare your saved file with the complete source in the other tab before you continue.
ⓧ I'd like to double check the full code
Use this complete source to check batch_trails.py:
import argparse
import csv
import json
from pathlib import Path
REQUIRED_COLUMNS = ["job_name", "model_path", "template_path", "output_path"]
REQUIRED_TOKENS = ("{{MODEL_PATH}}", "{{OUTPUT_PATH}}")
def clean_value(row, key):
value = row.get(key)
return value.strip() if isinstance(value, str) else ""
def safe_job_name(value):
cleaned = "".join(
character if character.isalnum() or character in "-_" else "_"
for character in value
)
return cleaned.strip("_")
def render_template(template_text, model_path, output_path):
missing_tokens = [
token for token in REQUIRED_TOKENS if token not in template_text
]
if missing_tokens:
raise ValueError(
"template is missing token(s): " + ", ".join(missing_tokens)
)
return (
template_text
.replace("{{MODEL_PATH}}", str(model_path))
.replace("{{OUTPUT_PATH}}", str(output_path))
)
def build_queue(csv_path):
project_root = Path(__file__).resolve().parent
queue_dir = project_root / "queue"
queue_dir.mkdir(parents=True, exist_ok=True)
manifest_records = []
ready_count = 0
blocked_count = 0
with open(csv_path, "r", encoding="utf-8", newline="") as csv_file:
reader = csv.DictReader(csv_file)
if reader.fieldnames != REQUIRED_COLUMNS:
raise ValueError(
"jobs.csv header must be exactly: "
+ ",".join(REQUIRED_COLUMNS)
)
for row_number, row in enumerate(reader, start=2):
if not any(clean_value(row, key) for key in REQUIRED_COLUMNS):
continue
job_name = clean_value(row, "job_name")
record = {"row": row_number, "job_name": job_name}
try:
file_safe_name = safe_job_name(job_name)
if not file_safe_name:
raise ValueError("job_name must contain a letter or number")
model_path = Path(clean_value(row, "model_path")).resolve()
template_path = Path(clean_value(row, "template_path")).resolve()
output_path = Path(clean_value(row, "output_path")).resolve()
if not model_path.exists():
raise ValueError(f"model path does not exist: {model_path}")
if not template_path.exists():
raise ValueError(f"template path does not exist: {template_path}")
output_path.parent.mkdir(parents=True, exist_ok=True)
with open(
template_path,
"r",
encoding="utf-8",
newline="",
) as template_file:
template_text = template_file.read()
rendered = render_template(
template_text,
model_path,
output_path,
)
trail_path = queue_dir / (
f"{row_number - 1:03d}_{file_safe_name}.txt"
)
with open(
trail_path,
"w",
encoding="utf-8",
newline="",
) as trail_file:
trail_file.write(rendered)
ready_count += 1
record.update(
{
"status": "ready",
"model_path": str(model_path),
"template_path": str(template_path),
"output_path": str(output_path),
"trail_path": str(trail_path.resolve()),
}
)
print(f"[READY] row {row_number}: {trail_path.name}")
except (OSError, ValueError) as error:
blocked_count += 1
record.update(
{
"status": "blocked",
"message": str(error),
}
)
print(f"[BLOCKED] row {row_number}: {error}")
manifest_records.append(record)
manifest = {
"source_csv": str(csv_path),
"ready": ready_count,
"blocked": blocked_count,
"jobs": manifest_records,
}
manifest_path = project_root / "manifest.json"
manifest_path.write_text(
json.dumps(manifest, indent=2),
encoding="utf-8",
)
print(f"Ready jobs: {ready_count}")
print(f"Blocked jobs: {blocked_count}")
print(f"Manifest: {manifest_path.resolve()}")
def main():
parser = argparse.ArgumentParser(
description="Generate a validated queue from locally recorded Creo trails."
)
parser.add_argument(
"csv_file",
help="Path to jobs.csv",
)
args = parser.parse_args()
csv_path = Path(args.csv_file).resolve()
if not csv_path.exists():
print(f"CSV file does not exist: {csv_path}")
return
try:
build_queue(csv_path)
except (OSError, ValueError) as error:
print(f"Queue generation stopped: {error}")
if __name__ == "__main__":
main()
How is the generator organized?
- The constants define the required CSV columns plus the two template tokens.
- The helper functions clean values, create safe filenames, and substitute absolute paths.
- The queue builder validates each row before writing its numbered file.
- The main function accepts the CSV path before starting the queue build.
- Save batch_trails.py with Ctrl+S.
You should see batch_trails.py in the file sidebar. Its editor tab should no longer show an unsaved-change indicator.
Does the file look incomplete?
Check that the first line is import argparse. Check that the last two lines call main().
Use the full-code tab to restore any missing section. Keep every function name exactly as shown.
help me compare my batch_trails.py file with the required source.
Add the preview jobs
A template is a text fixture with replaceable tokens. This first template contains paths only, which makes it safe for testing the queue logic.
- Use the new-file control beside the templates folder to create preview-template.txt.
- Add the preview template contract with the following content:
MODEL={{MODEL_PATH}}
OUTPUT={{OUTPUT_PATH}}
What does this template do?
- The {{MODEL_PATH}} token marks where the generator inserts the absolute source-model path.
- The {{OUTPUT_PATH}} token marks where the generator inserts the absolute destination path.
- The labels make both replacements easy to inspect in each generated preview file.
- Save templates\preview-template.txt with Ctrl+S.
You should see two lines in the saved file. Each line should contain one required token.
Missing a template token?
Compare the braces around each token. Both tokens use two opening braces plus two closing braces.
Keep the token names uppercase. The generator looks for exact matches.
help me correct the two tokens in preview-template.txt.
✔️ Awesome, I've got everything!
Your preview template is saved with both required tokens.
ⓧ I'd like to double check the full code
Compare templates\preview-template.txt with this complete file:
MODEL={{MODEL_PATH}}
OUTPUT={{OUTPUT_PATH}}
What should match?
The file has exactly two lines. Each line pairs one label with one required token.
The CSV file now connects three format-labelled jobs to that same harmless preview template. Each output stays inside the existing outputs folder.
- Use the new-file control beside C:\CreoBatchExport to create jobs.csv.
- Add the three dry-run rows with the following content:
job_name,model_path,template_path,output_path
drawing_pdf,C:\replace\with\drawing-path,C:\CreoBatchExport\templates\preview-template.txt,C:\CreoBatchExport\outputs\drawing.pdf
mesh_obj,C:\replace\with\model-path,C:\CreoBatchExport\templates\preview-template.txt,C:\CreoBatchExport\outputs\mesh.obj
exchange_iges,C:\replace\with\model-path,C:\CreoBatchExport\templates\preview-template.txt,C:\CreoBatchExport\outputs\exchange.igs
How do the preview jobs work?
- The header order matches REQUIRED_COLUMNS in the generator.
- Each job_name becomes part of a numbered queue filename.
- Each row points to the same preview template while keeping a format-specific output extension.
The model values in the reference file are placeholders. The generator needs the exact path to your disposable Creo test model before those rows can become ready.
- Record the exact path to your disposable model here: your disposable model path.
- Replace C:\replace\with\drawing-path with your disposable model path.
- Replace both C:\replace\with\model-path values with your disposable model path.
- Save jobs.csv with Ctrl+S.
You should see jobs.csv at the top level of C:\CreoBatchExport. It should contain one header plus three job rows.
Unsure about the model path?
Use the full local path to the disposable drawing or model from Step 0. Keep the drive letter plus the filename extension.
Avoid a production-controlled folder. This project uses the same disposable file for repeated dry runs.
help me check my disposable model path in jobs.csv.
✔️ Awesome, I've got everything!
Your three rows now use the exact local path to your disposable model.
ⓧ I'd like to double check the full code
Compare the columns plus row structure with this reference. Keep your real disposable-model path in place of each reference placeholder:
job_name,model_path,template_path,output_path
drawing_pdf,C:\replace\with\drawing-path,C:\CreoBatchExport\templates\preview-template.txt,C:\CreoBatchExport\outputs\drawing.pdf
mesh_obj,C:\replace\with\model-path,C:\CreoBatchExport\templates\preview-template.txt,C:\CreoBatchExport\outputs\mesh.obj
exchange_iges,C:\replace\with\model-path,C:\CreoBatchExport\templates\preview-template.txt,C:\CreoBatchExport\outputs\exchange.igs
What should match?
The header plus job names should match exactly. Your three model paths should point to the real disposable file you selected.
Generate and inspect the queue
The script now has everything it needs to validate each row. It writes a queue file only when the model plus template paths exist.
Before you run the generator, how many ready jobs do you expect from the three valid rows?
- Return to the Windows PowerShell terminal from earlier.
- Generate the dry-run queue by running:
python batch_trails.py jobs.csv
What does this command do?
The command passes jobs.csv to the generator. The script validates each row before writing queue files plus the manifest.
You should see three [READY] lines. The summary should report three ready jobs plus zero blocked jobs.
Seeing a blocked row?
A message beginning with model path does not exist: means that a CSV model path does not match a real file. Copy the disposable file's complete local path into that row.
A message beginning with template path does not exist: means that the preview template is missing or saved under a different name. Confirm it is inside C:\CreoBatchExport\templates.
help me diagnose a blocked jobs.csv row.
Before you inspect the first generated file, do you think it already contains enough recorded actions for Creo playback?
- Expand the queue folder in the Visual Studio Code file sidebar.
- Open 001_drawing_pdf.txt from the generated file list.
You should see a MODEL= line plus an OUTPUT= line. Both lines should contain absolute Windows paths with no remaining template tokens.
This preview is intentionally not playable
The generated file contains substituted paths without recorded Creo actions. It proves the CSV-to-template flow while remaining an intentionally incomplete trail.
That limitation is the designed dry-run result. A locally recorded PDF trail supplies the real action sequence in the next step.
- Open manifest.json from the top level of C:\CreoBatchExport.
- Confirm that ready is 3.
- Confirm that blocked is 0.
- Confirm that every item in jobs records its absolute model, template, output, and generated trail paths.
The terminal count and manifest count should match. The queue folder should contain one numbered file for each ready job.
That is the data pipeline working: three CSV rows now become three validated preview files plus a matching manifest. Next, you will replace one preview with a locally recorded PDF trail and test a real export.
Connect a Real PDF Trail
Your dry run proved that Python can turn CSV rows into numbered queue files. The generated previews contain paths without the recorded Creo actions needed for an export.
This step replaces one preview with a locally successful PDF recording from Creo 6.0. The queue then becomes playable without relying on guessed trail syntax.
In this step, get ready to:
- Record one successful PDF export with your disposable drawing.
- Convert the recording into a reusable path-token template.
- Prove the generated PDF trail through your existing playback workflow.
Record a successful PDF export
A replayable template must begin with a manual export that already works. Your installed Creo build is the source of truth for every recorded interaction.
- Return to your existing Creo 6.0 session.
- Load the disposable drawing approved for repeated export tests.
- Record the exact path of the drawing here: your exact disposable drawing path.
- Match the working directory used by your existing trail playback workflow.
- Match the Creo configuration used by your existing trail playback workflow.
Why record the export locally?
Creo trail contents can depend on your installed build. They can also depend on your interface configuration.
A successful local recording captures the exact sequence your environment accepts. Python only substitutes paths after that sequence works.
- Start a fresh trail recording through your existing Creo workflow.
- Perform a complete manual PDF export to C:\CreoBatchExport\outputs\drawing.pdf.
- Finish the trail recording through your existing Creo workflow.
- Confirm the exported PDF exists at C:\CreoBatchExport\outputs\drawing.pdf.
You should see the PDF at the chosen output path. That successful file proves the recorded interaction works before the queue generator touches it.
Create the tokenized PDF template
The recording contains literal paths that only work for this one export. Template substitution turns those two paths into replaceable tokens while preserving every recorded Creo action.
This is the fiddliest part of the step. Limit your edits to the source-model path and the PDF output path.
- Use your normal Windows file-copy method to copy the recorded trail to C:\CreoBatchExport\templates\pdf.txt.
- Confirm pdf.txt appears inside the templates folder.
The copied recording is now separated from Creo. You can edit the copy without changing the original recording.
- Switch back to Visual Studio Code.
- Open C:\CreoBatchExport\templates\pdf.txt from the project file tree.
- Locate the literal path for your exact disposable drawing path.
- Replace the literal source-model path with {{MODEL_PATH}}.
- Save pdf.txt.
You should now see {{MODEL_PATH}} in place of the disposable drawing path.
- Locate the literal PDF output path in pdf.txt.
- Replace the literal PDF output path with {{OUTPUT_PATH}}.
- Save pdf.txt.
- Review every remaining recorded Creo action line for accidental changes.
- Confirm {{MODEL_PATH}} remains in the template.
- Confirm {{OUTPUT_PATH}} remains in the template.
- Confirm both original literal paths are absent from the template.
Your pdf.txt file now satisfies the queue generator's two-token contract. Every environment-specific Creo action remains intact.
Unsure Which Text to Replace?
- Compare the recording with the exact model path used during the successful manual export.
- Compare the recording with the exact PDF destination used during the successful manual export.
- Restore the recording from your original copy if any Creo action line changed.
- Ask for help identifying the two path values in your trail.
Prove the generated PDF trail
The drawing_pdf row controls which model enters the template. It also controls where the rendered PDF should appear.
- Switch back to C:\CreoBatchExport\jobs.csv in Visual Studio Code.
- Find the row whose job_name is drawing_pdf.
- Set its model_path cell to your exact disposable drawing path.
- Set its template_path cell to C:\CreoBatchExport\templates\pdf.txt.
- Confirm its output_path cell contains C:\CreoBatchExport\outputs\drawing.pdf.
- Keep the mesh_obj row pointed to preview-template.txt.
- Keep the exchange_iges row pointed to preview-template.txt.
- Save jobs.csv.
Before you regenerate the queue, do you expect the drawing_pdf job to be ready or blocked?
- Regenerate the queue from your existing PowerShell terminal by running:
python batch_trails.py jobs.csv
What Does This Run Prove?
The script validates the model path and the template path. It also checks that both required tokens exist before rendering the trail.
A [READY] line for 001_drawing_pdf.txt proves the PDF row passed those checks.
You should see 001_drawing_pdf.txt reported as ready. The terminal also prints the latest manifest path.
Is the PDF Job Blocked?
- Check that the model_path value points to the disposable drawing that exists on your computer.
- Check that the template_path value points to C:\CreoBatchExport\templates\pdf.txt.
- Check that pdf.txt contains both required tokens with matching braces.
- Ask for help diagnosing the blocked PDF row.
The latest manifest.json now records the exact paths used to generate the PDF trail.
- Open C:\CreoBatchExport\manifest.json in Visual Studio Code.
- Confirm the drawing_pdf record has a ready status.
- Confirm the record contains absolute model_path value.
- Confirm the record contains an absolute template_path value.
- Confirm the record contains an absolute output_path value.
- Confirm the record contains an absolute trail_path value.
- Open C:\CreoBatchExport\queue\001_drawing_pdf.txt in Visual Studio Code.
- Confirm {{MODEL_PATH}} is absent from the generated trail.
- Confirm {{OUTPUT_PATH}} is absent from the generated trail.
The generated file now contains your absolute model path and PDF output path. Its remaining content comes from the locally successful recording.
Before you replay the generated trail, do you expect the same PDF to appear at the path from jobs.csv?
- Replay C:\CreoBatchExport\queue\001_drawing_pdf.txt through your existing Creo 6.0 playback workflow.
- Confirm the replay creates C:\CreoBatchExport\outputs\drawing.pdf.
You should see the expected PDF at the exact CSV output path. That is the deliberate dry-run limitation solved: one generated queue file now performs a real export.
Did the Replay Miss the PDF?
- Restore the working directory used during the successful manual recording.
- Restore the Creo configuration used during the successful manual recording.
- Compare pdf.txt with the original recording for changed action lines.
- Regenerate the queue after every correction to pdf.txt or jobs.csv.
- Ask for help comparing the successful recording with the generated trail.
Your queue now contains one locally proven PDF export. Next, you will apply the same recording pattern to OBJ and IGES jobs.
Run the Multi-Format Export Queue
The PDF export from the last step proves that a locally recorded Creo 6.0 trail can move safely through your queue. The generated PDF also confirms that your existing playback workflow handles the rendered paths.
OBJ and IGES use different recorded interactions. Separate templates keep the Python layer focused on validation plus substitution.
In this step, get ready to:
- Create locally replay-tested OBJ and IGES templates.
- Map the remaining CSV rows to exact local paths.
- Produce three ready exports from the numbered queue.
Record the OBJ and IGES templates
Each format needs a recording from your own Creo installation. The untouched recording is your local source of truth for every action line.
- Switch back to the Creo session from earlier.
- Record one successful OBJ export from the disposable model through your existing trail workflow.
- Record the exact OBJ destination here: your exact OBJ output path.
- Replay the untouched OBJ recording through your existing playback workflow.
You should see the OBJ file recreated at the recorded destination. This proves that the unedited interaction sequence works on disposable data.
Why test before editing?
A successful replay separates Creo behavior from template substitution. Any later problem can then be traced to a changed path or token.
- Copy the resulting recording outside Creo to C:\CreoBatchExport\templates\obj.txt.
You should see obj.txt inside the existing templates folder.
- In the Visual Studio Code window from earlier, select templates\obj.txt from the file tree.
- Replace the literal source-model path with {{MODEL_PATH}}.
You should now see {{MODEL_PATH}} in the exact position previously occupied by the model path.
- Replace the literal OBJ destination with {{OUTPUT_PATH}}.
You should now see both required tokens in the template. Every recorded action line should remain unchanged.
- Save templates\obj.txt in Visual Studio Code.
- Compare every remaining action line with the untouched OBJ recording.
The IGES template follows the same two-token contract. Its action sequence still comes from a separate successful recording.
- Switch back to the Creo session from earlier.
- Record one successful IGES export from the disposable model through your existing trail workflow.
- Record the exact IGES destination here: your exact IGES output path.
- Replay the untouched IGES recording through your existing playback workflow.
You should see the IGES file recreated at the recorded destination. The second local sequence is now proven before tokenization.
Why separate templates?
The OBJ recording preserves the interactions that produced OBJ output. The IGES recording preserves its own successful sequence.
The queue generator applies the same path contract to both files. Format-specific behavior stays inside each locally verified template.
- Copy the resulting recording outside Creo to C:\CreoBatchExport\templates\iges.txt.
You should see iges.txt beside pdf.txt and obj.txt in the existing templates folder.
- In the Visual Studio Code window from earlier, select templates\iges.txt from the file tree.
- Replace the literal source-model path with {{MODEL_PATH}}.
You should now see {{MODEL_PATH}} where the recorded model path previously appeared.
- Replace the literal IGES destination with {{OUTPUT_PATH}}.
You should now see both required tokens in the IGES template. The rest of the recording should still match the successful local trail.
- Save templates\iges.txt in Visual Studio Code.
- Compare every remaining action line with the untouched IGES recording.
Point each CSV row to its real template
Each row in jobs.csv represents one independent export job. Its model path plus template path plus output path determine the rendered trail.
- Return to jobs.csv from earlier.
- Keep the working drawing_pdf row unchanged.
- Find the row whose job_name is mesh_obj.
- Replace its model_path with the exact disposable-model path used for the successful OBJ recording.
- Replace its template_path with C:\CreoBatchExport\templates\obj.txt.
- Replace its output_path with your exact OBJ output path.
The mesh_obj row now points to the tested OBJ sequence. Its destination matches the path that succeeded during recording.
How does each row stay independent?
The template_path selects the recorded interaction sequence. The model_path plus output_path supply the two values rendered into that sequence.
This contract lets one Python program prepare several formats. The script does not need format-specific Creo commands.
- Find the row whose job_name is exchange_iges.
- Replace its model_path with the exact disposable-model path used for the successful IGES recording.
- Replace its template_path with C:\CreoBatchExport\templates\iges.txt.
- Replace its output_path with your exact IGES output path.
- Save jobs.csv.
Your CSV now maps three unique job names to three locally verified templates. Every path cell should contain an exact local Windows path.
✔️ Awesome, I've got everything!
Great. Make sure jobs.csv contains your exact local model plus output paths before generating the queue.
ⓧ I'd like to double check the full code
Use this complete jobs.csv structure for comparison. Each C:\replace\... reference stands for the exact local path you entered.
job_name,model_path,template_path,output_path
drawing_pdf,C:\replace\with\drawing-path,C:\CreoBatchExport\templates\pdf.txt,C:\replace\with\pdf-output-path
mesh_obj,C:\replace\with\model-path,C:\CreoBatchExport\templates\obj.txt,C:\replace\with\obj-output-path
exchange_iges,C:\replace\with\model-path,C:\CreoBatchExport\templates\iges.txt,C:\replace\with\iges-output-path
Generate and replay the full queue
The three rows now pass through the same preflight checks. The generated JSON manifest gives you one place to confirm whether every job is ready.
Before you run the generator, how many ready jobs do you expect from the three completed rows?
- Return to the PowerShell terminal from earlier.
- Generate the full numbered queue by running:
python batch_trails.py jobs.csv
What does this command do?
- The build_queue() function validates every required CSV value.
- The render_template() function rejects templates that are missing either required token.
- Each ready row produces a numbered trail inside queue.
- The final counts plus absolute paths are written to manifest.json.
You should see three [READY] lines. The summary should show Ready jobs: 3 plus Blocked jobs: 0.
Seeing a blocked job?
- Read the reason printed on the matching [BLOCKED] line.
- Correct the missing model path or template path in jobs.csv.
- Restore {{MODEL_PATH}} or {{OUTPUT_PATH}} if the message identifies a missing token.
- Run the generator again after saving the corrected file.
help me diagnose my blocked trail job.
- Switch back to the Visual Studio Code window from earlier.
- Return to manifest.json from earlier.
- Confirm that ready is 3.
- Confirm that blocked is 0.
- Return to the existing queue folder.
- Inspect each numbered file in ascending filename order.
- Search every numbered file for {{MODEL_PATH}} plus {{OUTPUT_PATH}}.
You should find no unresolved required tokens. Each numbered trail should contain absolute local paths from its matching CSV row.
Before you replay the queue, which three files do you expect to find at the recorded output paths?
- Return to your existing Creo trail playback workflow.
- Replay the numbered trail files in ascending filename order.
- Check each exact output path listed in jobs.csv.
You should see the expected PDF, OBJ, and IGES files at their exact CSV destinations. The manifest count now matches the three exports produced by the queue.
Keep production behind the test gate
A failed format stays on disposable data until its locally recorded template succeeds again. Production use begins only after the replayed output matches the tested destination and format.
That is the full pipeline working. One CSV job list now drives three validated format-specific trails through the same queue generator.
Secret mission
Add One More Export Format
Prove the queue can grow by adding a fourth export format from your own Creo 6.0 installation. Record it locally, add it to the queue, then replay the generated trail on disposable data.
Clean Up Your Resources
Clean Up Your Resources
Choose whether to keep your local automation kit, clear its generated test files, or remove it completely. This project adds no paid service, so keeping the files creates no ongoing cost.
Resources you used:
- The C:\CreoBatchExport\batch_trails.py queue generator.
- The C:\CreoBatchExport\jobs.csv export job list.
- The C:\CreoBatchExport\manifest.json queue manifest.
- The C:\CreoBatchExport\templates folder containing the preview fixture plus four replay-tested export templates.
- The C:\CreoBatchExport\queue folder containing numbered rendered trails.
- The C:\CreoBatchExport\outputs folder containing disposable test exports.
Keep everything running
This option fits ongoing work or future export jobs. All project files stay on your computer without additional cost.
- The queue generator remains ready to process future rows from jobs.csv.
- The four replay-tested templates remain available for later exports.
- The current numbered trails remain available for inspection.
- The disposable output files remain available for comparison.
Pause - I'll come back to this later
Clearing the generated queue files gives you a clean restart while preserving the reusable workflow. These deletions affect only disposable test artifacts.
- Open File Explorer with Windows search.
- Navigate to C:\CreoBatchExport\queue.
- Delete every numbered .txt file inside the folder.
The queue folder should now be empty.
- Navigate to C:\CreoBatchExport\outputs.
- Delete every disposable export file inside the folder.
The outputs folder should now be empty.
- Return to C:\CreoBatchExport.
Your reusable automation kit remains untouched.
Delete - I don't want to use this again
Deleting C:\CreoBatchExport is permanent once it leaves your normal Windows recovery options. Your existing CAD installation remains outside this folder.
- Close the Visual Studio Code window that has C:\CreoBatchExport open.
- Open File Explorer with Windows search.
- Navigate to C:\CreoBatchExport\outputs.
- Confirm every file in the folder is a disposable test export.
- Navigate to C:\.
- Delete the CreoBatchExport folder.
- Refresh the C:\ view in File Explorer.
You should no longer see CreoBatchExport under C:\.
Your existing trail playback workflow remains untouched. Your disposable test model remains in its separate location.
Nice Work!
Nice Work!
You did it! You built a Python command-line queue generator that turns CSV jobs into validated trail files for Creo 6.0.
You've learned how to:
- Build a CSV-driven queue generator that converts job rows into numbered trail files with absolute model paths and output paths.
- Protect the workflow with preflight validation for missing models, missing templates, required tokens, and safe job names. Your JSON manifest keeps ready jobs separate from blocked jobs.
- Connect locally recorded trail templates for PDF, OBJ, and IGES exports. You replay-tested each format on disposable CAD data before using the queue.
- Secret Mission: Extended the same queue with a fourth export format that you recorded, tokenized, generated, and replay-tested in your own Creo 6.0 installation.
Ready to quiz yourself?