Running SOFiSTiK Calculations from Python

I have a general question regarding the CDB interface to Python:
After connecting to the CDB, is it possible to run the SOFiSTiK Calculations module directly from Python?

try somethink like this:

import sys, subprocess
sys.path.append('C:/Program Files/SOFiSTiK/2022/SOFiSTiK 2022')
file_path = <path to .dat file with valid sofistik input>

then

subprocess.run(f'sps "{file_path}"')

or

subprocess.run(f'wps -b "{file_path}"')
1 Like

Thank you so much for your response.
It works! :slight_smile:

Hi there,
we have tried the same with Sofistik 2022. It hasn’t worked for us. We also tried with 2023, unfortunately the same.
We can connect to the CDB and read results. But it we cannot start a new calculation.
Are there any other ideas how to that?

Try this:
sps_app = ‘C:/Program Files/SOFiSTiK/2022/SOFiSTiK 2022/sps.exe’
subprocess.run([sps_app, ‘fime_name.dat’])

1 Like

Great! Works! Thx a lot!