msbatch file not working properly

What I Have:

The script in msbatch.bat is as follows, per the posting here:

@echo off
rem %1 should be the name of the application (ex. msbatch.bat cnvdgn)
rem %2-%9 are other parameters to be passed through to the application
runwait 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\OpenBuildingsDesigner
msbatch batchprocess P:\CAD\220_ARCHITECTURAL\OBD_Configuration\Dataset_FGG\Setting\batchprocessname.bprc > logfile.log 2>&1

The file 'msbatch' is placed in the directory specified by the task scheduler script, and is the location of OpenBuildingsDesigner.exe.

The Issue:

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!

Parents Reply Children
  • 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

    The executable for MicroStation CONNECT is MicroStation.exe.  That wiki article refers to earlier 32-bit versions of MicroStation.

    Perhaps the authors  or could bring it up to date?

    Here's what I see when I key-in MicroStation /? at a Windows command prompt...

    MicroStation CONNECT Edition - Version Windows x64
    Command Line Arguments for MicroStation.exe:
    -M                        - Specifies initial model to open.
    -R                               - Opens the design file in read-only mode.
    -O                               - Does not open any references.
    -QP                    - Specifies password for protected file.
    -S                 - Puts contents of the startup file into the command queue on startup.
    -I                   - Passes through parameters to INITAPPS.
    -RestoreDefaults[Quiet]          - Restore default settings and then exit. If Quiet added, no output displayed.
    -Debug                           - Shows configuration variables and then and exits.
    -WA             - Specifies MDL application to start at MicroStation initialization
                                       (same as setting MS_INITAPP).
    -WC  - Specifies the configuration file for MicroStation startup
                                       (for example, -wcC:\Bentley\Configuration\myconfig.cfg).
    -WD                    - Specifies database configuration.
    -WK                   - Specifies initial WorkSpace.
                                       If WorkSpace is specified, a child WorkSet must also be specified (using -WW).
    -WW                     - Specifies initial WorkSet.
                                       If WorkSet is specified, its parent WorkSpace must also be specified (using -WK).
    -WS      - Specifies a configuration variable to be defined at startup.
                                       (for example, -wsMS_SECURITY_LEVEL=HIGH).
    -WR                        - Specifies _USTN_CONFIGURATION (for example, -wrC:\Bentley\Configuration\).
    -help or -?                      - Displays Command line arguments for MicroStation.

    Regards, Jon Summers
    LA Solutions

  • Jon,

    Thank you for bringing this to our attention. This wiki did need some updating.

    I did some testing based on some of the things mentioned on this forum discussion and confirmed the changes in some of the commands and syntax. I have updated the wiki based on this information.

    Please see: What are the switches for msbatch?

    Thanks again.