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

TBC Macros and Extensions

36 posts
Nelson Hays

TML - Invert Color

Posted by Nelson Hays Feb 13, 2020



This simple TML is to invert the color of objects.  It will change the current color property, or the color 'by layer,' to the complementary color.  


The primary use cases are changing light colors of points and lines to darker colors to be used on a white background.  This may include field software, such as SiteWorks and Earthworks, and Drafting on white paper.  





Project example:


This CAD file has mostly light colors.  When sent to the field, many lines are difficult to see in Siteworks in direct sunlight.


Select the light colored objects, and run 'Invert Color.'


Here are the results, exported to SiteWorks:



This command is currently in Beta.  Please email for access.

This simple TML is to re-layer Point objects based on their Feature Code.  Run this command to move selected Points to new or existing layers with the same name as the Feature Code attribute.  


TBC behavior: 

  • Imported points from field software, such as SiteWorks or SCS900, are automatically layered in TBC based on the .FXL (Feature Code Library) file referenced in the .SPJ (Work Order) When an .FXL file is not used, the 'SCS900 Default' .FXL is applied, which sends all points and lines to generic layers based on the object type.  (E.G. SCS_Measure_Point)
  • Points imported as a .CSV all end up on the Points layer.  



The following is a sample of the behavior of the TML - Relayer by Feature Code.  A Work Order shot in SiteWorks was imported into a project.  All points are on the same, default layer.  After running the command, the points are organized by the Feature Codes keyed-in in the field.  



Before, all Points on the same, default Layer



After, organized by Feature Codes



This command is currently in Beta.  Please email for access.


Thank You for the interest.  


Hi All


We are happy to announce that we are throwing our hat into the ring.  Accupoint has engaged with Revenant Solutions to bring a few Macros to the market, beginning with a focus on Field Data Prep and Takeoff workflows.  


We are excited to release our first 3 TMLs shortly. Each will have it's own blog post here on the forum, following Gary Lantaff's standard.  Each release will be in Beta, with a semi-open invitation for testers.  Simply request a temporary license and give it a shot.  


Please feel free to hit me up with any questions, comments or requests on our products.  



Nelson Hays

Greetings from the world of independent TML development!


While many of you have met us at the Power Users Group training events in Colorado or in-between TBC sessions at Dimensions, Revenant Solutions has yet to make itself known on the forums.


We believe that 2020 will be "The Year of the TML", and in that spirit, we'd like to break the ice, introduce ourselves, and get to the business of connecting with TBC users and other TML developers beyond face-to-face events.


So, per last year's potential TML development partner post by Alan Sharp (to be Alan Sharp at Rockpile), we've created a company profile post.


We look forward to getting to know you and your workflow needs, catching up on your posts, making some posts ourselves, and contributing to the online TBC and TML communities.


See you on the forums!


Quan Mueller

Sr. Software Engineer, CEO
Revenant Solutions LLC


(Edit: Fixed text and link formatting.)

Revenant Solutions LLC is an independent software developer based in Westminster, Colorado.


After developing Business Center - Heavy Construction Edition for 12 years, Revenant Solutions was formed in 2018 with the express purpose of providing TML and TBC development services to the TBC Community.  Today we provide two types of services: software development contracting and commercial TMLs.


TML Development Contracting


You hire us to help you develop your TMLs.  We bring the TBC expertise and do the coding, but the code and IP (intellectual property) are yours.  We just help you make it happen.


  • An experienced independent contractor


We have served multiple clients, large and small, locally in Colorado and remotely.  We have template forms for NDAs, contractor agreements, work orders, etc., and are ready to do business "corp-to-corp".


  • Experienced in developing on the TBC software platform


We wrote code in every level of the architecture, taught TBC platform classes to other Trimble developers, and for areas we're not as familiar with, we know where to look and what to look for, and have good relationships with the dev team to figure out what's possible.


  • Experienced with the Rockpile TML service


If you want your TMLs to generate some revenue or control access using the Rockpile licensing system, we can help you - because we use it too.  We were the first independent "provider" added to the service outside Rockpile, and have created processes to get skeleton TMLs up and available on the service quickly.


Revenant TMLs


With the release of the TML subscription service by Rockpile Solutions, Revenant has also started development of its own commercial TMLs, to be made available on the Rockpile service.


Given our background and experience on the BC-HCE team, and our mission to meet the needs of the community using "software in the small", these are some TML areas we are naturally looking at:


  • General usability, workflow, and productivity related features
  • Construction modeling and data flows
  • Workflows related to construction devices (machine control, site controllers, drilling, piling)
  • Community requests


How to get involved


Want to start a TML contracting project?


Email to get the conversation started.


Have a request for the next Revenant TML?


Email to see where it fits in our roadmap.  If your idea is developed, you'll get an invite to the closed Alpha test.


Want to meet up in-person?


Email if you're in the Denver, Colorado area, or catch us at a Power Users Group training event in Colorado or at Dimensions!

This macro will compute the elevation difference between each point in a linestring and the computed elevation of a specified corridor. The elevation differences are used to create a polyline in the profile view of the corridors alignment. A vertical offset can be applied.


This macro is handy when doing pavement resurfacing. The computed lines would then show the difference between the surveyed location and the design elevation at each station. From there you can then easily see in the profile view where you have to make vertical adjustments. After adjusting the template or the vertical alignment, then delete the old computed lines and run the TML again.


Gary Lantaff

TML - Explode Lines

Posted by Gary Lantaff Jan 14, 2020

This macro will explode the selected lines into individual segments. Each segment can be converted into a new line or only break into new lines whenever the deflection angle between segments exceeds specified angle.


There is also an option to relayer the new linework based on where the exploded segment was in the original line. This option only applies if the original line was closed.


This is ideal for breaking up CAD and PDF cross-section data in preparation for conversion into 3D lines, which saves hours of painstaking work and makes selecting data easier and faster in the 3D View.


Gary Lantaff

TML - Increment Text

Posted by Gary Lantaff Jan 14, 2020
Use this macro for many things, including labeling cross-sections imported from PDF where the text in the PDF is absent (replaced with polylines that look like text, but are not text). Often PDF files have text drawn as polylines, rendering the text useless for station labels and grid labels (for offsets and elevations).

The TML allows you to specify the text style, layer, text height, etc. and then specify a start value and an increment (like
station 0 with an increment of 100), and then rapidly click all of the section zero offset line end points to place station text on the cross-sections which can then be used to convert them into stored cross-sections or 3D lines. The "Template Text" defines how the text is computed. Using just "{}" will convert the compute value to a string without any decimal precision. If you want to include more precision, specify the number of decimals inside the "{}" text. For example, "{2}" would format the computed value with 2 decimal places.
If you want the computed value to be formatted as a station, use "{s}" for the "Template Text". Any extra text in the "Template Text" will just be included in the result. For example, in the attached image, the "Template Text" included the "Sta " text.

This macro is kind of like simple feature coding. It creates lines by joining selected points where the feature code name is the same. The points are sorted by station from a reference alignment. If the station difference between points is larger than the "Max segment length", then a new line will be started (leaving a "gap").



This macro will move selected points so that they fall exactly on even stations (if the move distance is less than the specified station tolerance).

There is also an option to move selected points to a specified station (as long as current computed station is withen the "station tolerance" of specified station).


This can be handy if you import points that are expected to be at the same station but due to roundoff (or survey measurement accuracy), the stations are a bit "off". If you then use those points in a surface, the computed cross-section may contain extra nodes due to the way triangles are computed.


Gary Lantaff

TML - TrackLineEdge

Posted by Gary Lantaff Jan 14, 2020

This macro can be used to connect the outside edges of linework (as computed from the selected reference alignment). Each node in every selected line has its station and offset computed. The min and max offset values at each computed station is then used to create a linestring connecting the edges.


This is usually used to connect 3D cross-section linework in order to produce surface models.   


This macro is helpful in cases where you have lots of points to key in based on their station and offset values.  The station and elevation support the "Auto-Advance" option. If "Auto-Advance" set on the station field, when user presses the "Apply" button (usually by pressing "Enter"), then the focus returns to the offset control. 


Use TmlStatus to download the latest version of the macro.


The macro does have one option. By default, the macro creates normal points (same as using the CreatePoint command). If the "Create Dependent Points" checkbox is checked, then points that remember their station and offset values are created. In this case, updates to the alignment used to create the points would cause the points location to be updated.


Gary Lantaff

TML - Voice Commands

Posted by Gary Lantaff Dec 2, 2019

If you want to play around using your voice to execute TBC commands, just run TMlStatus and download the macro VoiceCommand. The macro is being provided "as-is" (but it's fun to play with)


It's actually a simple macro that loads every TBC command into the default speech engine of windows. I tested it using Windows 10 but it should work with older versions. The default voice input device is used and there are no voice settings defined in the macro.


When the speech engine hears a "match", it calls a method in the macro and the macro starts that command. 


Four other "commands" are added to the command list.

1) "OK" will cause the default accept button to be "pressed"

2) "Cancel" will cause the default cancel button to be "pressed". This is true even when the button label says something else (like "Done" or "Close")

3) "Tab" will cause the focus to move to the next control.

4) "Shift Tab" will cause the focus to move to the previous control.


The macro only looks for TBC commands. It can not be used to fill in the data for any control  (so you can't say "12.5" and expect the number to be filled in)


When the command starts up, you should see a small window that defines the command options.

The slider can be used to specify how close to a match the voice command needs to be in order to execute the command. The default is 0.80 (80 percent). Only matches higher than this tolerance will be executed.


If you want to disable the voice recognition but leave the command running, you can uncheck the "Enable voice commands"  checkbox. 


If the "AutoStart" checkbox is "checked", then the macro will start when TBC starts.


If you speak a command the speech engine doesn't recognize, then you will see;

               "Rejected: [<cmd>]" in the commands window.

If you speak a command the engine matches to one of the commands in TBC, then the window shows the name of the command and the match confidence. If the confidence is greater than the match tolerance defined using the slider, then the command will be executed.


Some commands are not enabled all the time. If you speak the name of a command that is not enabled, the command is ignored.


Have fun....

The macro ComputeLotSetback (available using TmlStatus) will compute a lot setback line using user specified setback distances. 

First, define the setback offsets for each part of the lot (front, back, left, right). There is another side setback offset used in the special case where the frontage is tangent to one of the sides (usually corner lot). Once the lot setbacks have been defined, you can hide this section by collapsing this group. Just click on the ^ icon.


There are two options to select the lot boundary. If the lot boundary is already defined as a closed lines, then you can just pick it.  Otherwise, use the "Select lot boundary lines" option to select all the bounding lines and then pick inside the  lot. The lot boundary will then be computed. 



Following two images show the results of using the macro. Image on left is before computing the setback lines. Image on right shows the computed setback lines in white. Each time you pick a lot, the setback line is computed.


The nearest lines on the lot boundary is assumed to be the frontage line so it's important to pick near the frontage.



The macro can optionally also compute a "lot pad" placed at the setback distance.


First check the "Draw Pad" option and define the pad size.

If the "Auto" option is selected, the pad is computed and placed when the lot setback line was computed. 


In this case, where along the frontage line you pick effects the pad location. If you pick near the left end of the frontage line, the pad will be aligned with the direction of the left line in the lot (first image below). If you pick near the right end of the frontage line, the pad will be aligned with the direction of the right line (last image below). If you pick in the center section of the frontage line, the pad will be aligned with the average direction of the side lines. (center image below)

If the "Auto" option not used, then you can define the direction of the pad and slide the computed pad along the computed offset distance.

Peter Kistler

Nudge Line

Posted by Peter Kistler Oct 22, 2019

The Nudge Line TML allows you to quickly move / offset an existing line.  This is useful for resolving vertical surfaces. For example importing curb and gutter lines will typically be exactly on top of one another. Creating a surface from these lines will generate flagged surface due to the vertical surface.  Nudge will allow you to ever so slightly move / offset a line resolving the vertical issues.


The TML does not just do a simple move on the existing line. A simple move would not work for curved line segments. The offset line is computed internally (vertical data is not modified). The offset coordinates and curve information are applied to the original line. 


Nudge Command UI

  • Select the line to be modified
  • Select which direction (right or left) to move the line.  If you have TBC 5.2 or later you will see a "dancing arrow" to indicate the direction of the line.  (Run the Show Direction TML to specify settings for the dancing arrow)
  • Set the amount to move / offset (Nudge) the line
  • Press "Apply" to nudge the line.  You can press Apply multiple times if you want to increase the offset.


NOTE. This is intended for very small adjustments of the line. Some assumptions are made internally that may not be valid if the line is nudges numerous time or by a large amount.