Solved: CAD Optimizer failed on large Creo Illustrate PVZ files
I found the cause and a working solution, so here it is in case it helps someone else.
What the problem was
The Studio log (twx-studio:cad-import-filters) showed:
pvsoptimize Fatal: Malloc failure allocating 720904 bytes - Enough memory?
- Studio uses the 32-bit
pvsoptimize.exe (in import_filters\bin), which can only use a few GB of RAM, no matter how much the PC has. - Studio also runs the high, med and low recipes in parallel, so three 32-bit processes share the memory.
- With my PVZ files (about 500 MB, around 1,400 components), this was simply too much. In my case, low disk space on C: made it worse, because the optimizer extracts the PVZ into the Temp folder.
The fix: run the 64-bit optimizer manually
The Studio installation also contains a 64-bit pvsoptimize.exe in import_filters\x86e_win64\obj. Studio is an MSIX/Store app, so you can’t run it from C:\Program Files\WindowsApps, but you can copy it out.
- Copy the whole
import_filters folder to another drive:
powershell
$pkg = "C:\Program Files\WindowsApps\9CAFC431.26312A8ACB347_10.0.14.0_x64__0yks9x29vmc6y"
Copy-Item "$pkg\VuforiaStudio\node_modules\@ptc\cad-import-filters\import_filters" "F:\pvz_tools\import_filters" -Recurse
- Run the optimizer with one recipe:
powershell
$env:TEMP = "F:\Temp"; $env:TMP = "F:\Temp"
$env:PVIEW_HOME = "F:\pvz_tools\import_filters"
& "F:\pvz_tools\import_filters\x86e_win64\obj\pvsoptimize.exe" "-rF:\pvz_tools\import_filters\recipe\pvsoptimize_low_vuforia.rcp" "-pF:\pvz_test\out" "-omodel_opt" "F:\pvz_test\model.pvz"
- Upload the result (
model_opt_Low.pvz) to Studio without ticking “Run CAD Optimizer”.
Result: 507 MB → 165 MB, and all Illustrate sequences (movement, visibility and transparency) still work.
Things to watch out for
PVIEW_HOME must point to the import_filters folder, not to x86e_win64. Otherwise you get “Failed to load recipe file”. - Options are written without a space, e.g.
-rfile.rcp, -pfolder, -oname. - Set
TEMP to a drive with enough free space, and don’t delete the Temp folder while it runs, or the sequence files (.pvi) are missing in the output. - Run one file at a time. My RAM still peaked at 99 % of 32 GB with a single process.
mergeFacesToBody=0 made the optimizer finish, but in my model it dropped the large parts (probably surface-based geometry from CATIA). With the original recipe and the 64-bit exe, everything worked. - The folder name under
WindowsApps depends on your Studio version, so check yours in the Studio log.