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


LaunchSim.htm


# LaunchSim - Computes center location and zoom level from current view
# and launches tntsim with the appropriate parameters.
# Requires tntsim built March 20, 2002 or later 
# 
# The following symbols are predefined 
#    class VIEW View      {use to access the view the script is run from} 

# Declare variables
class POINT2D center;
class POINT2D left;
class POINT2D right;
class POINT2D point;
class Raster rast;
class Georef ref;

# Get georeference info from .sim file
OpenRaster(rast,_context.ScriptDir+"Otoe_Sim2.sim","TERRAIN");
ref = GetLastUsedGeorefObject(rast);

# Calculate center location in map coordinates
center.x = View.Width / 2;
center.y = View.Height / 2;
center = TransPoint2D(center, ViewGetTransViewToScreen(View, 1));
center = TransPoint2D(center, ViewGetTransMapToView(View, ref.Projection, 1));
 
# Calculate extent of view
extent = View.Width * View.PixelSizeMillimeters * View.CurrentMapScale / 1000;

# Launch simulator
run(sprintf("tntsim.exe POI=%.2f,%.2f DOV=0.0,-30.0 FOV=%.2f \"%sOtoe_Sim2.sim\"",
				center.x, center.y, extent, _context.ScriptDir), 0); 
 


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

25 March 2009

page update: 26 May 11