What I Have:
The script in msbatch.bat is as follows, per the posting here:
@echo offremrem %1 should be the name of the application (ex. msbatch.bat cnvdgn)rem %2-%9 are other parameters to be passed through to the applicationremrunwait OpenBuildingsDesigner.exe -wa%1 -i%2 -i%3 -i%4 -i%5 -i%6 -i%7 -i%8 -i%9
This is called by this file (let's call it 'conversion_process.bat') I have set to run with task scheduler:
cd /d C:\Program Files\Bentley\OpenBuildings Connect Edition\OpenBuildingsDesignermsbatch batchprocess P:\CAD\220_ARCHITECTURAL\OBD_Configuration\Dataset_FGG\Setting\batchprocessname.bprc > logfile.log 2>&1pause
The file 'msbatch' is placed in the directory specified by the task scheduler script, and is the location of OpenBuildingsDesigner.exe.
Whenever I attempt to run the script, I get the following error:
'runwait' is not recognized as an internal or external command, operable program or batch file.
Why is 'runwait' not recognized, where is this command supposed to be, and why are the only listings I can find about 'runwait' online referring to AutoHotKey, which my coworker does not have installed but can run this script with no problem? Is there an environment variable that I need to make sure is set before my PC will recognize the command as valid? Is this process even available for OpenBuildingsDesigner?
The '> logfile.log 2>&1' was needed as the command wouldn't run properly and thus the cmd window closes prior to the 'pause' command, not allowing me to see any error info.
Any help with this would be greatly appreciated!
I would also like to point out, attempting to use 'ustation -?' as per this post (with the exception of doing it in the OpenBuildingsDesigner installation folder, where both ustation.dll and ustation.rsc are listed) results in the same error message, and does not provide a list of switches as promised. it looks like there's an issue with how my computer recognizes this folder, or the installation did not install properly on my machine.
Okay, I was speaking with my coworker (from whom I got the msbatch file to put into my executable directory, and thus should have had the same version of the file) and her version had 'start /wait' in place of 'runwait'. I made the change in my copy and lo and behold, it's working. I'm not sure if this is because runwait truly is just an AutoHotkey command or if runwait was depricated in some version of Windows, but for anyone with a similar issue as above the msbatch file should read as follows:
@echo offremrem %1 should be the name of the application (ex. msbatch.bat cnvdgn)rem %2-%9 are other parameters to be passed through to the applicationremstart /wait OpenBuildingsDesigner.exe -wa%1 -i%2 -i%3 -i%4 -i%5 -i%6 -i%7 -i%8 -i%9
Answer Verified By: Paul MacKnight
This answer does not explain why I am unable to use the 'ustation -?' command, but I'm less concerned about that now.
when you type ustation -? it's looking for an executable program named ustation. Neither ustation.dll nor ustation.rsc are directly executable.
In OpenRoads Designer the executatble has been renamed from ustation.exe to OpenRoadsDesigner.exe.
and you should see:
Okay, that explains it. I needed to type OpenBuildingsDesigner, as I don't have Open Roads installed, but it works either way. Thank you!