Creo automation: start Creo with trail-file by e.g. python command
I want to do some automated Tasks in Creo controlled by a python script.
I prefer a simple solution without the need of extra Software (creoson / creopyson).
What works is to start Creo with a Batch file or from cmd with the Trail-file. (parametric.exe .psf Trail.txt)
But when I start Creo like this from within python, the Trail file is ignored. I don't know why.
I use the external Analysis and .csv files to change Parameters and get measurements. The csv-files are read/written with the python script.
Is there something in Creo, which blocks the Trail-file when started from python?
I think it would be the same, if I use a different programming language.
I've tried the following:
batch-file:
"C:\Program Files\ptc\Creo 4.0\M070\Parametric\bin\parametric.exe" "C:\Program Files\ptc\Creo 4.0\M070\Parametric\bin\parametric1.psf" M:\test_trail.txt
python commands:
start with batch file:
import os
import subprocess
os.chdir(pathlib.Path(r"C:\Program Files\ptc\Creo 4.0\M070\Parametric\bin"))
test = subprocess.Popen(r"M:\start_creo_with_trail.bat")
start directly:
import os
import subprocess
os.chdir(pathlib.Path(r"C:\Program Files\ptc\Creo 4.0\M070\Parametric\bin"))
test = subprocess.Popen(["parametric.exe","parametric1.psf","M:\test_trail.bat"])

