home products news downloads documentation support gallery online maps resellers search
TNTmips Downloads Menu

HOME

CONTACT US

CURRENT RELEASE
  TNT 2013

DEVELOPMENT VERSION
  TNT 2014

TNTmips Pro
PRIOR RELEASES
  TNT 2012

FREE SOFTWARE
  TNTmips Free
  TNTatlas
  TNTsdk

MORE DOWNLOADS
  HASP Key Driver
  Screen Recorder
  TNT Language Kits
  Sample Geodata
  TNT Scripts

DOCUMENTATION
  TNTmips Tutorials
  Tutorial Datasets
  Technical Guides
  Scripts
  Quick Guides

MORE INFO
  Download FAQs
  FTP
  Download Managers
  Find Reseller

SITE MAP


Tool Scripts and Macros

Add Customized Features to TNT Display Windows

Go to main SCRIPTING page...

Tool scripts and macro scripts:

  • are executed from an icon button on a View window toolbar or from a menu;
  • can access features of the current view, such as layers, extents, projection, selected elements, zoom factor, scale, and styles;
  • can operate on objects in the current view or objects containing the same area;
  • can add a newly-created layer to the view;
  • can start an external program and provide it with data derived from the current view.

A tool script invokes a drawing tool and/or a dialog window that allow the user to interact with the spatial data in the view window. For example, the user could outline an area or select particular elements to be processed. 

A macro script does not allow such graphical interaction, but can be set up with a drop-down menu that provides program options.

Go to 1-page index of over 200 scripts ...

Several sample scripts have been prepared and are made available to illustrate scripting techniques and give you models to copy and adapt for your own needs.  You can work from existing scripts, or create new scripts by using the helpful Tool Script Templates or Macro Script Setup feature.

Sample Tool Scripts


Allows user to draw a polygon and then shows the raster statistics for the defined area. The statistics can be saved to a text file. In this revised version of regstats.sml, the save procedure automatically opens the saved text file in the associated external software program. 

Download regstats2.sml.

A Soil Info tool script provides a polygon tool to outline an area of interest in a vector soil map with a standard SSURGO soil database. The script determines the soil types within the area and creates a CSV file that lists the soil types, their cumulative areas, soil name, and soil kind. The CSV file is then opened in the software program with which it is registered on the user's computer.

Download Soil_Info.sml.

A Flight Planing script provides an interactive automated procedure for laying out (over a reference image) a pattern of parallel, equallyspaced flight lines for aerial operations. The script provides graphic tools for outlining the area of operations and for indicating the flight line direction. The script then creates a parallel set of flight lines that completely cover the target area (and a surrounding buffer zone). You can save the flight lines, area boundary, and buffer zone as vector or CAD objects and export the flight lines to a GPS Exchange (GPX) file.

Download FlightPlan.sml.
A Zoom-In  script implements custom zoom-in capability for the Nebraska Land Viewer Atlas (2nd Edition). The zoom-in action varies depending on how far the user has already zoomed. From the initial view, a left-click zooms to the extent of the enclosing county. Subsequent left-clicks zoom in by 4X each. Once the display scale falls below 1:25,000, a left click zooms to maximum detail in the 1-meter orthoimage layer. Download NEzoom.sml
The Strike/Dip script computes geological strike/dip values for strata from an accurate DEM and overlaid aerial or satellite image. The tool allows you to place three non-collinear points on each planar feature, creates vector points with attached strike and dip values, and styles the points using an embedded CartoScript that is automatically saved with the vector object for later use. The script can automatically adjust for DEMs georeferenced to different coordinate reference systems, including geographic (latitude/longitude) coordinates.

Download StrikeDipTool76.sml

Written for TNT v2010

A Layer Select script lets you draw a selection rectangle in the view to toggle off the display of a number of tiled layers in a complex group.  Download LayerSelectTool.sml
A PropFinder script creates a dialog to conduct property searches by address and by property owner for the Lincoln property database associated with the sample Lincoln Property Viewer TNTatlas .. Download PropFinder.sml
A U-Test script shows how to access environmental data in a sample project that studies the distribution of malaria-bearing mosquito species. Download utest.sml
A Infrastructure Graphical Profile script creates a visualization of selected elements and their attributes. Download LineProfile.sml
A PipeProfile CAD script shows how to draw into a CAD object with a Tool Script Download PipeProfileCAD.sml
A GPS Import script gets data from at text file and displays it.. Download GPS_Macroscript.sml
A Pop-In View Script demonstrates how to extract a circular area from a source vector to show as tool result in View. Draws circle in MaskVector to use as extraction boundary; extracted vector is added to group as a layer. Download PopInViewTool.sml
A Parcel Tool Script demonstrates how SML can access program actions and dialogs created in Visual Basic and includes the use of ActiveX callbacks. Download ParcelToolModal.sml
ParcelToolModeless.sml
The Flow Path Tool Script draws a flow path, buffer zone, and upstream basis based on the user-selected seed point on an elevation raster.  XML version shows XML implementation. Download flowpath.sml

Download flowpathXML.sml

ViewMarks lets you Mark a view of interest and return to that view from any scale or position by selecting it from the list of viewpoints you build up. Download vptool.sml
The Run Browser script shows how to launch an external application (a web browser) and pass it startup parameters (a particular web site). Download urls.sml
Find Streets locates and highlights streets according to a street name entered from the keyboard, recentering the view on the selected street. Download street.sml
The Area Statistics script lets you draw a polygon and then shows you the raster statistics for the defined area. Download regstats.sml
The Region Statistics tool script demonstrates how you can design a custom tool to visually select polygons and convert them to a temporary region to define the area for action on another coregistered layer. Download regstatp.sml
The Fragstat Region tool script lets the user draw a region with a region tool on an integer raster and then runs the fragstat module on the selected region. Download fragstatp.sml

The Fixed Colors script provides an example that can be used and modified to assign colors to cell values in an 8-bit raster in a quantitative fashion.

Download compar.sml

 

The Point Selection script illustrates how to set up a tool script that lets the user interactively select elements from a vector object in the View window. In this case the script selects the closest point element when the left mouse button is pressed.

Download pointsel.sml

 

The Raster Profile tool script provides a line tool that records and plots a profile of the raster cell values along a line drawn by the user.

Download rastprof.sml

Sample Macro Scripts


The Print Separation macro produces color  separations (TIFF files) for printing image layers.  The image layers in the layout must be grayscale; overlays are restricted to specified colors. Download printsep.sml
  The Snapshot macro makes a quick snapshot image of the current view in JPG, PNG, BMP, GIF, TIF, or PCX format. Download snapshot.sml
The Zoom to Scale Macro Script offers a drop-down menu of pre-defined zoom scales. Download zoomto.sml

25 March 2009  

page update: 29 Oct 12


Back Home ©MicroImages, Inc. 2013 Published in the United States of America
11th Floor - Sharp Tower, 206 South 13th Street, Lincoln NE 68508-2010   USA
Business & Sales: (402)477-9554  Support: (402)477-9562  Fax: (402)477-9559
Business info@microimages.com  Support support@microimages.com  Web webmaster@microimages.com