Skip to main content
3-Newcomer
March 16, 2026
Question

Subject: Batch PLT export from Creo 12 — cpbatch.exe missing, ProPrintExecute returning -22

  • March 16, 2026
  • 1 reply
  • 91 views

Hi all,

I am building an automated drawing export system using Creo Toolkit (Creo 12, Windows, DLL architecture). PDF and DXF batch export are working perfectly via ProPDFExport and Pro2dExport. PLT export has been the blocker for 2+ days.

What I have tried:

1. ProPrintExecute — All three option getters succeed (status=0):

  • ProPrintPrinterOptionsGet("postscript")
  • ProPrintMdlOptionsGet
  • ProPrintPlacementOptionsGet

But ProPrintExecute always returns -22 (PRO_TK_BAD_CONTEXT). Window ID from ProMdlWindowGet is confirmed valid (1001). Drawing is retrieved, displayed, window activated and set current before the call.

2. cpbatch.exe — Cannot find it anywhere in our Creo 12 corporate installation:

  • Parametric\bin\ — only parametric.exe and cocreatesim.exe
  • Common Files\x86e_win64\obj\ — not present

Is cpbatch.exe still shipped with Creo 12 or has it been removed?

3. xtop.exe — Present in our installation. Has anyone used it for headless batch PLT export? What arguments does it accept?

Environment:

  • Creo Parametric 12
  • Corporate deployment (PTCApps launcher)
  • Windchill PDM integration
  • DLL compiled VS2022, Release x64, /MD

Any working approach for silent/headless PLT export from Creo 12 would be very much appreciated — mapkey, xtop, batch utility, or any other method.

Thanks

1 reply

14-Alexandrite
March 17, 2026

Check the data structures populated by the "ProPrint...OptionGet" functions and if needed update the values as required. I have an application which uses ProPrintExecute but instead of using the get functions I'm populating the data structures directly. This is working flawlessly for every version of Creo and Visual Studio in the past 12 years.

 

Regarding your number 2 question. I don't recall of cpbatch.exe being part of Creo distribution. Please give us more context to understand where this came from? Maybe add a screenshoot with the error message mentioning this executable.

 

Number 3. xtop.exe is the main Creo executable.