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

TBC Macros and Extensions

19 posts

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.

 

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.