December 19, 2018

Minex Tips & Tricks: Creating TCL Scripts to automate routine workflows

  In today’s tip we discuss how to easily create a TCL…
header
Avatar Ryan Blackwell

In today’s tip we discuss how to easily create a TCL script in GEOVIA Minex. TCL scripts are an excellent way to automate routine workflows and scripting can help geologists and engineers be more efficient in their daily tasks.

Scripts, also known as macros, are TCL files that describe a sequence of events in Minex. You do not need to manually write script files for use in Minex, instead you can use Minex to record actions you perform, using the Minex interface. Aside from automating Minex workflows with TCL scripts, Minex also uses a subset of Structured Query Language (SQL) to provide a means for users to manipulate data.

This example shows a simple TCL script that we can create to automatically display boreholes with predefined parameters. Once the script is created, we can playback this script to display the boreholes without having to go through the routine process to do so.

1. To create a script, go to the Tools menu and select Scripting, then Start/stop recording a script.

Alternatively, you can use the Scripts icon as shown below (Scripts functions are located in the Processes toolbar).

11. The script will run and display the boreholes accordingly saving time for routine tasks.

9. Select the display parameters you require and click Ok. The script is now complete for this example.

10. To use this “Borehole_Display” script again to display the boreholes based on your display parameters, simply playback the script. You can do this from the Explorer menu by right clicking on the tcl script, by selecting to Play a script from the Tools menu, or by clicking on the Play script toolbar icon.

OR

11. The script will run and display the boreholes accordingly saving time for routine tasks.

8. The next step is to select Plot under the Boreholes menu and then Borehole Display to select the display parameters.

9. Select the display parameters you require and click Ok. The script is now complete for this example.

10. To use this “Borehole_Display” script again to display the boreholes based on your display parameters, simply playback the script. You can do this from the Explorer menu by right clicking on the tcl script, by selecting to Play a script from the Tools menu, or by clicking on the Play script toolbar icon.

OR

11. The script will run and display the boreholes accordingly saving time for routine tasks.

7. Now click on Select Holes to highlight the boreholes you want to display. For this example I’ve selected ALL boreholes.

8. The next step is to select Plot under the Boreholes menu and then Borehole Display to select the display parameters.

9. Select the display parameters you require and click Ok. The script is now complete for this example.

10. To use this “Borehole_Display” script again to display the boreholes based on your display parameters, simply playback the script. You can do this from the Explorer menu by right clicking on the tcl script, by selecting to Play a script from the Tools menu, or by clicking on the Play script toolbar icon.

OR

11. The script will run and display the boreholes accordingly saving time for routine tasks.

6. Next, select the BoreholesDB Menu and Select Boreholes.

7. Now click on Select Holes to highlight the boreholes you want to display. For this example I’ve selected ALL boreholes.

8. The next step is to select Plot under the Boreholes menu and then Borehole Display to select the display parameters.

9. Select the display parameters you require and click Ok. The script is now complete for this example.

10. To use this “Borehole_Display” script again to display the boreholes based on your display parameters, simply playback the script. You can do this from the Explorer menu by right clicking on the tcl script, by selecting to Play a script from the Tools menu, or by clicking on the Play script toolbar icon.

OR

11. The script will run and display the boreholes accordingly saving time for routine tasks.

3. Name the script – “Display_Boreholes” for this example.

4. When you click Save, the recording of your TCL script has began. Follow the steps you wish to recreate with the script by clicking through the menus to display the boreholes based on your inputs.

5. First, open the Borehole database via the Explorer window.

6. Next, select the BoreholesDB Menu and Select Boreholes.

7. Now click on Select Holes to highlight the boreholes you want to display. For this example I’ve selected ALL boreholes.

8. The next step is to select Plot under the Boreholes menu and then Borehole Display to select the display parameters.

9. Select the display parameters you require and click Ok. The script is now complete for this example.

10. To use this “Borehole_Display” script again to display the boreholes based on your display parameters, simply playback the script. You can do this from the Explorer menu by right clicking on the tcl script, by selecting to Play a script from the Tools menu, or by clicking on the Play script toolbar icon.

OR

11. The script will run and display the boreholes accordingly saving time for routine tasks.

2. You will be asked where you would like to save this script. It is recommended to save to the script folder for simple organization.

3. Name the script – “Display_Boreholes” for this example.

4. When you click Save, the recording of your TCL script has began. Follow the steps you wish to recreate with the script by clicking through the menus to display the boreholes based on your inputs.

5. First, open the Borehole database via the Explorer window.

6. Next, select the BoreholesDB Menu and Select Boreholes.

7. Now click on Select Holes to highlight the boreholes you want to display. For this example I’ve selected ALL boreholes.

8. The next step is to select Plot under the Boreholes menu and then Borehole Display to select the display parameters.

9. Select the display parameters you require and click Ok. The script is now complete for this example.

10. To use this “Borehole_Display” script again to display the boreholes based on your display parameters, simply playback the script. You can do this from the Explorer menu by right clicking on the tcl script, by selecting to Play a script from the Tools menu, or by clicking on the Play script toolbar icon.

OR

11. The script will run and display the boreholes accordingly saving time for routine tasks.

2. You will be asked where you would like to save this script. It is recommended to save to the script folder for simple organization.

3. Name the script – “Display_Boreholes” for this example.

4. When you click Save, the recording of your TCL script has began. Follow the steps you wish to recreate with the script by clicking through the menus to display the boreholes based on your inputs.

5. First, open the Borehole database via the Explorer window.

6. Next, select the BoreholesDB Menu and Select Boreholes.

7. Now click on Select Holes to highlight the boreholes you want to display. For this example I’ve selected ALL boreholes.

8. The next step is to select Plot under the Boreholes menu and then Borehole Display to select the display parameters.

9. Select the display parameters you require and click Ok. The script is now complete for this example.

10. To use this “Borehole_Display” script again to display the boreholes based on your display parameters, simply playback the script. You can do this from the Explorer menu by right clicking on the tcl script, by selecting to Play a script from the Tools menu, or by clicking on the Play script toolbar icon.

OR

11. The script will run and display the boreholes accordingly saving time for routine tasks.

Stay up to date

Receive monthly updates on content you won’t want to miss

Subscribe

Register here to receive a monthly update on our newest content.