Please enable JavaScript to view this site.

TerraScan User Guide

Navigation: Batch Processing Reference > Macros

Run a macro in TerraBatch

Scroll Prev Top Next More

Run macros in TerraBatch

Not Lite, Not UAV

TerraBatch is a program for executing TerraScan macros. It is included in a full TerraScan version but it can also run with an own license on a computer without TerraScan and a CAD platform installed. It can be launched from TerraScan Run macro on blocks dialog.

The main benefits of using TerraBatch are:

The CAD platform and TerraScan are immediately free for interactive work while the macro is running.

It can use more memory and processor power than an application running on top of a CAD platform.

It can queue several tasks for being executed one after the other without further interaction.

It can utilize several computers in the network.

Powerful servers can be used for batch processes.

Besides executing the macro steps, TerraBatch provides a simple task management system called TerraDispatcher. This includes the display of processed working segments and computers involved in the processing task, the ability to abort tasks, the ability to restart processing for a working segment and other options to interact with the process. The TerraBatch User Guide describes the application in detail.

There are some macro actions and processing options that do not work with TerraBatch. This includes:

Start a task on computer 1 and start another task on computer 2 modifying the same data set.

Run on another computer, if local paths are used. Network directories used in macros must be shared in order to enable TerraBatch to read and write data into a folder over the network.

Run on multiple computers, if an output step writes into the same output file for all blocks (Output points or Output by line macro steps).

Use Inside fence only setting in a macro step.

Use Keyin command step.

Use a step that requires functionality of other Terra applications, such as Apply correction and Create model.

Use Write to design step.

The Macro dialog shows whether a macro can run in TerraBatch or not. See Create a macro for more information. The options for TerraBatch processing are stored in the macro file header:

BatchCanRun=1 - Macro can be executed by TerraBatch.

AnotherComputerCanRun=1 - Macro can be executed by TerraBatch on another computer.

CanBeDistributed=1 - Macro can be executed by TerraBatch on multiple computers.

If one of these options is set to 0, the option is not available due to the above listed restrictions for running macros in TerraBatch. Macros are stored as text files, so you can check the file header in any text editor.

To run a macro in TerraBatch:

1. (Optional) Select blocks in the TerraScan Project window if you want to execute the macro on selected blocks only.

2. Select Run macro command from the Tools pulldown menu in the TerraScan Project window.

This opens the Run Macro on Blocks dialog:

run_macro_on_blocks_tslave

3. Define settings as described in Run a macro on a project.

4. Switch on Run using TerraBatch.

5. Click on Settings button.

This opens the TerraBatch Task Settings dialog:

tslave_task_settings_thistslave_task_settings

6. Select from the Run using list, whether to execute the macro on your computer only or on network computers.

Depending on the selection, the dialog provides different options.

For this computer, you can set the number of Instances for TerraBatch processing in the corresponding dialog field.

For network computers, the list shows the computers set for TerraBatch processing in the Batch computers category of TerraScan Settings. By default, all computers are switched on. Switch off a computer that you want to exclude from processing the macro. You can also change the number of instances used for TerraBatch processing on a computer. Click on the number behind the computer name and type a new number in the text field. Press <Enter> to set the new number.

By default, TerraDispatcher will take care of dispatching the task to computers and instances automatically. Select Manually in the Dispatch list if you want to control this manually.

The Interval value determines the time interval at which the TerraDispatcher checks for pending tasks and updates the progress display.

7. Click OK.

8. Click OK to the Run macro on blocks dialog.

This launches TerraDispatcher if it is not already running and starts processing the task in TerraBatch. If another process is already running, the task file is added to the queue and processed as soon as the other tasks are finished. See TerraBatch background processing workflow for a more detailed description of TerraBatch task management.

TerraScan User Guide   01.01.2024   © 2024 Terrasolid Ltd