Scheduled Batch Operations

From Quadri for Windows 2020, you are able to run scheduled batch operations such as import and export, server operations, and more.

Setting up the batch-file

Before you start editing the batch file, you should be aware of some basic commands:

Table: Batch file commands

An example with Receive, Share, and Produce TrimBIM files commands to get you started is below. Copy it, then open a text editor, and paste. Save As with file extension *.cmd.

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

In bold are the things that you need to change. First the file path for where your Quadri model is stored, and second what share description you want to input, third is GUID for the 3D presentation task. You will find if when clicking the task in the explorer, and also have “Show internal attributes” enabled.

Other commands:

-f File BatchFilename

-p Project

-c Config file

-l Layout file

-e Extensions file

-log Log configuration file

-a Action “new”: “load”: “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: “save”, “discard”

-unit“ Sets the units to imperial e.g.

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

Running the batch file automatically with Windows Task Scheduler

If you want the batch file to run automatically on a regular schedule, you can set up this with Windows Task Scheduler.

You will find Windows Task Scheduler in your Windows start button:

In the window that opens, select the Windows node in the task tree in the left pane to see if there are any user-defined tasks from before on the PC. The tasks are shown in the mid-pane.

Click on Create Basic Task to create the task for running the batch file.

The wizard that starts is self-explanatory. In the first window that opens, you must specify the task name and an optional description:

In the next window, specify the trigger:

If you choose daily, e.g., then you must specify the time:

Then, choose to Start a program:

In the next wizard window that opens, click the Browse button and select the batch file on your PC:

And finally, you get a summary window of your settings:

You should test-run the scheduled task by selecting the Windows node in the task tree in the left pane, selecting the task you just made in the mid pane, and finally, clicking the Run menu option.



Next topic: Upgrade