You are here: Surpac Concepts > Macros
GEOVIA Surpac

Macros

You can perform repetitive operations efficiently with Surpac macros.

Macros are recorded in a 'scripting' language known as Surpac Command Language (SCL). SCL is based on the widely available Tool Command Language (TCL).

Before SCL was implemented in Surpac, you could record macros as .cmd files. The .cmd macro interpreter subsystem is still included with Surpac, so you can still run .cmd files. You can also run compiled macros (.cmz files) using the MACRO PLAYBACK function.

You can start and end recording, and run macros, using functions or keyboard shortcuts.

Function Key Description  
MACRO RECORD START F4 Start recording a macro. A form is displayed where you are prompted to enter a name for the macro.  
MACRO RECORD END F5 End recording the macro. Exiting Surpac while recording the macro also ends recording of the macro.  
MACRO PLAYBACK F6 Runs a macro. A form is displayed prompting you to enter the name of the macro, the macro playback options and the arguments (10 or less) to pass to the macro.  

Running macros from the command line

You can also run macros from the command line of the operating system by typing the following command:

surpac2 macroname