Scheduled Batch Operations

You have the possibility to run scheduled batch operations such as import and export, server operations, and more.

Before you start editing the batch file, you should be aware of some basic commands:
  • rem: Include the beginning of a line to ignore or comment out the rest of the line.
  • pause: Stops the batch run until you press a key.
  • chcp 1252: (Change Code Page) allows for Norwegian letters in file paths and so on.
  • chcp 850: Sets back to standard DOS code page.
  • start/wait: Makes the process that is started on the actual line finish before it starts the process defined on the next line.
  • setlocal: Makes all the following variables defined by set valid only as long as the batch file is running.
  • set: Sets a variable to be used further down in the batch-file.
  • del: Deletes a file.
  • if exist: Checks if a file exists.
  • echo: Writes the rest of the line in the command window.

Table: : Batch file commands

For an example of how to implement these batch operations, the following code block includes Receive, Share, and Produce TrimBIM files commands.

To use this command file for yourself, copy the code block given below into a text editor. Edit the portions shown in bold text:

  1. Replace the existing file path with where your Quadri model is stored.
  2. Replace the existing share description with what you want to input.
  3. Replace the GUID for the 3D presentation task with your own. You can find this by clicking the task in Explorer with Show internal attributes enabled.
REM === Allow for Norwegian letters ===
CHCP 1252
REM === Specify the worksets ===
SETLOCAL
SET “Workset=C:\Users\Jkowals\AppData\Local\qg4\E1EF0F4FDADA4D138077D127246F76\Job\7\Quadri Batch\Quadri Batch.QuadriModel”
REM === 1) Receive
START /wait quadri.exe -bkgr -exit:save -p:“%Workset%” -serverop:receive -wait:true
IF EXIST “%USERPROFILE%\AppData\Local\Temp\Trimble\26.00\Quadri.Session” (
ECHO Quadri crashed
PAUSE)
REM PAUSE
REM === 2) Share ===
START /wait quadri.exe -bkgr -exit:save -p:“%Workset%” -serverop:share -sharedesc:“Jakob is sharing model through batch” -wait:true
IF EXIST “%USERPROFILE%\AppData\Local\Temp\Trimble\26.00\Quadri.Session” (
ECHO Quadri crashed
PAUSE)
REM PAUSE
REM === 3) Produce TrimBIM-file ===
START /wait quadri.exe -bkgr -exit:save -p:“%Workset%” -batchtask:ab220a91-ac9e-45b7-a6a8-a3f84302593a -wait:true
IF EXIST “%USERPROFILE%\AppData\Local\Temp\Trimble\26.00\Quadri.Session” (
ECHO Quadri Desktop crashed
PAUSE)
REM PAUSE

Save this file with with the file extension .cmd.

In order to use the batch file, it needs to be placed in the installation folder, where your Quadri.exe file is. You should now be able to run the batch file to test sharing to the server.

Other Commands

Here are some other commands you should be aware of.

  • -f: File BatchFilename.
  • -p: Project.
  • -c: Config file.
  • -l: Layout file.
  • -e: Extensions file.
  • -log: Log configuration file.
  • -a: Performs and action, such as new, load, or load_prev.
  • -nsp: No splash screen.
  • -bkgr: Run in silent mode.
  • -splash: Sets splash screen file.
  • -noserver“: Runs without a server.
  • -noautocad”: Runs without AutoCAD.
  • -license“: Sets the licensing regime.
  • -language: Sets the language to use.
  • -config: Sets the config to use.
  • -userconfig: Sets the userconfig to use.
  • -resetuserconfig
  • -stopshareonvalidationerror
  • -batchtask: Runs a task in silent mode.
  • -serverop: Receive or share. Used with silent mode.
  • -sharetask: Share a given task.
  • -sharedesc: Description to be shown on the timeline when sharing.
  • -exit”: Options when exiting are save or discard.
  • -unit“: Sets the units, for example, to imperial.