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

TBC Macros and Extensions

23 posts

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.

Peter Kistler

Quickly Reverse Line

Posted by Peter Kistler Oct 22, 2019

Simple command to allow the user to quickly reverse the direction of a Linestring or CAD 3D Polyline without having to go into Edit.

FYI, If you have TBC 5.2 or later you will seeing a "dancing arrow" on the line which indicates the direction of the line.

 

Reverse Line Command UI

  • Select the line to modified.
  • Press OK or click on the line again to reverse the line
Peter Kistler

Corridor Cut Sheet TML

Posted by Peter Kistler Oct 7, 2019

The Corridor Cut Sheet Report is a Rockpile Solutions TML created to provide cross section based reports for corridor models for use by field staff as a way to check and validate highways construction. The report will generate a node list at defined corridor stations; split into Right Side and Left Side nodes ordered from Centerline outwards; and display the information in a compact or fully detailed format.

Corridor Cut Sheet TML screen snap

Command documentation is at https://rockpilesolutions.com/files/Documentation/CorridorCutSheetReport.pdf 

 

If you would like a trial version of the TML, email Peter@RockpileSolutions.com

 

Corridor Cut Sheet can be downloaded, installed, and updated using TMLStatus

The Adjust Linestring Elevation, AdjustLSElevation, TML allows you the modify the elevation of a portion or all of a given linestring. 

After selecting the linestring to be modified, the portion of the linestring to be modified needs to be specified. The available options are:

  • All - The elevation of every node in the linestring will be modified
  • Start to Location 1 - The elevation of every node from the beginning of the linestring to the specified location will be modified.  The details of the about the Locations are below.
  • Location to End - The elevation of every node from the specified location to the end of the linestring will be modified. 
  • Location 1 to Location 2 - The elevation of every node from Location 1 to Location 2 of the linestring will be modified. 

 

Location refers to the distance along a linestring. This is sometimes referred to as the station or chainage value.  When the location is not at either end of the linestring, an extra node is inserted 1 mm before or after the specified location. This is done to avoid vertical segments within the linestring that can lead to issues with modeling and computations.

 

The last set of information to specify is the new Elevation value(s). There are 3 options to choose from:

  • Undefined - The elevation on the specified nodes will be removed.
  • Single Elevation - The elevation on the specified nodes will be set to the given Elevation value.
  • Interpolate - The elevation is interpolated using the 2 given values and computed for every specified node between the specified locations

 

AdjustLSElevation can be downloaded, installed, and updated using TMLStatus.  AdjustLSElevationis a Licensed TML and is included in the CAD Toolbox. If you would like to try this or any Rockpile Solutions TMLs, just send an email to Peter@RockpileSolutions.com asking for a trial or demo license.

Peter Kistler

TML - AffixName

Posted by Peter Kistler Sep 12, 2019

AffixName is a TML written by Rockpile Solutions used to Add and / or Remove a prefix or suffix from the name of selected objects.  Most of the time the name automatically assigned to an object especially during import is insufficient. Having written several importers over the years, it is hard to come up with a generic set of rules to name object intelligently.  The picture below is a good example of generic rules used during import of the utility information contained in a LandXML file.  The problem is how to easy change the name to something that makes a little more sense.  This is where AffixName comes in.

 

Naming issues from importing data

 

AffixName allows you to Remove the beginning and / or end of an object's name and replace it with a prefix and / or suffix that makes more sense to your situation.  You do not have to have both Add and Remove functionality to run the command. You are allowed to just Add or just Remove portions of the object name.  If you do chose to run both Add and Remove simultaneously, the Remove functionality is executed before the Add functionality.

 

AffixName screenshot

 

AffixName can be downloaded, installed, and updated using TMLStatus.  AffixName is a Licensed TML and is included in the CAD Toolbox. If you would like to try this or any Rockpile Solutions TMLs, just send an email to Peter@RockpileSolutions.com asking for a trial or demo license.

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.

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.

 

Name

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 - peter@thekistlers.com (He is based in Colorado, USA)

 

Wyn Sleeman - wyn@sleemanuk.org (He is based in the UK)

 

Fernando Calvo - calvo@calvo-geospatial.com (He is based in Germany)

 

Dorthe Merete Larsen - dml@geoteam.dk (Based in Denmark)

 

Quan Mueller - quan.mueller@revenantsolutions.com (He is based in Colorado, USA)

 

Thanks

 

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.