Skip navigation
All Places > TBC Macros and Extensions > Blog
1 2 Previous Next

TBC Macros and Extensions

17 posts
Peter Kistler

TML - TMLStatus

Posted by Peter Kistler Jun 20, 2019

TMLStatus is a TML written by Rockpile Solutions to manage registered TMLs from within Trimble Business Center. It allows you to find registered TMLs and easily install and / or update them. 

The link TMLStatus will download the TMLStatus installation program. This is the only thing you need run outside of Trimble Business Center. By providing this as an installation package, you are free from having to download, navigate, install, and unblock the files needed to run TMLStatus.

All of the latest versions of Trimble TMLs are registered as well as TMLs written by Rockpile Solutions. To install or update a TML, check the box next to the TML you are interested in. You can select more than one and they can be from different providers / authors. 

Once you have made all of your selections, press the Update button.  TMLStatus will retrieve the selected TMLs and install the latest version on your system. TMLStatus will automatically "Unblock" the TML if it is required, a step that is easily overlooked if you manually download and install a TML. Lastly, it will let you know if you need to restart TBC to access the TML.


The Author column within TMLStatus indicates the person or company that produced the TML. The Installed version indicates the version currently installed in TBC.  The Latest Version indicates the latest version registered with Rockpile Solutions.  The Status field is a quick indication in a TML is up to date or not.


The Licensed column will indicate if a license is required to run the selected TML.  TMLStatus itself does not require a license to run. To run a Licensed TML, you will need to have a Trimble Connect account and be registered with Rockpile Solutions. (I am in the process of adding the ability to purchase a license online. Until that system is working, you can contact me at and I will issue you a temporary license free of charge)

Gary Lantaff

TML - Explode Surface

Posted by Gary Lantaff Apr 19, 2019

Simple TML to explode a surface into lines and "cad points". The lines are attached to the cad points by reference so if you move one of the points, all the lines connected to it will move.


Gary Lantaff

TML - Adjust Area

Posted by Gary Lantaff Mar 18, 2019

This TML will slide a line perpendicular to a reference line until a specified area is computed. There is an option to create a polygon object (containing part of the specified boundary) or just a line.



The direction of the computed line is determined by which line is selected as the "Reference line". The reference line does not need to be a member of the boundary lines (but can be). This example has two boundary lines and an optional third line to be used as the reference line.




If the solid red line is selected as the reference line, the computed line will be the dashed red line (perpendicular to the red line). If the solid green line is selected as the reference line, the dashed green line will be computed.


TIP: If you pick at a control point of the line, the line is computed by pivoting about that location instead of computing a perpendicular line.


NOTE: I'm testing the "compile" option so the attached zip file contains a compiled python macro (with a file extension of *.pydll). Just place file in same location as TBC will look for both compiled and non-compiled versions.


As I said, this macro is being provided in a compiled form. Windows sometimes "blocks" files that are downloaded. You may need to "unblock" the file after copying it to the macros folder. If you get an error starting TBC after adding the macro, go to properties of the file (AdjustArea.pydll) and see if you need to unblock the file. (you will have a "Security" section at the bottom of the properties dialog). Just check the "Unblock" checkbox if it is present.


This TML will extract the materials assigned to a surface and create a legend. There are two styles of legends. (Examples shown below)

NOTE: This macro requires TBC version 5.0 (patch 1 - Released 1/18)


The TML allows the user to assign the text styles used for each part of the legend.


If any line or text from an existing legend is selected when the TML is started, the macro assumes that the user wants to edit the existing legend instead of creating a new legend.


If the "Include Material Layers" option is checked, 


If the "Include Material Layers" option is  not checked,  the legend will look like this;

Gary Lantaff

TML - Lines To AOI

Posted by Gary Lantaff Jan 16, 2019

This is a simple TML to create Takeoff AOI's from the selected lines. The name of the AOI is taken from the lines name property.

A number of customers have asked me for a list of possible TML developers that could do work for them to solve problems that they want resolved. At Trimble we strive to meet customer requirements, but like any organization we have limited resources and available bandwidth to do so. We developed the TML capability for this specific reason, if something is important enough to you to resolve that you are prepared to pay to get it solved in a timely manner, there are a growing number of people out there that can do TML development on TBC v5 or later to help you to solve your issues, independent of waiting for Trimble to solve the issue for you.


I thought that this was a good way to share that list and allow TML programmers offering programming services to represent themselves on this Blog Post.


I am going to just put a few names out there to start off with, if you are a TML Programmer please add a Post to this list giving the following information about yourself or your company. Feel free to promote what you have done in a Blog of your own, posting videos of your work and references as you see fit. You can link to your own Blog from the Post you make here. Please keep this list as a "Yellow Pages" of TML Developers and keep the posts here short and concise please.



Location e.g. Colorado, USA

Company Name

eMail Address

Phone Number

Specialist Areas


e.g. If you are a specialist in Revit, Sketchup, AutoCAD C3D etc. please promote those specialist Areas so people can see more about you in the Blog Profile. Since you are a member of the Forum, you can update your User Profile and provide a Link to that if you want to also.


Whenever I see a request for a solution that we do not have and I don't feel that we will solve any time soon, I will point customers to this list as a reference.


Note: At this time we have no way to validate that an individual on this list is capable or skilled in the development of TMLs, only that they are self representing that they have the skill set to do this type of work - so we cannot guarantee the outcome of any engagement that you may have with a developer listed here. If you do work with one of the people on this list, and have success, please put a Like on their Blog Post here and then add comments to the programmers own Blog as to what they did for you and how you found working with them etc. 


Here is the starting List - Please add your profiles to this list and I will then edit the post here to remove you from this specific post.


Peter Kistler - (He is based in Colorado, USA)


Wyn Sleeman - (He is based in the UK)


Fernando Calvo - (He is based in Germany)


Dorthe Merete Larsen - (Based in Denmark)


Quan Mueller - (He is based in Colorado, USA)




Alan Sharp

This TML will copy a layer group and all the layers (that have members) into a new layer group where the group and each layer is named the existing name with a prefix (or suffix). Just select the layer group and enter a layer/group prefix.


I have updated the macro to allow the "prefix" text to be place after the layer or layer group name. Just enter the "^" character for the first character in the name and the layer name will be first with the new text appended. So if "^-P2" entered for prefix text, the layer group would be named "old-name-P2"


There is also a checkbox to allow "replacing" the prefix text. In this case, the same number of characters contained in the prefix will be removed from the existing name. So if you wanted to copy a layer group named "P2-Road intersection line" to a group named "P3-Road intersection line", just enter "P3" for prefix and select the replace option. Note, this applies to all the newly created layer too.


The new layer group name is now displayed in the Textbox so it can be checked before pressing the "Ok" button.

After running cmd, the view filter will show the new group and all the layers.

Gary Lantaff

TML - SurfaceToGrid

Posted by Gary Lantaff Nov 29, 2018

This TML will compute grid locations from a specified surface and write either (or both) an *.xyz file or a *.csv file. This can be useful for reporting purposes or to reduce the number of points in a surface.


An optional boundary can be specified. In this case, only grid points located in the boundary are computed. If an *.xyz file is created, the user is giving the option to import that as a point cloud. If a simple file name is supplied (no path defined), the file will be created in the project subfolder.



An option to compute the grid based on an alignment is available. When this is checked, the UI changes a bit. The grid locations are computed based on the station and offset to the defined alignment.


There is also an option to compute delta elevation between the specified surface and another reference surface. In this case, the computed elevation is the difference between the two surfaces. When computing the delta elevation between the two surfaces, you can restrict the points to elevations that fall outside the defined tolerances. When using this option, a rough volume is reported (just using average grid size time delta elevation)


Gary Lantaff

TML - AssignNameFromLayer

Posted by Gary Lantaff Nov 29, 2018

This TML can be used to name line objects using the name of the objects layer. You just select the line to name and enter a name "mask". 

You specify the new name using a name mask. If "{L}" is included in the new name, the layer name will replace that. Using "{N}" will insert previous name. So if you enter something like " L={L} old={N}" you will get something like "L=MyLayer old=OldName"

If you just want the name of the object to be the layers name, use "{L}" for name mask. (don't add quote characters)


By default, lines with an existing name will be skipped but you can "uncheck" the "Ignore lines with a name" option and all lines will have their name assigned.


An option to add a text label at the mid-point of the line has been added. The text will be the line's new name.


Gary Lantaff

TML - OffsetSurface

Posted by Gary Lantaff Nov 27, 2018

The OffsetSurface TML is included in the TBC 5.0 install but I have updated it to include support for adding a clipping boundary while it copies the surface. The clipping boundary is optional. If you download this zip file, make sure you unzip it in the same folder as the macro installed with TBC (C:\ProgramData\Trimble\MacroCommands\Trimble)

Gary Lantaff

TML - FindSurfaceArea

Posted by Gary Lantaff Nov 4, 2018

Macro to find triangles inside area bounded by any surface breakline. The triangle planimetric and slope area are computed. The button "Create Text.." will bring up a dialog box allowing user to create a text label containing the computed areas. If you hold the "shift" key down, the areas are totaled.


Gary Lantaff

TML - VPI at Elevation

Posted by Gary Lantaff Oct 22, 2018

This simple TML will add a vertical PI at the specified elevation. If the linestring has more than one segment that intersects with the defined elevation, a VPI will be created at each intersection.


Gary Lantaff

TML - View Project Data

Posted by Gary Lantaff Oct 22, 2018

This TML is helpful for macro developers to explorer the object model of a TBC project file. The tree view displays every object found (starting at the top level "Project" object). When an object is selected, the bottom area of the window will report every interface defined for that object. You can also see the full "namespace" of each object. In the example shown, you can tell that the arc is defined in the Trimble.Vce.ForeignCad namespace. This is helpful when using the "Object Browser" view in Visual Studio.


Gary Lantaff

TML - 3D points to arc

Posted by Gary Lantaff Oct 22, 2018

This TML will create an arc in the plane defined by three 3D points. Coordinates 1 and 3 define the beginning and end of the arc. This command is useful when used with building scans and you want to create an arc from the scanned locations.


Gary Lantaff

TMLs - Start Here

Posted by Gary Lantaff Oct 17, 2018

TBC now supports command extensions using the python language. The python scripts are scanned when TBC starts and valid macro commands are added to the command list in TBC.


TBC scans for macros (the *.py files) in the folder C:\ProgramData\Trimble\MacroCommands or any folder below that. This makes it convenient to place all the macros from one source (user developed, 3rd parties, Trimble) in separate folders.


Note, the folder C:\ProgramData is typically a hidden folder. You can either turn on the display of hidden items in File Explorer or just enter the folder path in File Explorer. 


Any macros downloaded from the community (or created by the user) can be placed anywhere under the macro folder. You may find it convenient to create a folder named "Community" to store the macros downloaded from here. Another option is to store the macros in a folder named after the macro author. 3rd party developers of macros are likely to store their macros in a named folder location. If you download a compiled macro (extension of *.pydll), you may need to unblock the file (see last field in file properties)



When TBC is installed, a small set of macros is placed in a folder named Trimble in the macro folder. Feel free to open these files with a text editor to see how macro commands are added to TBC. It's best not to add any macros obtained from other sources to this folder.


Whichever method you use, just unzip the downloaded macro into a location under the macro folder and the next time TBC is started, it will find the new macro commands and add them to the command list.


Warning: If you install the same macro in multiple folders (under the macro folder) then you will get an error when TBC starts (see image). Just delete the duplicate macro file to stop this error from occurring again.