Link Examples

 

 

 

Examples of simple links using the Run command:

 

This example links to a photograph stored on the user's local C: drive:

oRun c:\ThinkGIS\myhouse.jpg

This example links to a drawing file stored on the user's local C: drive. Based on the file extension, Windows decides which program on the computer to use to display the document:

oRun c:\windows\desktop\floorplan.dwg

This example launches an application with a command line parameter. It also uses the %mapdir% variable to specify that the file name is stored in the same location as the map file:

oRun c:\PaintShopPro\psp.exe %mapdir%\RearEntrance.gif

This example uses field names as variables so that the actual command line that gets executed is based on the values in these fields. The values are taken from the current Feature displayed in the Feature Form. The actual file that this links to could be named "f:\ThinkGIS\HarrisonCo\photos\123_n_main st.jpg" for example:

oRun "%mapdir%\photos\<house>_<dir>_<street>.jpg"

In the following example, a deep link can be made into a web site to retrieve information about a specific county on this layer. StateID and CountyID are field names in the map layer that get replaced with their respective values when the link is executed:

oRun "http://www.naco.org/counties/counties/county.cfm?id=<StateID><CountyID>"

 

Example of more detailed links:

When a more sophisticated interface is needed, users can use any combination of Think GIS commands. See the Command Line Interface topic for a complete list of commands and examples of how to use them. Here is one example which displays a message box, then writes information about the current Feature out to a file, then launches Microsoft Access (if not already running) and makes a DDE call to it.

 

Popup "You are about to link to the Bridge Database. Click OK to continue"

CreateFile c:\mapselection.txt

WriteFile Layer=Bridges

WriteFile ID=<Bridge Number>

CloseFile

CallDDE msaccess,bridges.mdb,Macro1,%mapdir%\bridges.mdb

 

 

 

Copyright © 2024 WTH Technology