I have made a batch file to run some teddy files through sps.exe, see excerpt below:
@echo off
set no_waves=100
set shift=0
"C:\Program Files\SOFiSTiK\2020\SOFiSTiK 2020\sps.exe" ".\01_Model\AQUA\Materials.dat"
"C:\Program Files\SOFiSTiK\2020\SOFiSTiK 2020\sps.exe" ".\01_Model\SOFIMSHC\Geometry.dat"
As my project is quite large, I have created a folder structure for each SOFiSTiK module with relevant teddy files in them (\AQUA,\SOFIMSHC,\SOFILOAD,\TALPA etc.)
When running sps.exe it places all the output files within the active subfolder, which means the next teddy file it runs can’t find the previous output files.
Is there any way to set a working directory for sps to save all output in the \01_Model folder instead of in the active subfolder?
I could of course write a piece of code in the batch file that moves all files except .dat into the \01_Model folder after the run, but it just seems cumbersome, so hopefully there’s a smarter way?
If I read the manual correctly I should be able to put SOFISTIK_PRODIR into my batch file and set the directory from there, but the files turn up in the same location, so I’m obviously misreading something.
@echo off
set no_waves=100
set shift=0
set SOFISTIK_PRODIR="C:\Users\myuser\mymodel\01_Model"
"C:\Program Files\SOFiSTiK\2020\SOFiSTiK 2020\sps.exe" ".\01_Model\AQUA\Materials.dat"
"C:\Program Files\SOFiSTiK\2020\SOFiSTiK 2020\sps.exe" ".\01_Model\SOFIMSHC\Geometry.dat"
I did a quick try and I was only able to move the location of the cdb
The result files (plb/etc) however seem to stay in the dat folder.
An alternative is to create a “main.dat” in the project folder
Then you include the subfiles in your main dat with #include ".\01_Model\AQUA\Materials.dat"
I ended up making a main.dat in a parent directory and then running everything from there.
My next issue now is with printing report files, because when I run the teddy code from a main.dat, everything is thrown into “main.plb”.
I’m trying to print my load setup using +sys ursula "Load_plots.plb" -printto:"pdf", but seeing as everything is crammed into main.plb the reports are way too large.
I’ve tried splitting the processes into two separate files in the same parent directory, but I arrive at the same issue as before where they don’t share the same working files and prompt errors: