Running TerraScan macros from CONNECT ribbon

It is possible to run a TerraScan macro using a button on the ribbon in MicroStation CONNECT. The process to assign a macro to the ribbon takes three steps:

Step 1: Create Macro

In TerraScan create and save a macro. The macro needs to be saved to a location that it searchable by MicroStation. This location can be customized by modifying the “TSCAN_MACRODIR=$(TERRADIR)macro/” line in the “TScan.CFG file”, but the default for this location is: ‘C:\terra\macro.’ The example below shows a macro named, “basic_ground”, in the default location.

Saved Macro

Saved Macro

Step 2: Create Tool

Open your Design File Library (Dgnlib), for example “yourcompany.DGNLIB” you created following the Quick Intro to Customizing MicroStation CONNECT, located in: ‘C:\ProgramData\Bentley\CONNECT Edition\Configuration\Organization\Dgnlib\Gui’, or your personal design library, Personal.DGNLIB, located in “%LOCALAPPDATA%\Bentley\<product_name>\<product_version>\prefs\”. We recommend the provided Terrasolid.DGNLIB remains as provided so that you can easily download the latest from this knowledge base for fixes and new tools.

Go to File->Settings->Configuration->Customize to open up the Customize window, or Select Customize from the ribbon (Admin->Home->Environment->Customize) .

Microstation Settings

Microstation Settings

In the Customize Window, add a new tool box to your Dgnlib. In the example below, a tool box named ‘Macros’ was added. Within the new toolbox, add a new tool. The tool in the example below is named after the intended macro: ‘Basic_Ground.’

Within the ‘Command Data’ pane in the bottom left of the Customize window, there is an option for assigning a key-in for this tool. Many of the tools in TerraScan can be started by entering a key-in command in the MicroStation key-in line. The syntax for assigning a macro to this tool is ‘scan run macro macrofile.‘ Replace macrofile with the name of your saved macro, for example, macrofile was replaced with ‘basic_ground.’

Create Tool

Create Tool

 

Step 3: Add Tool to Ribbon

Right-click on the MicroStation ribbon and select the Customize Ribbon option. This will open the ‘Customize Ribbon’ window for your current design library. Select the macro tool that you created and add it to the desired location in the ribbon and click ‘Apply.’

Ribbon Customization

Ribbon Customization

After these steps are accomplished, you will see a button on the ribbon that will run your saved macro.

TerraScan classification ribbon

TerraScan classification ribbon

For more information on how to customize CONNECT for your Terrasolid workflow see A Quick Intro to Customizing MicroStation CONNECT.

 

 

Share

GeoCue Group Support

GeoCue Group Support has written 808 articles

Leave a Reply