/3.1 (Extension.1 Name: "MassGIS Data Viewer Utilities" Dependencies: "$AVBIN/avdlog.dll\n" FirstRootClassName: "AVIcon" Roots: 2 Roots: 3 Roots: 4 Roots: 5 Roots: 6 Roots: 7 Roots: 8 Roots: 9 Roots: 10 Roots: 11 Roots: 12 Roots: 13 Roots: 14 Roots: 15 Roots: 16 Roots: 17 Roots: 18 Roots: 19 Roots: 20 Roots: 21 Roots: 22 Roots: 23 Roots: 24 Roots: 25 Roots: 26 Roots: 27 Roots: 28 Roots: 29 Roots: 30 Roots: 31 Roots: 32 Roots: 33 Roots: 34 Roots: 35 Roots: 36 Roots: 37 Roots: 38 Roots: 39 Roots: 40 Roots: 41 Roots: 42 Roots: 43 Roots: 44 Roots: 45 Roots: 46 Roots: 47 Roots: 48 Roots: 49 Roots: 50 Roots: 51 Roots: 52 Roots: 53 Roots: 54 Roots: 55 Roots: 56 Roots: 57 Roots: 58 Roots: 59 Roots: 60 Roots: 61 Roots: 62 Roots: 63 Roots: 64 Roots: 65 Roots: 66 Roots: 67 Roots: 68 Roots: 69 Roots: 70 Roots: 71 Roots: 72 Roots: 73 Roots: 74 Roots: 75 Roots: 76 Roots: 77 Roots: 78 Roots: 79 Roots: 80 Roots: 81 Roots: 82 Roots: 83 Roots: 84 Roots: 85 Roots: 86 Roots: 87 Roots: 88 Roots: 89 Roots: 90 Roots: 91 Roots: 92 Roots: 93 Roots: 94 Roots: 95 Roots: 96 Roots: 97 Roots: 98 Roots: 99 Roots: 100 Roots: 101 Roots: 102 Roots: 103 Roots: 104 Roots: 105 Roots: 106 Roots: 107 Roots: 108 Roots: 109 Roots: 110 Roots: 111 Roots: 112 Roots: 113 Roots: 114 Roots: 115 Roots: 116 Roots: 117 Roots: 118 Roots: 119 Roots: 120 Roots: 121 Roots: 122 Roots: 123 Roots: 124 Roots: 125 Roots: 126 Roots: 127 Roots: 128 Roots: 129 Roots: 130 Roots: 131 Roots: 132 Roots: 133 Roots: 134 Roots: 135 Roots: 136 Roots: 137 Roots: 138 Roots: 139 Roots: 140 Roots: 141 Roots: 142 Roots: 143 Roots: 144 Roots: 145 Roots: 146 Roots: 147 Roots: 148 Roots: 149 Roots: 150 Roots: 151 Roots: 152 Roots: 153 Roots: 154 Roots: 155 Roots: 156 Roots: 157 Roots: 158 Roots: 159 Roots: 160 Roots: 161 Roots: 162 Roots: 163 Roots: 164 Roots: 165 Roots: 166 Roots: 167 Roots: 168 Roots: 169 Roots: 170 Roots: 171 Roots: 172 Roots: 173 Roots: 174 Roots: 175 Roots: 176 Roots: 177 Roots: 178 Roots: 179 Roots: 180 Roots: 181 Roots: 182 Roots: 183 Roots: 184 Roots: 185 Roots: 186 Roots: 187 Roots: 188 Roots: 189 Roots: 190 Roots: 191 Roots: 192 Roots: 193 Roots: 194 Roots: 195 Roots: 196 Roots: 197 Roots: 198 Roots: 199 Roots: 200 Roots: 201 Roots: 202 Roots: 203 Roots: 204 Roots: 205 Roots: 206 Roots: 207 Roots: 208 Roots: 209 Roots: 210 Roots: 211 Roots: 212 Roots: 213 Roots: 214 Roots: 215 Roots: 216 Roots: 217 Roots: 218 Roots: 219 Roots: 220 Roots: 221 Roots: 222 Roots: 223 Version: 31 About: "MassGIS Data Viewer Utilities (12/13/1999 10:12 AM)\nv. 1 (BN 1380)\nApplied Geographics Inc.\n100 Franklin St. Fl 7, Boston, MA 02110\n617-292-7125 Fax 617-292-7911 http://www.appgeo.com" CanUnloadScript: 28 InstallScript: 4 UninstallScript: 7 ProjectSaveScript: 6 ExtVersion: 1380 ) (AVIcon.2 Name: "2dtheme.bmp" Data: 4e442049 6d616765 00010014 00110000 Data: 01540f0f 0f0f0f0f 0f0f0f0f 0f0f0f0f Data: 0f0f0f0f 0f0f0f0f 0f0f1212 12121212 Data: 12121212 12121212 120f0f0f 0f121212 Data: 12121212 12121212 12121212 0f0f0f0f Data: 12121010 10101010 10101010 10101010 Data: 100f0f0f 12121010 10101010 10101010 Data: 10101010 0f0f0f12 12101010 10101010 Data: 10101010 1010100f 0f0f0f0f 0f101010 Data: 10101010 11101010 1010100f 0f0f0f0f Data: 10101010 10101000 00111010 10100f0f Data: 0f0f0f0f 10101010 10100000 00001110 Data: 100f0f0f 0f0f0f0f 0f0f0f0f 0f000000 Data: 00000011 0f0f0f0f 0f0f0f0f 0f0f0f0f Data: 00000000 00000000 110f0f0f 0f0f0f0f Data: 0f0f0f0f 0f0f0000 0000110f 0f0f0f0f Data: 0f0f0f0f 0f0f0f0f 0f0f0000 0000110f Data: 0f0f0f0f 0f0f0f0f 0f0f0f0f 0f0f0000 Data: 0000110f 0f0f0f0f 0f0f0f0f 0f0f0f0f Data: 0f0f0000 0000110f 0f0f0f0f 0f0f0f0f Data: 0f0f0f0f 0f0f0000 0000110f 0f0f0f0f Data: 0f0f0f0f 0f0f0f0f 0f0f0f0f 0f0f0f0f Data: 0f0f0f0f 0f0f0000 04000000 00008080 Data: 80000000 80000080 80000080 00008080 Data: 00008000 00008000 80004080 80004040 Data: 0000ff80 00008040 0000ff00 40000040 Data: 8000ffff ff00c0c0 c0000000 ff0000ff Data: ff0000ff 0000ffff 0000ff00 0000ff00 Data: ff0080ff ff0080ff 0000ffff 8000ff80 Data: 80008000 ff004080 ff000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000002 00080007 Data: 00200001 00020000 00000000 0000 ) (AVIcon.3 Name: "2dextent.bmp" Data: 4e442049 6d616765 00010014 00110000 Data: 01540f0f 0f0f0f0f 0f0f0f0f 0f0f0f0f Data: 0f0f0f0f 0f0f0000 00000000 00000000 Data: 00000000 00000000 00000012 12121212 Data: 12121212 12121212 12121212 12000f00 Data: 12121212 12121212 12121212 12121212 Data: 000f0f0f 00121212 10101010 10101010 Data: 12121200 0f0f0f0f 0f001212 12101010 Data: 10101012 1212000f 0f0f0f0f 0f0f0012 Data: 12121010 10101212 12000f0f 0f0f0f0f Data: 0f0f0f00 12121212 12121212 000f0f0f Data: 0f0f0f0f 0f0f0f0f 00000000 00000000 Data: 0f0f0f0f 0f0f0f11 11111111 11110f0f Data: 0f0f0f11 11111111 11110f00 00000000 Data: 00110f0f 0f0f0f00 00000000 00110f0f Data: 00000000 00110f0f 0f0f0f00 00000000 Data: 110f0f0f 11000000 00110f0f 0f0f0f00 Data: 00000011 0f0f0f11 00000000 00110f0f Data: 0f0f0f00 00000000 110f1100 00000f00 Data: 00110f0f 0f0f0f00 000f0000 00110000 Data: 000f0f0f 000f0f0f 0f0f0f00 0f0f0f00 Data: 00000f00 0f0f0f0f 0f0f0f0f 0f0f0f0f Data: 0f0f0f0f 000f0000 04000000 00008080 Data: 80000000 80000080 80000080 00008080 Data: 00008000 00008000 80004080 80004040 Data: 0000ff80 00008040 0000ff00 40000040 Data: 8000ffff ff00c0c0 c0000000 ff0000ff Data: ff0000ff 0000ffff 0000ff00 0000ff00 Data: ff0080ff ff0080ff 0000ffff 8000ff80 Data: 80008000 ff004080 ff000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000000 00000000 Data: 00000000 00000000 00000002 00080007 Data: 00200001 00020000 00000000 0000 ) (Script.4 Name: "* AGI/LIB (MassGIS) Extension Install" SourceCode: "' Name: * AGI/LIB (MassGIS) Extension Install\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Apr 03 17:17:39 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This is the install script for the AGI-LIB.AVX AGI\n' Code Library. It is executed when the extensions\n' loads. It sets up the AGI Tools Menu, Creates\n' a AGILayout GUI and AGITable GUI and initializes\n' the AV variables.\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Apr 03 17:17:39 1998\n'------------------------------------------------------------------------\n \n if (Av.GetProject = nil) then\n Return nil\n end\n \n Self.GetPreferences.Set(\"Script Prefix List\",{\"AGI/LIB (MassGIS)\",\"AGI/TMT\",\"AGI/EMT\"})\n Self.GetPreferences.Set(\"AGI Development Version\",\"1.0\")\n Self.GetPreferences.Set(\"Extension Open Script\",\"AGI/TMT StartTool\")\n Self.GetPreferences.Set(\"AGI Development Version Help\",\"MassGIS Data Viewer Utilities \"+\n \"Extent, Theme, Join/Links and Field Parameters.\")\n Self.GetPreferences.Set(\"Extension Make Script\",\"* AGI/LIB (MassGIS) Extension Make\")\n Self.GetPreferences.Set(\"Extension GUIName\",\"AGI/LIB (MassGIS)\")\n Self.GetPreferences.Set(\"GUI Control Names\",{\"TMT3-1\",\"EMT3-1\"})\n Self.GetPreferences.Set(\"DialogList\",{\"ThemeID Menu\",\n \"Path Menu\",\n \"AddDataMenu\",\n \"General Settings Menu\",\n \"Template Manager Menu\",\n \"Theme(MassGIS) Menu\",\n \"Theme(MassGIS) Settings Menu\",\n \"ThemeHelp Menu\",\n \"ThemeID(MassGIS) Menu\",\n \"AddDataMenu(MassGIS)\",\n \"AliasesEditMenu(MassGIS)\",\n \"AliasesMenu(MassGIS)\",\n \"Join(MassGIS) Menu\",\n \"Extent(v3) Menu\",\n \"ExtentBuilder(v3) Menu\",\n \"Extent(v3) Settings Menu\",\n \"SaveExtent Menu\"}) \n \n Av.Run(\"AGI/LIB (MassGIS) Dialog.KillDialogs\",Self)\n Av.Run(\"AGI/LIB (MassGIS) ToolsMenu.Update\",\"\")\n \n Av.Run(\"AGI/LIB (MassGIS) GUI.AddControls\",{View,Button,Self,0,\"T\",\"TMT3-1\",\"AGI/TMT (MassGIS) StartTool\",\n \"2D Theme Tool (MassGIS)//This tool allows the user to work\"+\n \" with existing Themes.\",\"AGI/TMT (MassGIS) Theme.DialogUpdate\"}) \n \n Av.Run(\"AGI/LIB (MassGIS) GUI.AddControls\",{View,Button,Self,1,\"E\",\"EMT3-1\",\"AGI/EMT (MassGIS) StartTool\",\n \"2D Extent Tool (MassGIS)//This tool allows the user to \"+\n \"work with existing extents .\",\"AGI/EMT (MassGIS) Extent.DialogUpdate\"})\n \n _GlobalErrorMessageNumber = 1\n _ProjectDctError = false\n _AdminEditPassword = \"ddddd\"\n _CurrentThemeID = 0\n \n Av.PurgeObjects\n" ) (Script.5 Name: "* AGI/LIB (MassGIS) Extension Make" SourceCode: "' Name: * AGI/LIB (MassGIS) Extension Make\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Apr 03 17:18:54 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This is the Make script for the AGI CodeLibrary.\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Apr 03 17:18:54 1998\n'--------------------------------------------------------------------------\n \n ExtensionInstallScript = \"* AGI/LIB (MassGIS) Extension Install\"\n ExtensionFileName = \"agi-MassGIS.avx\"\n ExtensionTitle = \"MassGIS Data Viewer Utilities\"\n ExtensionUninstallScript = \"* AGI/LIB (MassGIS) Extension UnInstall\"\n DependenciesList = {\"$AVBIN/avdlog.dll\".AsFileName}\n ScriptPrefixList = {\"AGI/LIB (MassGIS)\",\"AGI/TMT\",\"AGI/EMT\"} \n ExtensionSaveScript = \"* AGI/LIB (MassGIS) Extension Save\"\n ExtensionCanUnloadScript = \"AGI/LIB (MassGIS) Extension.CanUnloadScript\"\n ExtensionLoadScript = \"\"\n ExtensionUnloadScript = \"\"\n IconList = {\"2 DTheme.bmp\",\"2DExtent.bmp\"}\n ExtensionVersionNumber = 1.0\n \n ExtensionParameterList = {ExtensionInstallScript,\n ExtensionFileName,\n ExtensionTitle,\n ExtensionUninstallScript,\n DependenciesList,\n ScriptPrefixList,\n ExtensionSaveScript,\n ExtensionCanUnloadScript,\n Exte nsionLoadScript,\n ExtensionUnloadScript,\n IconList,\n ExtensionVersionNumber,\n Self} \n \n Av.Run(\"AGI/LIB (MassGIS) Extension.Build\",ExtensionParameterList)" ) (Script.6 Name: "* AGI/LIB (MassGIS) Extension Save" SourceCode: "' Name:* AGI/LIB (MassGIS) Extension Save\n' Headline:\n' Called By:\n' Calls To: AGI/LIB (MassGIS) Dialog.KillDialogs\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:12:53 1999\n'\n' Requires: None\n'\n' Returns: None\n'\n' Comments: This script is called by the current extension. It calls the\n' Code Library script that removes any Dialogs from the project\n' before the project is saved and the dialogs can become embeded.\n' This means that any menus that are open when you save, will be \n' closed and removed. It will not effect any of the current data.\n' This is a fix to a bug that occurrs to project files when dialog\n' files are saved into a project.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:12:53 1999\n'------------------------------------------------------------------------\n\n Av.Run(\"AGI/LIB (MassGIS) Dialog.KillDialogs\",nil)" ) (Script.7 Name: "* AGI/LIB (MassGIS) Extension UnInstall" SourceCode: "' Name: * AGI/LIB (MassGIS) Extension UnInstall\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Apr 03 17:18:54 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This is the Uninstall script for the AGI Code\n' Library. If the project is closing then the\n' script does not do anything. If the project is\n' not closing and the extension has been sent\n' the unload command then the following occurrs. 1) Removes\n' the Projec t MenuBar Developement Choice. 2) Removes the\n' Project MenuBar Tool Choice. 3) Removes the AGITable GUI\n' and any included tables. 4) Removes the AGILayout\n' GUI and any of its layouts.\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Apr 03 17:18:54 1998\n'------------------------------------------------------------------------\n\n For each theGUI in Av.GetProject.GetGUIs\n aMenuBar = Av.Getproject.FindGUI(theGUI.AsString).GetMenuBar\n if (aMenuBar.Findb yLabel(\"MassGIS\") <> Nil) then\n aMenuBar.Remove(aMenuBar.FindbyLabel(\"MassGIS\"))\n end\n end\n \n\n if (Av.GetProject <> nil) then\n \n if (Av.GetProject.IsClosing.not) then \n Av.Run(\"AGI/LIB (MassGIS) Extension UnloadExtension\",Self)\n end\n else \n Av.Run(\"AGI/LIB (MassGIS) Extension UnloadExtension\",Self)\n end\n \n " ) (Script.8 Name: "AGI/LIB (MassGIS) Add/Remove Extension Scripts" SourceCode: "' Name: AGI/LIB (MassGIS) Add/Remove Extension Scripts\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Apr 03 17:31:52 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: \n' This script is called from the \"AGI Tools Menu,\n' View Tool Scripts\". It allows the user to\n' choose from a list of loaded extensions and then\n' add all relavent scripts to the current project.\n' A new SED GUI is created, and the new\n' scripts are added with this GUI as their\n' default. This give all scripts access to the SED\n' search, replace, and document tools. Then the user\n' wants to remove the scripts (ie after they have\n' made changes to the extension scripts and rebuild\n' the extensions AVX file), all scripts are removed from\n' the new GUI and the GUI is removed\n' from the project.\n'\n' Copyright© Applied Geographics In c. Boston,MA. Fri Apr 03 17:31:52 1998\n'------------------------------------------------------------------------\n\n ByPassSecurity = System.IsShiftKeyDown.Not\n \n if (Av.GetProject = nil) then\n Return nil\n end\n \n if (Av.GetProject.GetObjecttag.is(Dictionary).not) then\n Av.GetProject.SetObjecttag(Dictionary.Make(100))\n end\n \n'-------------------------------------------------------------------------\n\n if ((self = Nil) or (Self.is(Choice))) then\n \n ActionList = {\"Add Exte nsion(s) Scripts\",\n \"Remove all Scripts\",\n \"Add individual Script\"}\n \n St1 = \"Choose the type of action you want to perform.\"\n St2 = \"Add/Remove Tool Scripts\"\n ScriptAction = Msgbox.Choiceasstring(actionList,St1,St2)\n \n if (ScriptAction = Nil) then \n Return Nil \n end\n \n ExtensionName = Nil\n \n else \n if (Self.is(list)) then\n ScriptAction = self.get(0)\n ExtensionNam e = self.get(1)\n else\n SelfString = Self.Getlabel.contains(\"View Tool &Scripts\")\n if (SelfString or Self.is(Choice)) then\n ScriptAction = \"Add\"\n end\n end\n end\n \n ScriptAction = ScriptAction.AsString.LCase\n \n'----------------------------------------------------------------------------------\n' The Following code provides the User with the ability\n' to quickly clean up the project and remove system scripts\n' from the current workspace.\n\n\n if (ScriptAct ion.contains(\"remove all scripts\")) then\n \n ' Get a list of Extension if the ExtensionName Variable is not set.\n \n if (ExtensionName = Nil) then\n \n St1 = \"Remove Scripts from Project\"\n St2 = \"Which extension scripts do you want to remove.\"\n \n ExtensionName = Msgbox.ChoiceAsString(Extension.GetExtensions.ReturnKeys,St1,St2)\n ExtensionName = Extension.Getextensions.Get(ExtensionName.AsString)\n \n if (ExtensionName.is(Extens ion).not) then \n Return Nil\n end\n end\n \n RawName = ExtensionName.getfilename.getbasename\n RawString= RawName.Ucase.asstring.substitute(\".AVX\",\"\")\n RawString = RawString.Substitute(\"-\",\"/\")\n\n Av.Run(\"AGI/LIB (MassGIS) Add/Remove SED GUI\",{\"remove\",Rawstring}) \n end\n \n '------------------------------------------------------------------------------------\n if (ScriptAction.contains(\"add extension(s) scripts\")) then\n \n theExistingPassWord = Av.Ge tProject.GetObjecttag.Get(\"Extension Script Password\")\n \n if (theExistingPassWord.AsString = \"admin\") then\n ByPassSecurity = false\n end\n \n if (ByPassSecurity) then\n if ((Msgbox.Password = \"admin\").not) then\n Return nil\n end\n \n Av.GetProject.GetObjecttag.Set(\"Extension Script Password\",\"admin\")\n \n end\n \n'---------------------------------------------------------------\n' Allow the User to choose from the list of extensions \n' that are currently loaded.\n\n ExtList = {}\n st1 = \"Extension Scripts...\"\n st2 = \"Which extension script do you want to access?\"\n \n For each anExtension in Extension.GetExtensions.ReturnKeys\n theExtension = Extension.GetExtensions.Get(anExtension)\n \n ScriptPrefixList = theExtension.GetPreferences.Get(\"Script Prefix List\")\n if (ScriptPrefixList.is(List)) then\n ExtList.Add(anExtension)\n end\n end\n \n ExtensionList = Msgbox.MultiListAsString(E xtlist,st2,st1)\n if (ExtensionList = Nil) then \n Return Nil \n end\n\n'---------------------------------------------------------------\n' Loop through each extension choosen \n\nFor each anExtensionName in ExtensionList\n\n theext = Extension.GetExtensions.Get(anExtensionName)\n if (theext = Nil) then \n Return(nil) \n end\n \n ScriptPrefixList = theExt.GetPreferences.Get(\"Script Prefix List\")\n ScriptGUIName = theExt.GetPreferences.Get(\"Extension GUIName\")\n \n if (ScriptGUIName .is(String).Not) then\n ScriptGUIName = theExt.GetFileName.GetBaseName.Ucase.AsString.Substitute(\".AVX\",\"\")\n ScriptGUIName = ScriptGUIName.Substitute(\"-\",\"/\")\n end\n \n if (Av.Getproject.FindGUI(ScriptGUIName.AsString) = Nil) then\n Av.Run(\"AGI/LIB (MassGIS) Add/Remove SED GUI\",{\"add\",ScriptGUIName,theExt})\n end\n \n '--------------------------------------------------------------\n \n if (ScriptPrefixList = nil) then\n ScriptPrefixList = {RawString.As String}\n else\n if (ScriptPrefixList.is(List)) then\n ScriptPrefixList.Add(ScriptGUIName.AsString)\n else\n ScriptPrefixList = {ScriptGUIName.AsString}\n end\n end\n \n ScriptPrefixList.RemoveDuplicates\n \n '--------------------------------------------------------------\n \n Av.ShowMsg(\"Adding scripts to current project. Please wait!\")\n \n ExtensionScriptsList = Extension.GetScripts.ReturnKeys\n ExtensionScripts List.Sort(false)\n ScriptNameList = {}\n \n For each NewSEDname in ExtensionScriptsList\n For each ScriptPrefix in ScriptPrefixList\n if (NewSEDName.asstring.lcase.contains(ScriptPrefix)) then\n ScriptNameList.Add(NewSEDName.AsString)\n end\n end\n end\n \n Inc = 1\n for each ScriptName in ScriptNameList\n \n theDoc = Av.GetProject.FindDoc(ScriptName)\n if (theDoc <> Nil) then\n Av.GetProj ect.RemoveDoc(theDoc)\n end\n \n NewSED = Sed.MakeWithGUI (ScriptGUIName)\n NewSED.SetName(ScriptName)\n NewSED.GetWin.Resize(1,1)\n NewSED.GetWin.Moveto(0,0)\n NewSED.GetWin.Open\n NewSED.Insert(Extension.GetScripts.get(ScriptName).asstring)\n NewSED.Compile\n NewSED.GetWin.Close\n NewSED.GetWin.Resize(500,500)\n \n progress = (Inc/Sc riptNameList.Count) * 100 \n\n ProgressString = Inc.AsString+\" of \"+ScriptNamelist.Count.AsString+\" (\"+Progress.Truncate.AsString+\"%)\"\n Av.ShowMsg(ProgressString+\" Regenerating script: \"+ScriptName.asstring)\n Inc = Inc + 1\n end\n \n Av.ClearStatus \n end\n Av.ShowMsg(\"Done adding scripts.\")\n end\n \n'-------------------------------------------------------------------------------\n' The following if then Routine is designed to allow the User to add individ ual\n' scripts to the current project. You can choose more then one script. Also if \n' the script already exists in the project, then the old script will be renames\n' and the new script will be added with the current name.\n \n if (ScriptAction.contains(\"add individual script\")) then\n \n theScripts = Extension.GetScripts\n TheScriptsList = TheScripts.Returnkeys\n TheScriptsList.sort(true)\n \n Str1 = \"Select the Scripts you want to extract from Extension Space and\"+\n \" to the current project.\"\n NewScriptList = Msgbox.MultiListasstring(TheScriptsList,Str1,\"Extension Scripts...\")\n if (NewScriptList = Nil) then Return Nil end\n \n ' Loop through each Script selected by the User\n For each aScript in NewScriptList\n \n if (Av.GetProject.FindDoc(aScript) <> nil) then\n Av.GetProject.FindDoc(aScript).SetName(aScript++\"New\")\n end\n \n NewSED = Sed.Make\n NewSED.SetName(aScript)\n NewSED.Ge tWin.Resize(600,500)\n NewSED.GetWin.Moveto(0,0)\n NewSED.GetWin.Open\n \n NewSED.Insert(Extension.GetScripts.get(aScript).asstring)\n NewSED.Compile\n end\n \n end\n" ) (Script.9 Name: "AGI/LIB (MassGIS) Add/Remove SED GUI" SourceCode: "' Name: AGI/LIB (MassGIS) Add/Remove SED GUI\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Apr 03 17:31:52 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n' This script adds or removes an SED GUI. Example:\n' AGI/LIB (MassGIS). When the GUI is created the Open\n' and New Scripts are set so that all new\n' scripts are created with the correct prefix string\n' included in the title. The open script makes the\n' script open right of the the current project.\n' Input is al ist of two elements. 1) Action\n' (add/remove) 2) GUI Name (string)\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Apr 03 17:31:52 1998\n'------------------------------------------------------------------------\n\n if (Av.GetProject = nil) then\n Return nil\n end\n\n if (Self = Nil) then \n Return Nil \n end\n\n Action = Self.get(0)\n GUIName = Self.get(1)\n theExtension = nil\n \n if ( Self.Count > 2) then\n theExtension = Self.Get(2)\n end\n\n if ((Action = Nil) or (GUIName = Nil)) then \n Return Nil\n end\n \n if (Action.lcase.contains(\"add\")) then\n \n if (Extension.GetScripts.Get(\"AGI/DEV SED.Generate Avenue Class Dictionary\") <> nil) then\n Av.Run(\"AGI/DEV SED.Generate Avenue Class Dictionary\",\"\")\n end\n \n ' Make Icon Dictionary\n IconDict = Av.Run(\"AGI/LIB (MassGIS) Icon Dictionary\",\"\")\n \n ' Get The Script GUI and Chec k for the current\n ' SED Script GUI\n CloneGUI = Av.Getproject.FindGUI(\"Script\")\n NewSEDGUI = Av.GetProject.FindGUI(GUIName.asstring)\n \n if (CloneGUI = Nil) then\n Msgbox.Warning(\"Unable to find a SED GUI\",\"Notice\")\n Return Nil\n end\n \n if (NewSEDGUI <> Nil) then \n Return Nil\n end\n \n NewSEDGUI = CloneGUI.clone\n NewSEDGUI.SetName (GUIName.asstring)\n NewSEDGUI.SetTitle (GUIname.as string)\n NewSEDGUI.SetVisible (true)\n NewSEDGUI.SetIcon (IconDict.get(\"Bex\"))\n NewSEDGUI.SetNewScript (\"AGI/LIB (MassGIS) SEd.CreateScriptWithHeader\")\n \n ' Add the New SED GUI to the Project\n Av.getproject.addgui(NewSEDGUI)\n \n ' Load a temp local dictionary with icon values\n IconDict = Av.Run(\"AGI/LIB (MassGIS) Icon Dictionary\",\"\")\n \n '-------------------------------------------------------------------------------------\n \n\n\n \n Tb = Button.Make\n ExtensionMakeScriptName = \"* \"+GUIName.AsString.Trim+\" Extension Make\" \n Tb.SetClick (ExtensionMakeScriptName)\n Tb.Sethelp (\"Local Rebuild//This option allows you to rebuild the \"+\n theExtension.AsString+\" for Local use.\")\n Tb.SetName (\"Rebuild Extension1\")\n Tb.SetTag (\"\")\n \n theIcon = Icondict.get(\"Index\")\n if (theIcon.is(Icon)) then\n Tb.SetIcon (theIcon)\n end \n \n if (Av.FindScript(ExtensionMakeScriptName.AsString) <> nil) then\n Tb.SetObjecttag(theExtension.AsString)\n end \n \n '-------------------------------------------------------------------------------------\n \n Av.GetProject.FindGUI(GUIName.asstring).gettoolbar.Add(tb,2) \n '-------------------------------------------------------------------------------------\n \n Av.GetProject.FindGUI(GUIName.asstring).gettoolbar.Add(Space.make,1 )\n \n '-------------------------------------------------------------------------------------\n\n Tb = Button.Make\n Tb.SetClick (\"AGI/LIB (MassGIS) SED.CoreRoutines\")\n Tb.SetHelp (\"Search Project//Searches the Project for a given string\")\n Tb.SetName (\"Find in Project\")\n Av.GetProject.FindGUI(GUIName.asstring).gettoolbar.Add(tb,2) \n \n theIcon = Icondict.get(\"F\")\n if (theIcon.is(Icon)) then\n Tb.SetIcon (theIcon)\n end\n \n '-------------------------------------------------------------------------------------\n \n Av.GetProject.FindGUI(GUIName.asstring).gettoolbar.Add(Space.make,5)\n \n '-------------------------------------------------------------------------------------\n \n Tb = Button.make\n Tb.SetClick (\"AGI/LIB (MassGIS) SED.CoreRoutines\")\n Tb.sethelp (\"Add Docs to Script//Adds docs to current script.\")\n Tb.Setname (\"Add Documentation\")\n Av.GetPro ject.FindGUI(GUIName.asstring).gettoolbar.Add(tb,6)\n \n theIcon = Icondict.get(\"D\")\n if (theIcon.is(Icon)) then\n Tb.SetIcon (theIcon)\n end\n \n '--------------------------------------------------------------------------------------\n Tb = Space.make\n Av.GetProject.FindGUI(GUIName.asstring).gettoolbar.Add(tb,7)\n \n \n '------------------------------------------\n ' Move Current GUI to the top of the list\n '--------------------------------- ---------\n CurrentGUI = av.getproject.findgui(GuiName.asstring)\n Av.GetProject.GetGUIS.shuffle(CurrentGUI,0)\n Av.Getproject.Update\n end\n \n'--------------------------------------------------------------------------\nif (Action.lcase.contains(\"remove\")) then\n \n RemoveGUI = Av.GetProject.FindGUI(GUIName.asstring)\n if (RemoveGUI = Nil) then Return Nil end\n \n Clist = Av.GetProject.GetdocsWithGUI(RemoveGUI)\n Clistcount = Clist.count\n \n if (Clistcount > 0) then\n For Each Dog in Clist.clone\n Av.GetProject.RemoveDoc(Dog)\n end\n end\n \n Av.GetProject.RemoveGUI(RemoveGUI.asstring)\n end\n" ) (Script.10 Name: "AGI/LIB (MassGIS) Create ReadMe" SourceCode: "' Name:AGI/LIB (MassGIS) Create ReadMe\n' Headline:\n' Called By:\n' Calls To: AGI/LIB (MassGIS) Create Script Dictionary\n'\n' Author: Stephan Smith\n' Date: Wed Aug 04 10:35:09 1999\n'\n' Requires: None\n'\n' Returns: None\n'\n' Comments: This script is designed to allow the user (developer) to \n' create a ReadME file for the scripts in the project. It \n' creates a script dictionary and generates a commented SED.\n' Each SED in the project is documented allong with the the\n' sc ripts it calls or references was well as the programmer\n' comments.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Aug 04 10:35:09 1999\n'------------------------------------------------------------------------\n\n Str1 = \"Do you want to rebuild the Script Reference Dictionary?\"\n Str2 = \"Option Step...\"\n if (Msgbox.YesNo(Str1,Str2,true)) then\n Av.Run(\"AGI/LIB (MassGIS) Create Script Dictionary\",\"\")\n end\n \n AGIGUI = Av.GetProject.FindGUI(\"AGI/LIB (MassGIS)\")\n ProjectScrip ts = Av.GetProject.GetDocswithGUI(AGIGUI)\n ProjectScripts = ProjectScripts.Clone\n ProjectScripts.Sort(true)\n \n'------------------------------------------------------------------------\n\n SEDReport = SED.Make\n SEDReport.GetWin.Open\n SEDReport.GetWin.MoveTO(0,0)\n SEDReport.GetWin.Resize(700,300)\n \n Inc = 0\n \n if (_ScriptDict.is(Dictionary).Not) then\n Msgbox.Info(\"Unable to find a Script Dictionary...\",\"\")\n Return Nil\n end\n \n For each theDoc in ProjectScripts\n \n SEDRepor t.Insert(\"' \"+theDoc.AsString+nl)\n \n CallList = _ScriptDict.Get(theDoc.AsString)\n \n if (Calllist.is(List)) then\n if (CallList.Count > 0) then\n SEDReport.Insert(\"' \"+nl+\"' Calls or Uses:\"+nl)\n \n For each aCallScript in CallList\n SEDReport.Insert(\"' \"+aCallScript.AsString+nl)\n end\n \n SEDReport.Insert(\"' \"+nl)\n end\n end\n \n if (theDoc.i s(SED)) then\n theDoc.GetWin.Open\n \n theDoc.SetInsertPos(0)\n theDoc.Search(\"' Comment\")\n theVal1 = theDoc.ReturnInsertPos \n theDoc.Search(\"' Copyright©\")\n theVal2 = theDoc.ReturnInsertPos\n \n theString = theDoc.GetScript.AsString\n theStr = theString.Middle(theVal1+2,((theVal2 - theVal1) - 12))\n theStr = theStr.Substitute(\"'\",\"\")\n \n StrList = theStr.AsString.Trim.AsList\n \n if (StrList.Count > 0) then\n SEDReport.Insert(\"' Comments:\"+nl)\n Int = 0\n Spacer = \"' \"\n HString = \"\"\n For each aStr in StrList.Clone\n SEDReport.Insert(Spacer+aStr.AsString.Trim+\" \")\n HString = aStr+\" \"+HString\n Spacer = \"\"\n Int = Int + 1\n \n if ((Int = 20) or (HString.Count > 65)) then\n SEDReport.Insert(\" \"+n l)\n Int = 0\n Spacer = \"' \"\n HString = \"\"\n end\n end\n \n SEDReport.Insert(\"' \"+nl+\"' \"+nl)\n end\n \n theDoc.GetWin.Close\n end\n \n Inc = Inc + 1\n \n end\n" ) (Script.11 Name: "AGI/LIB (MassGIS) Create Script Dictionary" SourceCode: "' Name:AGI/LIB (MassGIS) Create Script Dictionary\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Aug 04 10:37:01 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Aug 04 10:37:01 1999\n'------------------------------------------------------------------------\n\n ScriptGUIs = Av.GetProject.GetGUIs\n \n Clist = {}\n For each dog in ScriptGUIs\n if (dog.gettype = \"SED\") then\n Clist.add(dog.asstring)\n end\n end\n \n if (Clist.count = 0 ) then Return Nil end\n \n st1 = \"Choose the Script GUIs to include in the Script Dictionaries.\"\n st2 = \"Current Script GUIs\"\n slist = Msgbox.MultiListasString(Clist,st1,st2)\n \n if (slist = Nil) then Return Nil end\n \n Doclist = {}\n For each dog in Slist\n sGUI = Av.GetProject.FindGUI(dog)\n nlist = Av.GetProject.GetDocsWithGUI(sGUI)\n Doclist = nlist+Doclist\n end\n \n\ntheDocs = Doclist\n_ScriptDict = Dictionary.Make(100)\n\n'------ ------------------------------------------------ \nFor each CheckDoc in theDocs.Clone\n CheckName = CheckDoc.asstring\n if (CheckDoc.Is(SEd).Not) then break end\n isDocOpen = CheckDoc.GetWin.IsOpen\n if (isDocOpen.Not) then\n CheckDoc.GetWin.Resize(500,500)\n CheckDoc.getwin.moveto(1,1)\n CheckDoc.GetWin.Open\n end\n '----------------------------------------------\n For each Check in theDocs.Clone\n SearchStr = Check.asst ring\n CheckDoc.SetInsertPos(0)\n found = CheckDoc.Search(SearchStr) \n if ((Found) and (CheckName <> SearchStr)) then\n if (_ScriptDict.get(CheckName) = Nil) then\n _ScriptDict.add(CheckName,{SearchStr})\n else\n _ScriptDict.set(CheckName,_ScriptDict.get(CheckName).add(SearchStr))\n end \n end \n end\n '-------------------------------------------------------\n if (isDocOpen.No t) then\n CheckDoc.GetWin.Close\n end\nend\n\nFor each dog in _ScriptDict.ReturnKeys\n tt = _ScriptDict.get(Dog)\n if (tt.is(list)) then tt.Removeduplicates end\nend\n'----------------------------\ntheDocs = av.GetProject.GetDocs\n_ScriptDict1 = Dictionary.Make(thedocs.count)\n\n'------------------------------------------------------ \nFor each CheckDoc in theDocs.Clone\n if (Checkdoc.is(SED)) then\n StandardIn = \"\"\n StandardOut = \"\"\n ScriptAbout = \" \"\n ScriptChars = {StandardIn,StandardOut,Scr iptAbout}\n _ScriptDict1.add(CheckDoc,ScriptChars)\n end\nend\n\nMsgbox.INfo(\"Script Dictionaries Built.\",\"\")\n\n'----------------------------------------------------------------\n" ) (Script.12 Name: "AGI/LIB (MassGIS) DataLocations.StartUp" SourceCode: "' Name: AGI/LIB (MassGIS) DataLocations.StartUp\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Tue Oct 20 10:40:01 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Tue Oct 20 10:40:01 1998\n'------------------------------------------------------------------------\n\n theAVEXT = System.GetEnvVar(\"AVEXT\")\n \n theFile = FileName.Merge(theAVEXT.AsString,\"DataPaths.ini\")\n \n if (File.Exists(theFile).not) then\n theList = {}\n else\n lf = LineFile.Make(theFile,#FILE_PERM_READ)\n theList = List.Make \n lf.Read( theList, lf.GetSize )\n lf.Close\n \n theList.RemoveDuplicates\n end\n \n Av.GetProject.GetObjecttag.Set(\"SearchPaths\",theList.Clone)\n Av.GetProject.GetObjecttag.Set(\"UseProjectOnly\",false)" ) (Script.13 Name: "AGI/LIB (MassGIS) Dialog.ApplyLabelButton.Click" SourceCode: "' Name:AGI/LIB (MassGIS) Dialog.ApplyLabelButton.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:13:36 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:13:36 1999\n'------------------------------------------------------------------------\n\n aListBox = Self.GetDialog.FindbyName(\"GraphicsListBox\")\n \n theSelection = aListBox.GetSelection\n \n if (theSelection.Count = 0) then\n Msgbox.Info(\"There are not selected graphics...\",\"\")\n Return Nil\n end\n \n GraphicDictionary = alistBox.GetObjecttag\n if (GraphicDictionary.is(Dictionary).Not) then\n Msgbox.Warning(\"Unable to find the GraphicDictionary.\",\"Stopping...\")\n Return Nil\n end\n \n'------------------------------------------------------------------------\n\n theSourceGraphic = Self.GetDialog.GetObjecttag\n if (theSourceGraphic.is(Graphic).not) then\n Return nil\n end\n \n theSourceDct = theSourceGraphic.GetObjectta g\n \n if (theSourceDct.is(Dictionary).Not) then\n Msgbox.Warning(\"Unable to find the Graphic's Embedded Dictionary.\",\"Stopping...\")\n Return Nil\n end\n \n'------------------------------------------------------------------------\n YesToAll = false\n \n For each aValue in theSelection\n \n theTargetGraphic = GraphicDictionary.Get(aValue)\n \n if (theTargetGraphic = nil) then\n Msgbox.Warning(\"Unable to find the Graphic \"+AValue.AsString,\"\")\n Continue\n end\n \n if (YesTOAll.Not) then\n \n Str1 = \"Do you want to update the parameters of this graphic?\"\n Str2 = AValue.AsString\n \n theStatus = MsgBox.AllYesNo (Str1, Str2, true)\n \n if (theStatus = nil) then\n theStatus = true\n YesToAll = true\n end\n \n if (theStatus.Not) then\n Continue\n end\n end\n \n theTargetGraphic.SetObjecttag(theSourceDct.Clon e) \n end\n \n Av.Run(\"AGI/LUT AGILayout.Modified\",SELF) \n " ) (Script.14 Name: "AGI/LIB (MassGIS) Dialog.ApplyLabelButton.Update" SourceCode: "' Name:AGI/LIB (MassGIS) Dialog.ApplyLabelButton.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:13:50 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:13:50 1999\n'------------------------------------------------------------------------\n\n Self.SetEnabled(Self.GetDialog.FindbyName(\"GraphicsListBox\").GetSelection.Count > 0)" ) (Script.15 Name: "AGI/LIB (MassGIS) Dialog.CloseLabelButton" SourceCode: "' Name:AGI/LIB (MassGIS) Dialog.CloseLabelButton\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:13:59 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:13:59 1999\n'------------------------------------------------------------------------\n\n Self.GetDialog.Close\n \n Av.GetProject.RemoveDialog(Self.AsString)" ) (Script.16 Name: "AGI/LIB (MassGIS) Dialog.DialogClose" SourceCode: "' Name:AGI/LIB (MassGIS) Dialog.DialogClose\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:14:07 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:14:07 1999\n'------------------------------------------------------------------------\n\n Av.GetProject.RemoveDialog(Self.AsString)" ) (Script.17 Name: "AGI/LIB (MassGIS) Dialog.KillDialogs" SourceCode: "' Name:AGI/LIB (MassGIS) Dialog.KillDialogs\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Mar 03 14:40:37 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Mar 03 14:40:37 1999\n'------------------------------------------------------------------------\n\n if (Av.GetProject = nil) then\n Return nil\n end\n \n if (Self.Is(String)) then\n KillAllDialogs = false\n else\n KillAllDialogs = true\n end\n \n i f (KillAllDialogs) then\n \n if (Self.is(Extension)) then\n DialogList = Self.GetPreferences.Get(\"DialogList\")\n \n if (DialogList.is(List).not) then\n DialogList = (Av.GetProject.GetDialogs.Clone).Returnkeys\n end\n else\n DialogList = {}\n For each anExtension in Extension.GetExtensions.ReturnKeys\n theExt = Extension.GetExtensions.Get(anExtension)\n \n thePrefs = nil\n if (theExt.is(Ext ension)) then\n thePrefs = theExt.GetPreferences\n end\n \n if (thePrefs.is(Dictionary)) then\n ExtDialogList = theExt.GetPreferences.Get(\"DialogList\")\n \n if (ExtDialogList.is(List)) then\n DialogList = ExtDialogList + DialogList\n end\n end \n end\n end\n \n if (DialogList.Count > 0) then\n \n For each aDialog in DialogList\n \n theDialogDoc = Av.GetProject.FindDialog(aDialog.AsString)\n \n if (theDialogDoc <> nil) then\n if (theDialogDoc.IsOpen) then\n theDialogDoc.Close\n end\n end \n \n Av.GetProject.RemoveDialog(aDialog)\n end\n end\n else\n theDialog = Self.AsString\n \n theDialogDoc = Av.GetProject.FindDialog(theDialog)\n \n i f (theDialogDoc <> nil) then\n if (theDialogDoc.isOpen) then\n theDialogDoc.Close\n end\n \n Av.GetProject.RemoveDialog(theDialogDoc.AsString)\n end \n end\n \n" ) (Script.18 Name: "AGI/LIB (MassGIS) Dialog.MovetoCenterOfScreen" SourceCode: "' Name:AGI/LIB (MassGIS) Dialog.MovetoCenterOfScree\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Jan 22 15:55:29 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Jan 22 15:55:29 1999\n'------------------------------------------------------------------------\n\n theDialog = SELF\n \n if (theDialog.is(Dialog).not) then\n Return nil\n end\n \n theOpeningMenuBox = TheDialog.ReturnExtent\n theX = (Av.ReturnExtent.GetX / 2) - (theOpeningMenuBox.GetWidth / 2)\n theY = (Av.ReturnExtent.GetY / 2) - (theOpeningMenuBox.GetHeight / 2)\n TheDialog.Moveto(theX,theY)\n \nReturn nil" ) (Script.19 Name: "AGI/LIB (MassGIS) Dialog.PositionDialog" SourceCode: "' Name:AGI/LIB (MassGIS) Dialog.PositionDialog\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Aug 21 14:38:39 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Aug 21 14:38:39 1998\n'------------------------------------------------------------------------\n\n if (Av.GetProject = nil) then\n Return nil\n end\n\n OpeningMenu = Self\n \n if (OpeningMenu.is(Dialog).not) then Return nil end\n \n \n if ((OpeningMenu.AsString = \" Cartographic Menu\") and (OpeningMenu.isOpen.Not)) then\n theOpeningMenuBox = OpeningMenu.ReturnExtent\n theX = (Av.ReturnExtent.GetX / 2) - (theOpeningMenuBox.GetWidth / 2)\n theY = (Av.ReturnExtent.GetY / 2) - (theOpeningMenuBox.GetHeight / 2)\n OpeningMenu.Moveto(theX,theY)\n end\n \n if (OpeningMenu.isOpen) then \n OpeningMenu.Activate\n Return nil \n end\n \n'------------------------------------------------------------------------------------\n\n DialogList = {\"Theme Menu\",\n \"Extent Menu\",\n \"3DTheme Menu\",\n \"3DExtent Menu\",\n \"3DCrossSection Menu\",\n \"ODB Menu\",\n \"MapType Menu\",\n \"Cartographic Menu\"}\n \n For each FindDialog in DialogList\n \n if (FindDialog <> OpeningMenu.Asstring) then\n PositionMenu = Av.GetProject.FindDialog(FindDialog)\n if (PositionMenu <> nil) then\n if (PositionMenu.IsOpen) then \n ' PositionMenu.Activate\n If (OpeningMenu.ReturnExtent.Intersects(PositionMenu.ReturnExtent)) then\n OpeningMenu.Moveto(PositionMenu.ReturnExtent.Getleft,PositionMenu.ReturnExtent.GetBOTTOM)\n OpeningMenu.Move(20,25)\n end\n end\n end\n end\n end\n \nOpeningMenu.Open\n" ) (Script.20 Name: "AGI/LIB (MassGIS) Dictionary.GetUniqueName New" SourceCode: "' Name:AGI/LIB (MassGIS) Dictionary.GetUniqueName\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Sun Jan 10 15:05:04 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Sun Jan 10 15:05:04 1999\n'------------------------------------------------------------------------\n\n theDictionary = Self.Get(0)\n the1Key = Self.Get(1)\n the2Key = Self.Get(2)\n\n if (theDictionary.Get(the1Key+the2Key) <> nil) then\n\n Inc = 1\n \n the2KeyTmp = the2Key.Clone\n \n if (the2KeyTmp.AsString.Contains(\".shp\")) then\n the2Keytmp = the2Keytmp.Substitute(\".shp\",\"\")\n end\n \n KeyNum = \"\"\n \n For each anum in 0..(the2Key.Count - 1)\n if ((the2Keytmp.Middle(anum,1).isNumber) or (the2Keytmp.Middle(anum,1) = \".\")) then\n KeyNum = KeyNum + the2Keytmp.Middle(anum,1)\n end\n end\n \n if (KeyNum.isNumber) then\n if (KeyNum.AsNumber < 1) then\n the2K ey = the2Key.Substitute(KeyNum,\"\")\n KeyNum = KeyNum.Substitute(\".\",\"\")\n else\n the2Key = the2Key.Substitute(KeyNum,\"\")\n end\n \n Inc = KeyNum.AsNumber\n end\n \n InitialMen2 = the2Key.Clone\n the2Key = ((the2Key.AsString).trim)+\".\"+Inc.SetFormat(\"d\").AsString\n \n While (theDictionary.Get(the1Key+the2Key) <> nil)\n the2Key = (InitialMen2.trim)+\".\"+Inc.SetFormat (\"d\").AsString\n Inc = Inc + 1\n end \n \n end\n \n \nReturn (the2Key)" ) (Script.21 Name: "AGI/LIB (MassGIS) Extension InstallExtension" SourceCode: "' Name:AGI/LIB (MassGIS) Extension InstallExtension\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:14:39 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This an Secondary Extension Install script that \n' adds the icons in an new extension to the current\n' projects iconmanager.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Jan 15 10:35:51 1999\n'------------------------------------------------------------------------\n\n theExtension = SELF\n \n if (theExtension.is(Extension).Not) then\n Return nil\n end\n \n \n if (theExtension.Count > 0) then\n \n For each anExtObjectNum in 0..(theExtension.Count - 1)\n \n anExtObject = theExtension.Get(anExtObjectNum)\n \n if (anExtObject.is(Icon)) then\n IconMgr.AddIcons ({anExtObject.Clone})\n end\n \n end\n end\n \n \n" ) (Script.22 Name: "AGI/LIB (MassGIS) Extension Save" SourceCode: "' Name:AGI/LIB (MassGIS) Extension Save\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Mar 03 14:41:51 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Mar 03 14:41:51 1999\n'------------------------------------------------------------------------\n\n Av.Run(\"AGI/LIB (MassGIS) Dialog.KillDialogs\",nil)" ) (Script.23 Name: "AGI/LIB (MassGIS) Extension UnloadExtension" SourceCode: "' Name:AGI/LIB (MassGIS) Extension UnloadExtension\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:14:59 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:14:59 1999\n'------------------------------------------------------------------------\n \n if (Av.GetProject = nil) then\n Return nil\n end\n\n thePrefs = Self.GetPreferences\n \n if (thePrefs.Get(\"GUI Control Names\").is(List)) then\n Av.Run(\"AGI/LIB (M assGIS) GUI.RemoveControls\",thePrefs.Get(\"GUI Control Names\")) \n end\n \n'--------------------------------------------------------------------------\n\n if (thePrefs.Get(\"Extra Tools Script\").is(String)) then\n \n ScriptName = thePrefs.Get(\"Extra Tools Script\")\n \n if (Extension.GetScripts.Get(ScriptName) <> nil) then\n Av.Run(ScriptName,\"remove\") \n end\n end\n\n Av.Run(\"AGI/LIB (MassGIS) Dialog.KillDialogs\",Self)\n\n'------------------------------------------------------------------- --------\n\n if (thePrefs.Get(\"Extension GUIName\").is(String)) then\n\n aGUIName = thePrefs.Get(\"Extension GUIName\")\n RemoveGUI = Av.GetProject.FindGUI(aGUIName.asString)\n \n if (RemoveGUI <> Nil) then \n \n ' Gets a list of all the docs with the AGI/LIB (MassGIS) gui.\n Clist = Av.GetProject.GetdocsWithGUI(RemoveGUI)\n \n ' if the number of docs in the Clist is greater then \n ' 0, run a loop that removes all the docs from the project.\n \n i f (Clist.count > 0 ) then\n For Each Dog in Clist\n Av.GetProject.RemoveDoc(Dog) ' Removes the docs from the project.\n end\n end\n \n ' Now that all the SED Docs are removed from the project\n ' remove the GUI itself from the project.\n Av.GetProject.RemoveGUI(RemoveGUI.asstring)\n end\n end\n \n Av.PurgeObjects\n Dialog.DetachFromExtension(Self)\n Av.PurgeObjects\n\n ' If the current extension is the Code Library, then\n ' remove the Tool Menu option from all GUI Interfaces.\n \n if (Self.AsString.Lcase = (\"AGI Code Library (MassGIS)\")) then\n \n For each aGUI in Av.GetProject.GetGUIs\n aMenuBar = aGUI.GetMenuBar\n \n if (aMenuBar.is(MenuBar)) then\n if (aGUI.GetMenuBar.Findbylabel(\"MassGIS\") <> nil) then\n aGUI.GetMenuBar.Remove(aGUI.GetMenuBar.FindbyLabel(\"MassGIS\"))\n end\n end\n end\n \n thePrj = Av.GetProject.GetObj ecttag\n \n if (thePrj.is(Dictionary)) then\n thePrj.Remove(\"AGI/LIB (MassGIS)\")\n end\n \n end\n \n Av.ShowMsg(Self.AsString+\" Uninstalled.\")" ) (Script.24 Name: "AGI/LIB (MassGIS) Extension.AddIcons" SourceCode: "' Name: AGI/LIB (MassGIS) Extension.AddIcons\n' Headline: Adds Icons to a new extension.\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Apr 03 17:31:52 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This script adds a list of icons to the new extension.\n' It allows the user to add icons which they have created\n' to customize their extension.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Apr 03 17:31:52 1998\n'---------------------------------------------------- --------------------\n\n if (Av.GetProject = nil) then\n Return nil\n end\n \n CheckList = {Extension,List}\n LabelList = {\"Extension Object\",\"Icon List\",\"Nothing...\"}\n StrOffSet = String.MakeBuffer (16) \n \n if ((Av.Run(\"AGI/LIB (MassGIS) Verify Input\", {SELF,CheckList,LabelList,Script.the.getname})).not) then \n Return nil\n end\n \n'--------------------------------------------------------------------------------\n\n theExtension = Self.Get(0)\n IconList = Self.get(1)\n \n if (IconList.is(List).not) then\n Return Nil\n end\n \n if (IconList.count = 0) then\n Return nil\n end\n \n n = Av.Run(\"AGI/LIB (MassGIS) Icon Dictionary\",\"\")\n \n if (n.is(NameDictionary).Not) then\n Return nil\n end\n \n NumIcons = 0\n For each addIcon in IconList\n \n theIconDoc = n.get(AddIcon)\n \n if (theIconDoc.is(Icon).Not) then\n Msgbox.info(\"Unable to add the \"+AddIcon.AsString+\" icon to this extension. I can not\"+\n \" find the sou rce icon in the current project.\",\"Missing Project Icon\")\n else\n TheExtension.Add(theIconDoc.Clone)\n NumIcons = NumIcons + 1\n end\n end \n" ) (Script.25 Name: "AGI/LIB (MassGIS) Extension.AddScripts" SourceCode: "' Name: AGI/LIB (MassGIS) Extension.AddScripts\n' Headline: Adds scripts to a new Extension\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Apr 03 17:31:52 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This script is called by all Extension Make script.\n' It adds all the scripts from the current\n' project that contains a given prefix to the new\n' extensions. Input is a list of two objects.\n' 0) The first object is the new Exte nsion object\n' 1) the second is a list of all\n' script prefixes that should be \n' added to the extensions.\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Apr 03 17:31:52 1998\n'------------------------------------------------------------------------\n\n if (Av.GetProject = nil) then\n Return nil\n end\n \n' Check the Status of Incoming Data\n CheckList = {Extension,List}\n LabelList = {\"Extension Odject\",\"Script Prefix List\"}\n Str OffSet = String.MakeBuffer (16)\n \n if ((Av.Run(\"AGI/LIB (MassGIS) Verify Input\", {SELF,CheckList,LabelList,Script.the.getname})).not) then\n Return nil\n end\n\n'--------------------------------------------------------------------------\n\n TheExt = Self.Get(0)\n PrefixList = Self.Get(1)\n ScriptName = \"AGI/LIB (MassGIS) Add Scripts to Extension\"\n \n if (TheExt.is(Extension).Not) then \n St1 = \"First parameters is not an Extension Object.\"\n St2 = ScriptName\n Msgbox.Info(St1,St2)\n Exit\n end\n\n if (PrefixList.is(List).Not) then\n St1 = \"Second parameters is not a list Object.\"\n St2 = ScriptName\n Msgbox.Info(St1,St2)\n Exit \n end\n \n'----------------------------------------------------------------\n' Make a list of all scripts in the project with a given Prefix\n\n final_list = {}\n UnCompiledList = {}\n \n For Each PrefixString in PrefixList\n \n For each doc_name in av.GetProject.GetDocs\n if (doc_name.AsString.Contains(PrefixString)) then\n aSED = Av.GetProject.FindDoc(doc_name.AsString)\n final_list = final_list.add(aSed)\n \n if (aSED.isCompiled.Not) then\n UNCompiledList.Add(aSED)\n end\n end\n end\n \n end\n\n if (UnCompiledList.Count > 0 ) then\n Str1 = \"Please note that \"+UnCompiledList.Count.AsString+\" uncompiled script(s) were found.\"\n Str2 = \"UnCompiled Script...\"\n Msgbox.ListAsString(UnCompiledList,Str1,Str2)\n end\n \n'---- -------------------------------------------------------------\n' add all the scripts needed for ext from the list\n\n NumScripts = 0\n For each Doc_Name in Final_List\n \n theEXT.Add (av.GetProject.FindScript(Doc_Name.AsString))\n NumScripts = NumScripts + 1\n \n end" ) (Script.26 Name: "AGI/LIB (MassGIS) Extension.AddVersion" SourceCode: "' Name: AGI/LIB (MassGIS) Extension.AddVersion\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Apr 03 17:31:52 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n' This script adds version and about information to the\n' current extension object. Input is a list of\n' the Extension Object (ext) and the name of the\n' new extension (string). This script automatically increments the\n' current extension version number by one so that the\n' new extension has a higher version number. Version\n' number is also stored in the about string\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Apr 03 17:31:52 1998\n'------------------------------------------------------------------------\n\n ControlKeyDown = System.IsShiftKeyDown\n \n if (Av.GetProject = nil) then\n Return nil\n end\n \n CheckList = {Extension,String,Number}\n LabelList = {\"Extension Odject\",\"Extension Title\",\"Extension Version Number\",\"Nothing...\"}\n StrOffSet = String.MakeBuffer (16)\n \n if ((Av.Run(\"AGI/LIB (MassGIS) Verify Input\", {SELF,CheckList,LabelList,Script.the.getname})).not) then\n Return nil\n end\n\n'--------------------------------------------------------------------------\n\n TheExt = Self.Get(0)\n ExtName = Self.Get(1)\n ScriptName = \"AGI/LIB (MassGIS) Add Version to Extension\"\n ExtensionVersionNumber = Self.Get(2)\n \n if (TheExt.is(Extensio n).Not) then \n St1 = \"First parameters is not an Extension Object.\"\n St2 = ScriptName\n Msgbox.Info(St1,St2)\n Exit\n end\n \n if (ExtName.is(String).Not) then\n St1 = \"Second parameters is not an String Object.\"\n St2 = ScriptName\n Msgbox.Info(St1,St2)\n Exit \n end\n\n VersionNumber = ExtensionVersionNumber.AsString.AsNumber\n\n BuildNumber = 0\n CoreExtension = Extension.GetExtensions.Get(theExt.AsString)\n \n if (CoreExtension.is(Extension)) then\n \n theCoreVersion = CoreExtension.GetExtVersion + 1\n \n if (ControlKeyDown) then \n Str1 = \"Do you want to reset the Version Build Number?\"\n Str2 = CoreExtension.AsString+\"...\"\n if (Msgbox.YesNo(Str1,Str2,true)) then\n theCoreVersion = 1\n end\n end\n \n CoreExtension.SetExtVersion(theCoreVersion)\n else\n theCoreversion = 1\n end\n \n theExt.SetExtVersion(theCoreVersion)\n \n Today = Date.Now\n Today.SetForm at(\"(M/dd/yyyy h:MM AMPM)\")\n theBaseFIleName = theExt.GetFileName\n theBaseFileName = theBaseFileName.Clone\n theBaseFileName = theBaseFileName.GetBaseName\n \n St1 = TheExt.Getname.AsString++Today.asstring+nl+\n \"v. \"+VersionNumber.AsString+\" (BN \"+theCoreversion.AsString+\")\"+nl+\n \"Applied Geographics Inc.\"+nl+\n \"100 Franklin St. Fl 7, Boston, MA 02110\"+nl+\n \"617-292-7125 Fax 617-292-7911 http://www.appgeo.com\"\n \n theExt.Setabout (St1)" ) (Script.27 Name: "AGI/LIB (MassGIS) Extension.Build" SourceCode: "' Name: AGI/LIB (MassGIS) Extension.Build\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Apr 03 17:31:52 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Apr 03 17:31:52 1998\n'------------------------------------------------------------------------\n\n if (Av.GetProject = nil) then\n Return nil\n end\n \n StrOffSet = String.MakeBuffer (16)\n HelpStr = \"This is a library script that controls the creation of new ext ensions.\"\n CheckList = {String,String,String,String,List,List,\n String,String,String,String,List,Number,boolean}\n LabelList = {\"Extension Install Script\",\n \"Extension Filename\",\n \"Extension Title\",\n \"Extension Uninstall Script\",\n \"Extension Dependencies List\",\n \"Script Prefix List\",\n \"Extension Save Script\",\n \"Extension Can Unload Script\",\n \"Extension Load Script\",\n \" Extension Unload Script\",\n \"Icon List\",\n \"Extension Version Number\",\n \"Quick Rebuild Status\",\"Nothing...\"}\n \n'--------------------------------------------------------------------------\n' Extract data from input parameters\n\n ExtensionInstallScript = Self.Get(0)\n ExtensionFileName = Self.Get(1)\n ExtensionTitle = Self.Get(2)\n ExtensionUninstallScript = Self.Get(3)\n DependenciesList = Self.Get(4)\n ScriptPrefixList = Self.Get(5)\n ExtensionSaveScript = Self.Get(6)\n ExtensionCanUnloadScript = Self.Get(7)\n ExtensionLoadScript = Self.Get(8)\n ExtensionUnloadScript = Self.Get(9)\n ExtensionIconList = Self.Get(10)\n ExtensionVersionNumber = Self.Get(11)\n CallingControl = Self.Get(12)\n\n'---------------------------------------------------------------------------\n\n InstalltoNetWork = false\n \n if (CallingControl.is(Control)) then\n QuickRebuildStatus = true\n \n if (CallingControl.GetTag.AsString.UCase = \"NETWORK\") then\n InstalltoNetWork = true\n end\n else\n QuickRebuildStatus = false\n end\n \n if (InstalltoNetWork) then\n \n NetWorkLocation = System.GetEnvVar(\"AGINETWORKLOCATION\")\n \n if (System.isShiftKeyDown) then\n NetWorkLocation = nil\n end\n \n if (NetworkLocation = nil) then\n Str1 = \"Please find the network tools directory...\"\n NewValue = Av.Run(\"AGI/LIB (MassGIS) GetPathDial og.Launch\",{\"\",Str1})\n \n if (NewValue = nil) then\n Return nil\n end\n \n if (NewValue.Count > 0) then\n NetworkLocation = NewValue.Get(0)\n end\n end\n \n if (NetWorkLocation <> nil) then\n\n if (File.Exists(NetWorkLocation.AsString.AsFileName).Not) then\n Msgbox.Warning(\"Unable to find the network tools location...\",\"Stopping...\")\n Return Nil\n else\n Str1 = E xtensionTitle.AsString+nl+\"Do you want to rebuild this extension to the network location?\"\n tempFName = FileName.Merge(NetWorkLocation.AsString,ExtensionFileName.AsString).AsString\n Str2 = tempFName.AsString+\"...\"\n \n if (Msgbox.YesNo(Str1,Str2,true).Not) then\n Return nil\n else\n System.SetEnvVar(\"AGINETWORKLOCATION\",NetworkLocation.AsString)\n ExtensionFileName = FileName.Merge(\"$AGINETWORKLOCAT ION\",ExtensionFileName.AsString).AsString\n end\n end\n end\n end\n \n'----------------------------------------------------------------------------\n\n' first step, generate TheEXT variable object.\n\n StrOffSet = String.MakeBuffer (16)\n\n theExt = Av.Run(\"AGI/LIB (MassGIS) Extension.GetObject\",{ExtensionInstallScript,\n ExtensionFileName,\n ExtensionTitle,\n ExtensionUninstallScript,\n DependenciesList,\n ExtensionSaveScript,\n ExtensionCanUnloadScript,\n ExtensionLoadScript,\n ExtensionUnloadScript,\n QuickRebuildStatus})\n \n' Add Scripts, Dialogs, and Version information to the THEEXT\n\n if (theExt.Is(Extension).Not) then\n Return nil\n end\n \n Av.Run(\"AGI/LIB (MassGIS) Extension.AddIcons\", {TheExt,ExtensionIconList})\n Av.Run(\"AGI/LIB (MassGIS) Extension.AddScripts\",{TheExt,ScriptPrefixList})\n Av.Run(\"AGI/LIB (MassGIS) Extension.AddVersion\",{TheExt,ExtensionTitle,ExtensionVersionNumber}) \n \n' commit the extension odb to disk\n\n theExt.Commit\n \n' Send message to AV messagebar.\n Av.ShowMsg(Extensio nTitle+\" Successfully Rebuild.\")" ) (Script.28 Name: "AGI/LIB (MassGIS) Extension.CanUnloadScript" SourceCode: "' Name: AGI/LIB (MassGIS) Extension.CanUnloadScript\n' Headline: Governs whether the extension can be unloaded\n' Called By:\n' Calls To:\n'\n' Author: Andrew Kvaal\n' Date: Fri Apr 03 17:31:52 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: If any AGI extension is loaded, then the library\n' cannot be unloaded.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Apr 03 17:31:52 1998\n'------------------------------------------------------------------------\n \n if (Av.GetProject = nil) then\n Return nil\n end\n \n For each TheExt in Extension.GetExtensions.Returnkeys\n \n if (TheExt.AsString.Lcase.Contains(\"AGI\")) then\n if (TheExt.AsString.LCase.Contains(\"AGI Code Library\").not) then\n Return false\n Break\n end\n end\n \n end\n \nReturn TRUE" ) (Script.29 Name: "AGI/LIB (MassGIS) Extension.GetObject" SourceCode: "' Name: AGI/LIB (MassGIS) Extension.GetObject\n' Headline: Creates an Extension Based on input values\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Apr 03 17:31:52 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This script is called by the Make Scripts of\n' all extensions. It creates a new extension object\n' and returns this object to additional use in other\n' scripts.\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Apr 03 17:31:52 1998 \n'------------------------------------------------------------------------\n\n if (Av.GetProject = nil) then\n Return nil\n end\n\n HelpStr = \"This script is a Library extension script for creating extension objects.\"\n CheckList = {String,String,String,String,\n List,String,String,String,\n String,Boolean}\n \n LabelList = {\"Extension Install Script\",\n \"Extension Filename\",\n \"Extension Title\",\n \"Extension Uninstall Scrip t\",\n \"Extension Dependencies List\",\n \"Extension Save Script\",\n \"Extension Can Unload Script\",\n \"Extension Load Script\",\n \"Extension Unload Script\",\n \"Quick Rebuild Status\",\"Extension Object\"}\n \n if ((Av.Run(\"AGI/LIB (MassGIS) Verify Input\", {SELF,CheckList,LabelList,Script.the.getname,HelpStr})).not) then\n Return nil\n end\n\n'--------------------------------------------------------------------------\n\n InExt = Self.get(0)\n FileExt = Self.get(1)\n ExtName = Self.get(2)\n UnExt = Self.get(3)\n DepList = Self.get(4)\n ExtSave = Self.get(5)\n ExtCanUnload = self.Get(6)\n ExtLoad = Self.Get(7)\n ExtUnload = Self.Get(8)\n QuickRebuild = Self.Get(9)\n \n if (Av.Getproject.finddoc(InExt) = Nil) then \n Msgbox.Info(\"Unable to find the Uninstaller Script.\",\"\")\n Return(false)\n end\n \n if (Av.Getproject.finddoc(UnExt) = Nil) then \n Msgbox.Info(\"Unable to fi nd the Installer Script.\",\"\")\n Return(false)\n end\n \n if (ExtSave <> \"\") then\n if (Av.Getproject.finddoc(ExtSave) = Nil) then \n Msgbox.Info(\"Unable to find the Extension Save Script.\",\"\")\n Return(false)\n end\n end\n \n ExtPath = System.GetEnvVar(\"AVEXT\")\n \n if (FileExt.AsString.Contains(\"$AGINETWORKLOCATION\")) then\n FileExt = FileExt.AsString.AsFileName\n else\n FileExt = FileName.Merge(ExtPath.AsString.Trim,FileExt.Lcase)\n end\n \n if (Qui ckRebuild.not) then \n St1 = \"Where do you want to write this extension file?\"\n \n File_name = FileDialog.Put(FileExt, \"*.avx\",st1)\n \n if (File_Name = nil) then \n Return nil\n end\n else\n File_name = FileExt.AsString.AsFileName\n end\n \n'----------------------------------------------------------------------------\n' Make and define extension\n'----------------------------------------------------------------------------\n\n StrOffSet = String.MakeBuffer (16)\n CurrentExtensionObject = Extension.GetExtensions.Get(ExtName.AsString.Trim)\n \n if (File_name.AsString.Contains(\"$AGINETWORKLOCATION\").Not) then\n\n if (CurrentExtensionObject <> nil) then\n \n CurrentFileName = CurrentExtensionObject.GetFileName\n \n if (CurrentFileName.GetFullName <> File_Name.AsString) then\n \n if (File.Exists(CurrentFileName)) then\n if (File.IsWritable (CUrrentFileName)) then\n File_Name = CurrentFileN ame.AsString\n System.Beep\n System.Beep\n System.Beep\n end\n end\n \n end\n end\n end\n\n'--------------------------------------------------------------------------------------------------\n \n if (DepList.Count > 0) then\n \n if ((File_Name.AsString.Contains(\"USEREXT\") or (File_Name.AsString.Contains(\"$AGINETWORKLOCATION\")))) then\n \n CodeLibraryExt = nil\n Inc = 0\n For each aDep in DepList\n if (aDep.AsString.Contains(\"AGI-MASSGIS.AV\")) then\n CodeLibraryExt = aDep\n Break\n end\n Inc = Inc + 1\n end\n \n if (CodeLibraryExt <> nil )then\n \n ExtFileName = CodeLibraryExt.AsString.AsFileName.GetBaseName\n ExtFileName = FileName.Merge(\"$USEREXT\",ExtFileName.AsString)\n \n DepList.Set( inc,ExtFileName)\n end\n end\n end\n\n'--------------------------------------------------------------------------------------------------\n \n theExt = Extension.Make(File_name.asstring.asfilename,ExtName,\n Av.Getproject.Findscript(InExt),Av.GetProject.Findscript(UnExt),\n DepList)\n \n if (ExtSave <> \"\") then\n theExt.SetProjectSaveScript(Av.GetProject.Findscript(ExtSave))\n end\n \n if (ExtCanUnload <> \"\") then\n theExt.SetCanUnloadScript(Av. GetProject.Findscript(ExtCanUnload))\n end\n \n if (ExtUnload <> \"\") then\n theExt.SetUnloadScript(Av.GetProject.Findscript(ExtUnload))\n end\n \n if (Extload <> \"\") then\n theExt.SetLoadScript(Av.GetProject.Findscript(Extload))\n end\n \nReturn(theExt)" ) (Script.30 Name: "AGI/LIB (MassGIS) GetPathDialog.CloseLabelButton.Click" SourceCode: "' Name:AGI/LIB (MassGIS) GetPathDialog.CloseLabelButton.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:15:12 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:15:12 1999\n'------------------------------------------------------------------------\n\n Self.GetDialog.Close \n Self.GetDialog.SetObjecttag(nil)\n Self.GetDialog.FindbyName(\"PathTextLine\").SetText(\"\")" ) (Script.31 Name: "AGI/LIB (MassGIS) GetPathDialog.CreateDialog" SourceCode: "' Name:AGI/LIB (MassGIS) GetPathDialog.CreateDialog\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:15:29 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This script creates the Path Menu. If the menu already\n' exists, then the dialog will use the project dialog. If\n' it does not exist, then a new dialog will be created and\n' added to the project.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:15:29 1999\n'------------------ ------------------------------------------------------\n\n TheDialog = Dialog.MakeSized(true,true,true,true,Rect.MakeXY(0,0,350,360))\n TheDialog.SetName (\"Path Menu\")\n TheDialog.SetResizable (false)\n TheDialog.SetModal (true)\n TheDialog.SetTitle (\"Drive Locations and Directories...\")\n\n Av.GetProject.RemoveDialog(theDialog.AsString)\n Av.Getproject.Adddialog(TheDialog)\n \n'-------------------------------------------------------------------- -\n\n c = TextLine.Make\n c.SetName (\"PathTextLine\")\n c.SetApply (\"AGI/LIB (MassGIS) GetPathDialog.PathTextLine.Apply\")\n c.SetLabel (\"Path: \")\n \n TheDialog.getcontrolpanel.add(c,Rect.Makexy(5,10,340,30))\n \n'---------------------------------------------------------------------\n\n c = TextLabel.Make\n c.setName (\"PathsTextLabel\")\n c.SetLabel (\"Drive Directories...\")\n\n TheDialog.getcontrolpanel.add(c,Rect.Makexy(35,65,340,90))\n\n'------------------- --------------------------------------------------\n\n c = ListBox.Make\n c.setName (\"PathsListBox\")\n c.SetHorizontalScroll (false)\n c.SetSelect (\"AGI/LIB (MassGIS) GetPathDialog.PathListBox.Select\")\n\n TheDialog.getcontrolpanel.add(c,Rect.Makexy(35,85,340,315))\n \n'---------------------------------------------------------------------\n\n c = Button.Make\n c.SetName (\"UpdateLabelButton\")\n c.SetClick (\"AGI/LIB (MassGIS) GetPathDialog.UpdatePathsButton.Click\")\n c.SetHelp (\"Update Drive(s)//Use this button to update the list\"+\n \" of Mapped Local and Network Drives.\") \n \n IconDict = Av.Run(\"AGI/LIB (MassGIS) Icon Dictionary\",\"\")\n \n if (IconDict.Get(\"Media\") <> nil) then\n c.SetIcon (IconDict.Get(\"Index\"))\n end\n \n TheDialog.getcontrolpanel.add(c,Rect.Makexy(37,40,65,60))\n \n'---------------------------------------------------------------------\n\n c = ComboBox.Make\n c.SetName (\"PathsComboBox\")\n c.SetSel ect (\"AGI/LIB (MassGIS) GetPathDialog.PathsComboBox.Select\")\n c.SetUpdate (\"AGI/LIB (MassGIS) GetPathDialog.PathsComboBox.Update\")\n c.SetLabel (\"Drives:\")\n c.SetObjecttag (true) \n c.SetTag (\"Startup\")\n c.Update\n \n TheDialog.getcontrolpanel.add(c,Rect.Makexy(75,40,340,350))\n\n'---------------------------------------------------------------------------------\n\n c = LabelButton.Make\n c.SetName (\"OKLabelButton\")\n c.SetClick (\"AGI/ LIB (MassGIS) GetPathDialog.OKLabelButton.Click\")\n c.SetLabel (\"Ok\")\n \n TheDialog.getcontrolpanel.add(c,Rect.Makexy(200,325,240,350))\n\n'---------------------------------------------------------------------------------\n\n c = LabelButton.Make\n c.SetName (\"CancelLabelButton\")\n c.SetClick (\"AGI/LIB (MassGIS) GetPathDialog.CloseLabelButton.Click\")\n c.SetLabel (\"Cancel\")\n \n TheDialog.getcontrolpanel.add(c,Rect.Makexy(250,325,340,350))\n \n'------------- --------------------------------------------------------------------\n \n Av.Run(\"AGI/LIB (MassGIS) Dialog.MovetoCenterOfScreen\",theDialog)\n Av.GetProject.AddDialog(theDialog)\n\n theList = theDialog.FindbyName(\"PathsComboBox\").GetList\n \n if (theList.count > 0) then\n theDrive = theList.Get(0)\n TheDialog.FindbyName(\"PathTextLine\").SetText(theDrive.asString)\n TheDialog.FindbyName(\"PathTextLine\").Apply\n end\n \n Av.Run(\"AGI/LIB (MassGIS) Dialog.MovetoCenterOfScreen\",theDialog)\n \nReturn (t heDialog)\n\n" ) (Script.32 Name: "AGI/LIB (MassGIS) GetPathDialog.Launch" SourceCode: "' Name:AGI/LIB (MassGIS) GetPathDialog.Launch\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:15:46 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:15:46 1999\n'------------------------------------------------------------------------\n\n' Pull default values out of the incoming arguments\n\n InitialPathValue = \"\"\n if (Self.is(List)) then\n\n ' if Self Argument is a list of atleast one item, then\n ' assume it is a string and use it for the initial PathTextLine\n ' value.\n \n if (Self.Count > 0) then\n InitialPathValue = Self.Get(0).AsString\n end\n end\n \n'------------------------------------------------------------------------\n' The following code either opens the Dialog Object or creates a new\n' dialog. This dialog does not kill itself off when it is closed. It\n' is faster, due to the need to get a dir list to leave it in the project\n' and simply open it w hen the User needs it again. Also, the Dialog stores\n' previous path values in a ComboBox and uses these to let User get to\n' past paths more quickly.\n'\n' The B_TheDialogIsNew is a boolean value used to determine if the \n' dialog should be resized when it is open, the initial value is false. If \n' the dialog has to be created, then this value is set to true and the script\n' will resize it before opening.\n\n B_TheDialogIsNew = false\n TheDialog = Av.GetProject.FindDialog(\"Path Menu\")\n \n ' if the Dial og Object can not be found in the Project, then\n ' run the code to create it fresh. This code automatically add\n ' the Dialog Object to the project. Once this has been run, usually\n ' the first time the open is requested, the script should find the\n ' Dialog and skip this step. \n \n if (TheDialog = nil) then \n B_TheDialogIsNew = true \n theDialog = Av.Run(\"AGI/LIB (MassGIS) GetPathDialog.CreateDialog\",\"\")\n end\n\n ' Initialize the PathTextLine with whatever the initial value\n ' passed to this script might be. This Dialog is Modal, this \n ' script pauses until the User close the Dialog.\n \n theDialog.FindbyName(\"PathTextLine\").SetText(InitialPathValue)\n \n if (File.Exists(InitialPathValue.AsString.Trim.AsFileName)) then\n \n if (InitialPathValue.AsString.Trim.Contains(\"a:\").Not) then\n theDialog.FindbyName(\"PathTextLine\").Apply\n end\n \n end\n \n TheDialog.Open\n\n ' Dialog is now closed. Get the Value in the Path TextLIne and\n ' return either it or a null value to the calling script.\n \n if (theDialog.GetObjecttag = nil) then\n Return nil\n end\n \n thePath = theDialog.GetObjecttag\n isValid = false\n \n if (thePath.asString.Count = 0) then \n isValid = false\n else\n if (thePath.AsString.AsFileName.isDir) then\n isValid = true\n \n theList = theDialog.FindbyName(\"OldPathsComboBox\").GetList\n theList.Insert(thePath)\n theList.RemoveDuplicates\n \n theDialog.FindbyName(\"OldPathsComboBox\").DefineFromlist(theList.DeepClone)\n else\n isValid = false\n end\n end\n\n\nAv.GetProject.RemoveDialog(theDialog.AsString)\nAv.PurgeObjects\n\nReturn ({thePath.trim,isValid})\n" ) (Script.33 Name: "AGI/LIB (MassGIS) GetPathDialog.OkLabelButton.Click" SourceCode: "' Name:AGI/LIB (MassGIS) GetPathDialog.OkLabelButton.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:16:00 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:16:00 1999\n'------------------------------------------------------------------------\n\nthePathString = Self.GetDialog.FindbyName(\"PathTextLine\").GetText\n\nSelf.GetDialog.SetObjecttag(thePathString) \nSelf.GetDialog.Close" ) (Script.34 Name: "AGI/LIB (MassGIS) GetPathDialog.OldPathsComboBox.Select" SourceCode: "' Name:AGI/LIB (MassGIS) GetPathDialog.OldPathsComboBox.Select\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:16:15 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:16:15 1999\n'------------------------------------------------------------------------\n\n theOldPathString = Self.GetSelection\n \n if (theOldPathString.AsString.AsFileName.isDir) then\n Self.GetDialog.FindbyName(\"PathTextLine\").SetText(theOld PathString.AsString)\n else\n Str1 = \"This path is nolonger valid.\"\n Str2 = theOldPathString.AsString\n Msgbox.Warning(Str1,Str1)\n end" ) (Script.35 Name: "AGI/LIB (MassGIS) GetPathDialog.OldPathsComboBox.Update" SourceCode: "' Name:AGI/LIB (MassGIS) GetPathDialog.OldPathsComboBox.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:16:26 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:16:26 1999\n'------------------------------------------------------------------------\n \n theList = Self.GetList\n if (thelist.Count > 50) then \n Lst_temp = {}\n \n For each aIndexNum in 0..49\n Lst_temp.add(theList.get(aIndex Num))\n end\n \n theList = Lst_temp\n end\n \n Self.DefineFromList(theList)" ) (Script.36 Name: "AGI/LIB (MassGIS) GetPathDialog.PathListBox.Select" SourceCode: "' Name:AGI/LIB (MassGIS) GetPathDialog.PathListBox.Select\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:16:37 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:16:37 1999\n'------------------------------------------------------------------------\n\n Self.GetDialog.Findbyname(\"PathTextLine\").SetText(Self.GetSelection.Get(0).AsString)\n Self.GetDialog.Findbyname(\"PathTextLine\").Apply\n " ) (Script.37 Name: "AGI/LIB (MassGIS) GetPathDialog.PathsComboBox.Select" SourceCode: "' Name:AGI/LIB (MassGIS) GetPathDialog.PathsComboBox.Select\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:16:51 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:16:51 1999\n'------------------------------------------------------------------------\n \n thePathString = Self.GetSelection.Asstring\n\n if (thePathString.AsList.Count = 2) then\n thePathString = thePathString.AsList.Get(0).AsString.Trim+\"\\\"\n else\n thePathString = thePathString.trim\n end\n \n Self.GetDialog.Findbyname(\"PathTextLine\").SetText(thePathString)\n Self.GetDialog.Findbyname(\"PathTextLine\").Apply\n" ) (Script.38 Name: "AGI/LIB (MassGIS) GetPathDialog.PathsComboBox.Update" SourceCode: "' Name:AGI/LIB (MassGIS) GetPathDialog.PathsComboBox.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:17:02 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:17:02 1999\n'------------------------------------------------------------------------\n\n BooleanStatus = Self.GetObjecttag\n \n if (BooleanStatus.is(Boolean).Not) then\n BooleanStatus = false\n end\n \n if (BooleanStatus) then\n \n if (Av.GetProject.GetObjecttag.Is(Dictionary)) then\n \n SystemDriveList = Av.GetProject.GetObjecttag.Get(\"System Drive List\")\n if (SystemDriveList.is(List)) then\n if (SystemDriveList.Count > 0) then\n Self.DefineFromList(SystemDriveList)\n Return nil\n end\n end\n end\n end \n \n \n'--------------------------------------------------------------------------------\n DriveList = {}\n \n if (System. GetOS.AsString.Contains(\"UNIX\")) then\n \n SourcePath = \"/\"\n \n PathResouces = Sourcepath.AsFileName.Read(\"*.*\")\n \n For each aPath in PathResouces\n if (aPath.isDir) then\n DriveList.add(aPath.AsString)\n end\n end\n\n else\n \n if (System.GetOSVariant.AsString.Contains(\"MSWNT\")) then\n if (Self.GetTag.isNull) then\n RawDriveList = {\"C:\",\"D:\",\"A:\",\"B:\",\"E:\",\"F:\",\"G:\",\"H:\",\"I:\",\"J:\",\"K:\",\n \"L:\",\"M:\" ,\"N:\",\"O:\",\"P:\",\"Q:\",\"R:\",\"S:\",\"T:\",\n \"U:\",\"V:\",\"W:\",\"X:\",\"Y:\",\"Z:\"}\n \n else\n RawDriveList = {\"C:\",\"D:\",\"E:\",\"F:\",\"G:\"}\n Self.SetTag(\"\")\n end \n \n For each theDrive in RawDriveList\n \n if (theDrive.AsString.Right(1) = \":\") then\n theDrive = theDrive+\"\\\"\n end\n \n theDrivePath = FileName.Make(theDrive)\n theDrivePath = System.GetUNCFilename(theDrivePath)\n \n DriveList.add(theDrive.AsString++theDrivePath.AsString)\n end\n else\n DriveList = {\"A:\",\"B:\",\"C:\",\"D:\",\"E:\",\"F:\",\"G:\",\"H:\",\"I:\",\"J:\",\"K:\",\n \"L:\",\"M:\",\"N:\",\"O:\",\"P:\",\"Q:\",\"R:\",\"S:\",\"T:\",\"U:\",\"V:\",\"W:\",\"X:\",\"Y:\",\"Z:\"}\n end\n end\n \n Self.DefineFromList(DriveList)\n Av.GetProject.GetObjecttag.Set(\"System Drive List\",DriveList)\n Self.SetTag(\"\")\n " ) (Script.39 Name: "AGI/LIB (MassGIS) GetPathDialog.PathTextLine.Apply" SourceCode: "' Name:AGI/LIB (MassGIS) GetPathDialog.PathTextLine.Apply\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:17:11 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:17:11 1999\n'------------------------------------------------------------------------\n\n thePathString = Self.GetText\n\n if (thePathString.AsList.Count = 2) then\n thePathString = thePathString.AsList.Get(0).AsString.Trim\n else\n thePathString = thePathString.trim\n end\n\n if (thePathString.AsString.AsFileName.isDIr) then\n Self.GetDialog.FindbyName(\"PathsListBox\").empty\n DirList = thePathString.AsString.AsFileName.Read(\"*\")\n\n theFile = thePathString.AsString.Clone.AsFileName\n theFile.StripFile\n\n if (theFile.AsString.Count = 2) then\n theFile = thePathString.AsString.AsFileName\n end\n \n if ((theFile.AsString.IsNull) and (System.GetOS.AsString.Contains(\"UNIX\"))) then\n theFile = \"/\".asFileName\n end\n \n DirectoryList = {theFile}\n For each dog in Dirlist\n if (dog.isDir) then\n DirectoryList.add(dog)\n end\n end\n \n if (DirectoryList.count > 1 ) then\n Self.GetDialog.FindbyName(\"PathsListBox\").DefineFromList(DirectoryList)\n else\n thePathString = thePathString.AsFileName\n thePathString.Stripfile\n \n Self.GetDialog.FindbyName(\"PathsListBox\").DefineFromList({thePathString})\n end\n end" ) (Script.40 Name: "AGI/LIB (MassGIS) GetPathDialog.UpdatePathsButton.Click" SourceCode: "' Name:AGI/LIB (MassGIS) GetPathDialog.UpdatePathsButton.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:17:23 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:17:23 1999\n'------------------------------------------------------------------------\n\n Self.GetDialog.FindbyName(\"PathsComboBox\").SetObjecttag(false)\n Self.GetDialog.FindbyName(\"PathsComboBox\").Update" ) (Script.41 Name: "AGI/LIB (MassGIS) GetVtabList" SourceCode: "' Name: AGI/LIB (MassGIS) GetVtabList\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Apr 03 17:31:52 1998\n'\n' Requires:\n'\n' Returns: List of Vtabs\n'\n' Comments: This script adds tables to the AGITable GUI (default)\n' or the general table GUI. It searchs the\n' current Project path and the AGIProjTable Variable path \n' for any .DBF files with a given prefix. If\n' the files exist then they are added to the\n' project as tables. It al so removes these files.\n' The action of the script is controlled by the\n' Action Parameter (add/remove). The search prefix is the\n' second parameter.\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Apr 03 17:31:52 1998\n'------------------------------------------------------------------------\n\n if (Self = Nil) then \n Return Nil \n end\n \n Prefix = Self.Get(0)\n CheckAdminStatus = Self.Get(1)\n \n VtabList = List.Make\n FileList = List.Make\n IncludeSacredVtabs = true\n \n if (CheckAdminStatus) then\n IncludeSacredVtabs = Av.Run(\"AGI/TMT (MassGIS) CheckPassword\",\"\")\n end\n\n '-----------------------------------------------------------------------\n ' Check the current project to see if their are dbf tables present\n PrjName = av.getproject.getfilename\n\n if (PrjName <> nil) then\n \n PrjName = PrjName.clone\n Prjname.stripfile \n ProjectFiles = PrjName.ReadFiles(Prefix+\"*.dbf\")\n \n FileList = FileList + ProjectFiles\n \n if (IncludeSacredVtabs) then\n \n if (Prefix.AsString.Contains(\"inv_\")) then\n ThemeInv = FileName.Merge(PrjName.AsString,\"themeinv.dbf\")\n if (File.Exists(ThemeInv)) then\n FileList.Insert(ThemeInv)\n end\n end\n \n if (Prefix.AsString.Contains(\"ext_\")) then\n zoomInv = FileName.Merge(PrjName.AsString,\"zoominv.dbf\")\n if (File.Exists(ZoomInv)) t hen\n FileList.Insert(ZoomInv)\n end\n end\n \n if (Prefix.AsString.Contains(\"lnk_\")) then\n aDBFFile = FileName.Merge(PrjName.AsString,\"joinlink.dbf\")\n if (File.Exists(aDBFFile)) then\n FileList.Insert(aDBFFile)\n end\n end\n\n if (Prefix.AsString.Contains(\"als_\")) then\n aDBFFile = FileName.Merge(PrjName.AsString,\"inquiry.dbf\")\n \n if (File.Exists(aDBFFile)) then\n FileList.Insert(aDBFFile)\n end\n end\n\n end\n end\n\n \n '-----------------------------------------------------------------------------------\n ' Create the Components of the Vtablist\n \n FileList.RemoveDuplicates\n \n if (FileList.Count > 0) then\n \n For each aDBF in FileList\n \n NewVtab = VTab.Make(aDBF,false,false)\n \n if (NewVtab.is(Vtab)) then\n if (NewVtab.HasError.Not) then\n VtabList.add(NewVtab)\n end\n end\n end\n end\n \nReturn(VtabList)" ) (Script.42 Name: "AGI/LIB (MassGIS) GUI.AddControls" SourceCode: "' Name:AGI/LIB (MassGIS) GUI.AddControls\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:17:35 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:17:35 1999\n'------------------------------------------------------------------------\n\n if (Av.GetProject.GetObjectTag.is(Dictionary).not) then\n Av.GetProject.SetObjectTag(Dictionary.Make(10))\n end\n\n theDocClass = Self.Get(0)\n theControlClass = S elf.Get(1)\n theExtension = Self.Get(2)\n theExtensionNum = Self.Get(3)\n theDefaultIcon = Self.Get(4)\n theName = Self.Get(5)\n theClickScript = Self.Get(6)\n theHelpString = Self.Get(7)\n theUpdateScript = Self.Get(8)\n theApplyScript = \"\"\n \n if (Self.Count > 9) then\n theApplyScript = Self.Get(9)\n end\n \n'-----------------------------------------------------------------------------\n\n nb = theControlClass.Make\n nb.SetUpdate (theUpdateScript)\n nb.SetHel p (theHelpString)\n nb.SetName (theName.AsString)\n \n if ((nb.is(Button)) or (nb.is(Tool)))then\n \n theIcon = \"\"\n if (theExtensionNum <> -1) then\n theIcon = theExtension.Get(theExtensionNum)\n end\n \n if (theIcon.is(Icon)) then\n IconMgr.AddIcons ({theIcon.Clone})\n else\n n = Av.Run(\"AGI/LIB (MassGIS) Icon Dictionary\",\"\")\n theIcon = n.get(theDefaultIcon.AsString)\n end\n \n i f (theIcon.Is(Icon)) then\n nb.SetIcon(theIcon)\n end\n end\n \n Av.Run(\"AGI/LIB (MassGIS) GUI.RemoveControls\",{theName}) \n \n'------------------------------------------------------------------------------\n\n For each aGUI in Av.GetProject.FindGUIsfor(theDocClass).Clone \n \n if (theDocClass.GetClassName.AsString = \"Scene\") then\n if (aGUI.AsString <> \"3D Scene\") then\n Continue\n end\n end\n\n if (theDocC lass.GetClassName.AsString = \"View\") then\n if (aGUI.AsString <> \"View\") then\n Continue\n end\n end\n \n if (nb.is(Tool)) then\n nb.SetClick (theClickScript)\n nb.SetApply (theApplyScript)\n aGUI.GetToolBar.Add(nb.clone,aGUI.GetToolBar.GetControls.Count + 1)\n end\n \n if (nb.is(Button)) then\n nb.SetClick (theClickScript)\n aGUI.GetButtonBar.Add(nb.clone,aGUI.Ge tButtonBar.GetControls.Count + 1)\n end\n end" ) (Script.43 Name: "AGI/LIB (MassGIS) GUI.RemoveControls" SourceCode: "' Name:AGI/LIB (MassGIS) GUI.RemoveControls\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:19:08 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:19:08 1999\n'------------------------------------------------------------------------\n\n ControlNameList = Self\n \n if (ControlNameList.is(List).not) then\n Return nil\n end\n \n' Removes all Buttons from the project ViewGUIs.\n \n For each aGUI in Av.Ge tProject.GetGUIs\n \n ' Find and Remove From the Menu, Button, and Tool Bars\n For each ControlName in ControlNameList\n if (aGUI.GetToolBar.FindbyName(ControlName) <> Nil ) then\n aGUI.GetToolBar.Remove(aGUI.GetToolBar.FindbyName(ControlName))\n end\n\n if (aGUI.GetButtonBar.FindbyName(ControlName) <> Nil ) then\n aGUI.GetButtonBar.Remove(aGUI.GetButtonBar.FindbyName(ControlName))\n end\n\n if (aGUI.GetMenuBar.FindbyName(Contro lName) <> Nil ) then\n aGUI.GetMenuBar.Remove(aGUI.GetMenuBar.FindbyName(ControlName))\n end\n end\n end\n " ) (Script.44 Name: "AGI/LIB (MassGIS) HTMLDocumentation.AdvancedButton.Click" SourceCode: "' Name:AGI/LIB (MassGIS) HTMLDocumentation.AdvancedButton.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:19:42 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:19:42 1999\n'------------------------------------------------------------------------\n \n if (Self.GetObjecttag.is(Boolean).Not) then\n Self.SetObjecttag(false)\n end\n \n theStatus = Self.GetObjecttag\n \n Self.GetDialog.FindbyName(\" AdvancedControlPanel\").SetVisible(theStatus.Not)\n Self.GetDialog.FindbyName(\"LibraryControlPanel\").SetVisible(theStatus)\n Self.GetDialog.FindbyName(\"HelpControlPanel\").SetVisible(theStatus)\n \n Self.SetObjecttag(theStatus.Not.Clone)\n \n n = Av.Run(\"AGI/LIB (MassGIS) Icon Dictionary\",\"\")\n\n theIcon2 = n.Get(\"SpinDown\") \n theIcon1 = n.Get(\"SpinUp\")\n\n if (theStatus) then\n Self.SetIcon(theIcon2)\n else\n Self.SetIcon(theIcon1)\n end" ) (Script.45 Name: "AGI/LIB (MassGIS) HTMLDocumentation.Click" SourceCode: "' Name:AGI/LIB (MassGIS) HTMLDocumentation.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:18:43 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:18:43 1999\n'------------------------------------------------------------------------\n\n if (Self.GetName = \"EditLabelButton\") then\n \n theVarName = Self.GetTag.AsString\n thePath = System.GetEnvVar(theVarName.AsString.Trim)\n \n if (thePath = nil) then\n thePath = \"\"\n end\n \n NewValue = Av.Run(\"AGI/LIB (MassGIS) GetPathDialog.Launch\",{thePath.AsString})\n \n if (NewValue = nil) then\n Return nil\n end\n \n if (NewValue.Count > 0) then\n NewValue = NewValue.Get(0)\n theControlName = theVarname.AsString+\"TextLine\"\n \n theControl = Self.GetDialog.FindbyName(theControlName)\n if (theControl <> nil) then\n theControl.SetText(NewValue)\n end\n\n System.SetEnvVar(theVarName.Proper,NewValue.AsString)\n end\n\n Return Nil\n end\n \n if (Self.GetName = \"ErrorReportingCheckBox\") then\n Msgbox.SetErrorReporting(Self.IsSelected)\n Return Nil\n end\n \n if (Self.GetName = \"PlaySoundsCheckBox\") then\n Av.GetProject.GetObjecttag.Set(\"PlayWindowSounds\",Self.IsSelected)\n Return nil\n end\n \n if (Self.GetName = \"LegendOption1RadioButton\") then\n Av.GetProject.GetObjecttag.Set(\"Lege ndPlacementOption\",\"WithProject\")\n Return nil\n end \n\n if (Self.GetName = \"LegendOption2RadioButton\") then\n Av.GetProject.GetObjecttag.Set(\"LegendPlacementOption\",\"WithLegendVariable\")\n Return nil\n end \n \n if (Self.GetName = \"LegendOption3RadioButton\") then\n Av.GetProject.GetObjecttag.Set(\"LegendPlacementOption\",\"WithInventoryDataBase\")\n Return nil\n end" ) (Script.46 Name: "AGI/LIB (MassGIS) HTMLDocumentation.FindDefault" SourceCode: "' Name:AGI/LIB (MassGIS) HTMLDocumentation.FindDefault\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:19:55 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:19:55 1999\n'------------------------------------------------------------------------\n\n thePrjDct = Av.GetProject.GetObjecttag\n\n'--------------------------------------------------------------------------\n\n theUserExtPath = System.GetEnvVar(\"USEREXT\")\n theFileName = nil\n \n if (theUserExtPath <> nil) then\n theFileName = FileName.Merge(theUserExtPath.AsString.Trim,\"wwwhelp.ini\")\n end\n \n if (theFileName <> nil) then\n if (File.Exists(theFileName).Not) then\n theFileName = nil\n end\n end\n \n'--------------------------------------------------------------------------\n\n if (theFileName = nil) then\n \n theAVEXTPath = System.GetEnvVar(\"AVEXT\")\n \n if (theAVEXTPath <> nil) then\n theFileName = FileName.Merge(theAVEXTPath.AsString.trim,\"wwwhelp.ini\")\n end\n \n if (theFileName <> nil) then\n if (File.Exists(theFileName).Not) then\n theFileName = nil\n end\n end\n \n end\n \n'-------------------------------------------------------------------------------------\n\n DefaultLocation = nil\n \n if (theFileName <> nil) then\n \n lf = LineFile.Make(theFileName, #FILE_PERM_READ )\n aLineList = List.Make \n lf.Read( aLineList, lf.GetSize )\n \n if (aLineList.Count > 0) then\n \n NewLineList = {}\n For each aLIne in aLineList\n if (aLine.AsString.Trim.IsNull.Not) then\n NewLineList.Add(aLine.AsString.Trim)\n end \n end \n \n if (NewLineList.Count > 0) then\n \n DefaultLocation = NewLineList.Get(0)\n \n if (File.Exists(DefaultLocation.AsString.AsFileName).Not) then\n DefaultLocation = nil\n end\n end\n \n end\n end\n \n if (DefaultLocation = nil) then\n DefaultLocation = \"http:\\\\www.state.ma.us\\mgis\\docs\\\"\n end\n \n thePrjDct.Set(\"HTMLSource\",DefaultLocation)" ) (Script.47 Name: "AGI/LIB (MassGIS) HTMLDocumentation.Open" SourceCode: "' Name:AGI/LIB (MassGIS) HTMLDocumentation.Open\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:20:05 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:20:05 1999\n'------------------------------------------------------------------------\n\n thePrjDct = Av.GetProject.GetObjecttag\n \n' Create the Dialog Object as a model non-resizable dialog. \n\n TheDialog = Dialog.MakeSized(true,true,true,true,Rect.MakeXY( 0,0,470,380))\n TheDialog.SetObjecttag(nil)\n \n n = Av.Run(\"AGI/LIB (MassGIS) Icon Dictionary\",\"\")\n \n'-------------------------------------------------------------------------------\n\n TheDialog.SetName (\"General Settings Menu\")\n TheDialog.SetAlwaysOnTop (true)\n TheDialog.SetCloseable (true)\n TheDialog.SetEscapeEnabled (true)\n TheDialog.UsetitleBar (true)\n TheDialog.Setmodal (true)\n TheDialog.SetResizable (false)\n TheDialog.SetTitle (\"OnLine Help and Settings...\")\n\n'--------------------------------------------------------------------------------\n\n HideCP = ControlPanel.Make\n HideCP.SetName (\"HideCP\")\n HideCP.Setlabel (\"\")\n HideCP.SetObjecttag (false)\n HideCP.SetVisibleBorder (false)\n\n TheDialog.GetControlPanel.Add(HideCP,Rect.MakeXY(430,0,460,30))\n \n'--------------------------------------------------------------------------------\n\n AdvancedButton = Button.Mak e\n AdvancedButton.SetName (\"AdvancedButton\")\n AdvancedButton.SetClick (\"AGI/LIB (MassGIS) HTMLDocumentation.AdvancedButton.Click\")\n \n HideCP.Add(AdvancedButton,Rect.MakeXY(-10,-10,40,40))\n AdvancedButton.SetIcon (n.Get(\"SpinDown\"))\n \n'--------------------------------------------------------------------------------\n\n AdvancedControlPanel = ControlPanel.Make\n AdvancedControlPanel.SetName (\"AdvancedControlPanel\")\n AdvancedControlPanel.Setlabel (\"Reserve Variables and Advanced Options...\")\n AdvancedControlPanel.SetVisibleBorder (true)\n AdvancedControlPanel.SetVisible (false)\n \n TheDialog.GetControlPanel.Add(AdvancedControlPanel,Rect.MakeXY(10,15,460,340))\n\n'--------------------------------------------------------------------------------\n\n c = TextLine.Make\n c.SetName (\"TEMPTextLine\")\n c.Setlabel (\"$TEMP\")\n c.SetTag (\"TEMP\")\n c.SetChanged (\"AGI/LIB (MassGIS) HTMLDocumentation.VarTextLine.Changed\")\n \n Ad vancedControlPanel.Add(c,Rect.MakeXY(20,50,400,70))\n\n if (System.GetEnvVar(\"TEMP\") <> nil) then\n c.SetText(System.GetEnvVar(\"TEMP\").AsString.Trim)\n end\n\n'--------------------------------------------------------------------------------\n\n c = Button.Make\n c.SetName (\"EditLabelButton\")\n c.SetTag (\"TEMP\")\n c.SetClick (\"AGI/LIB (MassGIS) HTMLDocumentation.Click\")\n \n AdvancedControlPanel.Add(c,Rect.MakeXY(405,50,430,70))\n c.SetIcon (n.Get(\"Open\")) \n \n'------------- -------------------------------------------------------------------\n\n c = TextLine.Make\n c.SetName (\"HOMETextLine\")\n c.Setlabel (\"$HOME\")\n c.SetTag (\"HOME\")\n c.SetChanged (\"AGI/LIB (MassGIS) HTMLDocumentation.VarTextLine.Changed\")\n c.SetReadOnly (true)\n \n AdvancedControlPanel.Add(c,Rect.MakeXY(20,80,400,100))\n\n if (System.GetEnvVar(\"HOME\") <> nil) then\n c.SetText(System.GetEnvVar(\"HOME\").AsString.Trim)\n end\n\n'------------------------------------- -------------------------------------------\n\n c = Button.Make\n c.SetName (\"EditLabelButton\")\n c.SetTag (\"HOME\")\n c.SetClick (\"AGI/LIB (MassGIS) HTMLDocumentation.Click\")\n\n AdvancedControlPanel.Add(c,Rect.MakeXY(405,80,430,100))\n c.SetIcon (n.Get(\"Open\")) \n \n'--------------------------------------------------------------------------------\n\n c = TextLine.Make\n c.SetName (\"AVHOMETextLine\")\n c.Setlabel (\"$AVHOME\")\n c.SetTag (\"AVHOME\")\n c.Se tChanged (\"AGI/LIB (MassGIS) HTMLDocumentation.VarTextLine.Changed\")\n c.SetReadOnly (true)\n c.SetEnabled (False)\n \n AdvancedControlPanel.Add(c,Rect.MakeXY(20,110,400,130))\n\n if (System.GetEnvVar(\"AVHOME\") <> nil) then\n c.SetText(System.GetEnvVar(\"AVHOME\").AsString.Trim)\n end\n \n'--------------------------------------------------------------------------------\n\n c = Button.Make\n c.SetName (\"EditLabelButton\")\n c.SetTag (\"AVHOME\")\n c.SetClick ( \"AGI/LIB (MassGIS) HTMLDocumentation.Click\")\n \n AdvancedControlPanel.Add(c,Rect.MakeXY(405,110,430,130))\n c.SetIcon (n.Get(\"Open\")) \n \n'--------------------------------------------------------------------------------\n\n c = TextLine.Make\n c.SetName (\"CWDTextLine\")\n c.Setlabel (\"$CWD\")\n c.SetTag (\"CWD\")\n c.SetChanged (\"AGI/LIB (MassGIS) HTMLDocumentation.VarTextLine.Changed\")\n \n AdvancedControlPanel.Add(c,Rect.MakeXY(20,140,400,160))\n\n if (System.GetEnvVar(\"CWD \") <> nil) then\n c.SetText(System.GetEnvVar(\"CWD\").AsString.Trim)\n end\n \n'--------------------------------------------------------------------------------\n\n c = Button.Make\n c.SetName (\"EditLabelButton\")\n c.SetTag (\"CWD\")\n c.SetClick (\"AGI/LIB (MassGIS) HTMLDocumentation.Click\")\n \n AdvancedControlPanel.Add(c,Rect.MakeXY(405,140,430,160))\n c.SetIcon (n.Get(\"Open\")) \n \n'--------------------------------------------------------------------------------\n\n c = TextLine.Make\n c.SetName (\"AVBINTextLine\")\n c.Setlabel (\"$AVBIN\")\n c.SetTag (\"AVBIN\")\n c.SetChanged (\"AGI/LIB (MassGIS) HTMLDocumentation.VarTextLine.Changed\")\n \n AdvancedControlPanel.Add(c,Rect.MakeXY(20,170,400,190))\n\n if (System.GetEnvVar(\"AVBIN\") <> nil) then\n c.SetText(System.GetEnvVar(\"AVBIN\").AsString.Trim)\n end\n\n'--------------------------------------------------------------------------------\n\n c = Button.Make\n c.SetName (\"EditLabelB utton\")\n c.SetTag (\"AVBIN\")\n c.SetClick (\"AGI/LIB (MassGIS) HTMLDocumentation.Click\")\n \n AdvancedControlPanel.Add(c,Rect.MakeXY(405,170,430,190))\n c.SetIcon (n.Get(\"Open\")) \n \n'--------------------------------------------------------------------------------\n\n c = TextLine.Make\n c.SetName (\"AVEXTTextLine\")\n c.Setlabel (\"$AVEXT\")\n c.SetTag (\"AVEXT\")\n c.SetChanged (\"AGI/LIB (MassGIS) HTMLDocumentation.VarTextLine.Changed\")\n \n AdvancedControl Panel.Add(c,Rect.MakeXY(20,200,400,220))\n\n if (System.GetEnvVar(\"AVEXT\") <> nil) then\n c.SetText(System.GetEnvVar(\"AVEXT\").AsString.Trim)\n end\n\n'--------------------------------------------------------------------------------\n\n c = Button.Make\n c.SetName (\"EditLabelButton\")\n c.SetTag (\"USEREXT\")\n c.SetClick (\"AGI/LIB (MassGIS) HTMLDocumentation.Click\")\n \n AdvancedControlPanel.Add(c,Rect.MakeXY(405,200,430,220))\n c.SetIcon (n.Get(\"Open\")) \n \n'----------------- ---------------------------------------------------------------\n\n c = TextLine.Make\n c.SetName (\"USEREXTTextLine\")\n c.Setlabel (\"$USEREXT\")\n c.SetTag (\"USEREXT\")\n c.SetChanged (\"AGI/LIB (MassGIS) HTMLDocumentation.VarTextLine.Changed\")\n \n AdvancedControlPanel.Add(c,Rect.MakeXY(20,230,400,250))\n\n if (System.GetEnvVar(\"USEREXT\") <> nil) then\n c.SetText(System.GetEnvVar(\"USEREXT\").AsString.Trim)\n end\n\n'------------------------------------------------------ --------------------------\n\n c = Button.Make\n c.SetName (\"EditLabelButton\")\n c.SetTag (\"USEREXT\")\n c.SetClick (\"AGI/LIB (MassGIS) HTMLDocumentation.Click\")\n \n AdvancedControlPanel.Add(c,Rect.MakeXY(405,230,430,250))\n c.SetIcon (n.Get(\"Open\")) \n \n'----------------------------------------------------------------------------------\n\n c = CheckBox.Make\n c.SetName (\"ErrorReportingCheckBox\")\n c.SetClick (\"AGI/LIB (MassGIS) HTMLDocumentation.Click\")\n c.Setlabel (\"Error Messages\")\n\n AdvancedControlPanel.Add(c,Rect.MakeXY(20,290,200,310))\n c.SetSelected (Msgbox.GetErrorReporting.Clone)\n\n'----------------------------------------------------------------------------------\n\n c = CheckBox.Make\n c.SetName (\"PlaySoundsCheckBox\")\n c.SetClick (\"AGI/LIB (MassGIS) HTMLDocumentation.Click\")\n c.Setlabel (\"Enable/Disable Sounds\")\n\n AdvancedControlPanel.Add(c,Rect.MakeXY(220,290,400,310))\n\n if (Av.GetProject.GetObjectt ag.Get(\"PlayWindowSounds\").is(Boolean).Not) then\n Av.GetProject.GetObjecttag.Set(\"PlayWindowSounds\",false)\n end\n\n c.SetSelected (Av.GetProject.GetObjecttag.Get(\"PlayWindowSounds\"))\n \n if (System.GetOS <> #SYSTEM_OS_MSW) then\n c.SetEnabled(False)\n end\n\n'--------------------------------------------------------------------------------\n\n LibraryControlPanel = ControlPanel.Make\n LibraryControlPanel.SetName (\"LibraryControlPanel\")\n LibraryControlPanel.Setlabel (\"L ibrary Options...\")\n LibraryControlPanel.SetVisibleBorder (true)\n\n TheDialog.GetControlPanel.Add(LibraryControlPanel,Rect.MakeXY(10,15,460,160))\n \n'--------------------------------------------------------------------------------\n\n c = TextLine.Make\n c.SetName (\"ARCHOMETextLine\")\n c.Setlabel (\"$ARCHOME\")\n c.SetChanged (\"\")\n \n LibraryControlPanel.Add(c,Rect.MakeXY(20,25,370,45))\n\n if (System.GetEnvVar(\"ARCHOME\") <> nil) then\n c.SetText(System.GetEnvVar(\"ARCHOME\").AsSt ring.Trim)\n end\n\n'--------------------------------------------------------------------------------\n\n c = LabelButton.Make\n c.SetName (\"HelpLabelButton1\")\n c.SetClick (\"AGI/LIB (MassGIS) HTMLDocumentation.OpenPage\")\n c.Setlabel (\"Using Libraries...\")\n c.SetTag (\"LIB/UsingLibraries.htm\")\n\n LibraryControlPanel.Add(c,Rect.MakeXY(330,50,440,70)) \n\n'---------------------------------------------------------------------------------\n\n HelpControlPanel = ControlPa nel.Make\n HelpControlPanel.SetName (\"HelpControlPanel\")\n HelpControlPanel.Setlabel (\"Online Help...\")\n HelpControlPanel.SetVisibleBorder (true)\n\n TheDialog.GetControlPanel.Add(HelpControlPanel,Rect.MakeXY(10,180,460,340))\n\n'--------------------------------------------------------------------------------\n\n c = TextLabel.Make\n c.SetName (\"FirstMessageTextLabel\")\n c.Setlabel (\"Applied Geographic Arcview Tools have Online help.\")\n\n HelpControlPanel.Add(c,Rect.MakeX Y(10,20,370,50))\n\n'---------------------------------------------------------------------------------\n\n c = TextLine.Make\n c.SetName (\"LocalHTMLHelpTextLine\")\n c.Setlabel (\"Source\")\n c.SetChanged (\"AGI/LIB (MassGIS) HTMLDocumentation.RadioButton.Click\")\n c.SetApply (\"AGI/LIB (MassGIS) HTMLDocumentation.RadioButton.Click\")\n \n HelpControlPanel.Add(c,Rect.MakeXY(10,50,340,70))\n\n Av.Run(\"AGI/LIB (MassGIS) HTMLDocumentation.FindDefault\",\"\")\n \n if (thePrjDct.Get(\"HTMLSo urce\").is(String).not) then\n thePrjDct.Set(\"HTMLSource\",\"http:\\\\www.state.ma.us\\mgis\\docs\\\")\n end\n \n c.SetText(thePrjDct.Get(\"HTMLSource\").AsString.Trim)\n \n'---------------------------------------------------------------------------------\n\n c = Button.Make\n c.SetName (\"LocalHTMLHelpLabelButton\")\n c.SetClick (\"AGI/LIB (MassGIS) HTMLDocumentation.RadioButton.Click\")\n c.SetHelp (\"Find Local Help Pages//This option allows the \"+\n \"User to c hange the default location of help pages.\")\n\n HelpControlPanel.Add(c,Rect.MakeXY(345,50,375,70))\n\n theIcon = n.Get(\"Open\")\n \n if (theIcon.is(Icon)) then\n c.SetIcon (theIcon)\n end\n\n'---------------------------------------------------------------------------------\n\n c = Button.Make\n c.SetName (\"OpenHTMLHelpLabelButton\")\n c.SetClick (\"AGI/LIB (MassGIS) HTMLDocumentation.RadioButton.Click\")\n c.SetHelp (\"Open Online Help//This option launches the online help.\")\n\n HelpControlPanel.Add(c,Rect.MakeXY(380,50,410,70))\n\n theIcon = n.Get(\"Run\")\n \n if (theIcon.is(Icon)) then\n c.SetIcon (theIcon)\n end\n\n'---------------------------------------------------------------------------------\n\n c = Button.Make\n c.SetName (\"PreserveDefaultButton\")\n c.SetClick (\"AGI/LIB (MassGIS) HTMLDocumentation.PreserverDefault.Click\")\n c.SetHelp (\"Save Default Location//This option allows you to \"+\n \"save the default help files lo cation (Hint: Use this \"+\n \"option when you want to default to a local copy of the \"+\n \"HTML help files).\")\n \n HelpControlPanel.Add(c,Rect.MakeXY(415,50,440,70))\n \n theIcon = n.Get(\"Write\")\n \n if (theIcon.is(Icon)) then\n c.SetIcon (theIcon)\n end\n \n'----------------------------------------------------------------------------------\n\n c = LabelButton.Make\n c.SetName (\"HelpLabelButton3\")\n c.SetClick (\"AGI/LIB (MassGIS) HTMLDoc umentation.OpenPage\")\n c.Setlabel (\"Using Help...\")\n c.SetTag (\"LIB/UsingOnlineHelp.htm\")\n\n HelpControlPanel.Add(c,Rect.MakeXY(330,80,440,100))\n \n'----------------------------------------------------------------------------------\n\n c = LabelButton.Make\n c.SetName (\"CloseLabelButton\")\n c.SetClick (\"AGI/LIB (MassGIS) Dialog.CloseLabelButton\")\n c.Setlabel (\"Close\")\n\n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(385,350,460,370))\n \n'---------------- -----------------------------------------------------------------\n\n c = Checkbox.Make\n c.SetName (\"DislayHelpButtonsCheckBox\")\n c.Setlabel (\"Show Help Buttons on Tools.\")\n c.SetClick (\"AGI/LIB (MassGIS) HTMLDocumentation.RadioButton.Click\")\n\n HelpControlPanel.Add(c,Rect.MakeXY(50,80,360,100))\n \n if (thePrjDct.Get(\"Display Help Buttons\").is(Boolean).not) then\n thePrjDct.Set(\"Display Help Buttons\",false)\n end\n \n c.SetSelected(thePrjDct.Get(\"Display Help Button s\"))\n \n TheDialog.FindbyName(\"HelpLabelButton1\").SetVisible(c.isSelected)\n TheDialog.FindbyName(\"HelpLabelButton3\").SetVisible(c.isSelected)\n\n \n'--------------------------------------------------------------------\n' Add the dialog to the project and Open it in its current location\n \n Av.GetProject.AddDialog(theDialog)\n Av.Run(\"AGI/LIB (MassGIS) Dialog.MovetoCenterOfScreen\",theDialog)\n \n'-------------------------------------------------------------------- \n \n TheDialog.Open\n\nAv.GetProject.Remove Dialog(theDialog.AsString)\nAv.PurgeObjects\nReturn Nil\n" ) (Script.48 Name: "AGI/LIB (MassGIS) HTMLDocumentation.OpenPage" SourceCode: "' Name:AGI/LIB (MassGIS)1\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Jim Barry, ESRI Developer Support ESRI \"Link_URL.ave\"\n' Date: Wed Apr 07 11:51:03 1999\n'\n' Requires: WIN32 API (Windows95/NT Only), hot linkable theme.\n'\n' Returns:\n'\n' Comments: The ShellExecuteA Windows API function does all \n' the work. If there is currently a Web browser\n' open it will pass the URL string to it, sending\n' the Web browser to that site. Otherwise, the\n' function will sta rt up the system default browser\n' and pass the URL to the browser. The URL can be any\n' URL or file, for example c:\\files\\docfile.html or\n' http://home.wxs.nl/~mprins or ftp://server.domain/publ/file.ext\n' In the attribute table make a URL field and use \n' this script as hot link.\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Apr 07 11:51:03 1999\n'------------------------------------------------------------------------\n\n if (System.GetOS.AsStr ing.Contains(\"MSW\").Not) then\n Return nil\n end\n \n if (Av.GetProject.GetObjecttag.is(Dictionary).not) then\n Av.GetProject.SetObjecttag(Dictionary.Make(100))\n end\n \n PrjDct = Av.GetProject.GetObjecttag\n \n if (PrjDct.Get(\"HTMLSource\").is(String).not) then\n PrjDct.Set(\"HTMLSource\",\"http:\\\\www.appgeo.com\\docs\\\")\n end\n\n HTMLBase = PrjDct.Get(\"HTMLSource\").AsString.Trim\n \n if (HTMLBase.AsString.Right(1) <> \"\\\") then\n HTMLBase = HTMLBase + \"\\\"\n end\n \n'------------------- -----------------------------------------------------\n\n HtmlPage = \"Default.htm\"\n HTMLParameter = \"\"\n\n if (Self.is(List)) then\n HtmlPage = Self.Get(0)\n HTMLParameter = Self.Get(1)\n end\n \n if (Self.Is(Control)) then\n theInput = Self\n HTMPParametersList = nil\n \n if (theInput.is(Control)) then\n \n theTagInputValue = Self.GetTag\n if (theTagInputValue.AsString.Contains(\"#\")) then\n theTagInputList = theTagInputValue.AsTokens(\"#\")\n \n if (theTagInputList. Count = 2) then\n HtmlPage = theTagInputList.Get(0).AsString.Trim\n HTMLParameter = theTagInputList.Get(1).AsString.Trim\n else\n HtmlPage = theTagInputList.Get(0).AsString.Trim \n end\n else\n HtmlPage = Self.GetTag.AsString.Trim\n end\n end \n\n end\n\n'-------------------------------------------------------------------------\n\n HTMLAddressPage = HTMLPage.AsString.Trim\n \n if (HTMLParameter = nil) then\n HTMLParameter = \"\"\n end\n \n if (HTMLParameter.AsString.Trim.isNull.Not) then\n HTMLAddressPage = HTMLAddressPage+\"#\"+HTMLParameter.AsString.Trim\n end\n \n HTMPFinalAddress = HTMLBase+HTMLAddressPage\n \n' Setup DLL file objects.\n \n if (System.GetOSVariant = #SYSTEM_OSVARIANT_MSWNT) then\n \n dllShell32 = DLL.Make(FileName.FindInSystemSearchPath(\"shell32.dll\"))\n dllUser32 = DLL.Make(FileName.FindInSystemSearchPath(\"user32.dll\"))\n \n ElseIf (System.GetOSvariant = #SYSTEM_OSVARIAN T_MSW95) then\n dllShell32 = DLL.Make(FileName.FindInSystemSearchPath(\"shell32.dll\"))\n dllUser32 = DLL.Make(FileName.FindInSystemSearchPath(\"user32.dll\"))\n Else\n MsgBox.Warning(\"Required DLL files cannot be found\"+NL+\"Check that the \"+\n \"SYSTEM folder is in your path.\",\n \"Stop, is this a Windoze machine?\")\n Return nil\n End\n\n' Setup Win32API functions as Avenue DLLProc objects\n\n dpGetActivewindow = DLLProc.Mak e(dllUser32, \"GetActiveWindow\",#DLLPROC_TYPE_INT32, 'return value type\n {}) 'argument list\n\n dpshellExecute = DLLProc.Make(dllShell32, \"ShellExecuteA\",\n #DLLPROC_TYPE_INT32, 'return value type\n {#DLLPROC_TYPE_INT32, 'argument list\n #DLLPROC_TYPE_STR,\n #DLLPROC_TYPE_STR,\n #DLLPROC_TYPE_STR,\n #DLLPROC_TYPE_STR,\n #DLLPROC_TYPE_INT32})\n\n\n' Get the Window Handle (hWnd) of the ArcView window.\n\n hWnd_active = dpGetActivewindow.Call({})\n \n' or-> hWnd_active = DLL.GetAVWindowHandle\n' Get the WWW URL for Hotlinking from the active theme's hotlink field.\n\n\n' Send the URL to the default browser\n Retvalue = dpShellExecute.Call({hWnd_active, \"Open\",HTMPFinalAddress, \"\", FileName.GetCWD.AsString, 1})\n\n' Let the user know if the link failed. The \"ShellExecuteA\"\n' functi on returns an integer greater than 32 if the process succeeded.\n \n if (retvalue <=32) then\n \n if (HTMPFinalAddress.AsString.Contains(\"http:\")) then \n MsgBox.Warning (\"Oops, Unable to find this Online Web page. Do you have\"+\n \" access to the Internet? Is the Online URL Correct?\",\n \"Sorry, Online can not be found...\")\n else\n MsgBox.Warning (\"Oops, Unable to find this HTML page. Check to make sure you have\"+\n \" installed the AGI Online help. Make sure you a browser installed!\",\n \"Sorry, Online can not be found...\")\n\n end\n End" ) (Script.49 Name: "AGI/LIB (MassGIS) HTMLDocumentation.PreserverDefault.Click" SourceCode: "' Name:AGI/LIB (MassGIS) HTMLDocumentation.PreserverDefault.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:20:16 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:20:16 1999\n'------------------------------------------------------------------------\n\n OptionList = {}\n if (System.GetEnvVar(\"USEREXT\") <> nil) then\n OptionList.Insert(\"\")\n end\n \n if (System.GetEnvVar(\" AVEXT\") <> nil) then\n OptionList.Insert(\"\")\n end\n \n if (OptionList.Count = 1) then\n theOption = OptionList.Get(0)\n else\n Str1 = \"Where do you want to store the OnLine Help Default File\"\n Str2 = \"WWWHelp.Ini file...\"\n theOption = Msgbox.ListAsString(OptionList,Str1,Str2)\n \n if (theOption = nil) then\n Return Nil\n end\n end\n\n if (theOption.Contains(\"USEREXT\")) then\n theOption = \"USEREXT\"\n else\n theOption = \"AVE XT\"\n end\n \n theFileName = FileName.Merge(System.GetEnvVar(theOption).AsString,\"wwwhelp.ini\")\n \n lf = LineFile.Make(theFileName,#FILE_PERM_WRITE)\n lf.WriteElt(Self.GetDialog.FindbyName(\"LocalHTMLHelpTextLine\").GetText.AsString) \n \n " ) (Script.50 Name: "AGI/LIB (MassGIS) HTMLDocumentation.RadioButton.Click" SourceCode: "' Name:AGI/LIB (MassGIS) HTMLDocumentation.RadioButton.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:20:26 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:20:26 1999\n'------------------------------------------------------------------------\n\n if (Av.GetProject.GetObjecttag.is(Dictionary).Not) then\n Av.GetProject.SetObjecttag(Dictionary.Make(100))\n end\n \n thePrjDct = Av.GetProject.GetObje cttag\n \n if (Self.GetName = \"LocalHTMLHelpTextLine\") then\n \n theText = Self.GetText\n \n if (theText.AsString.Trim.isNull) then\n theText = \"http:\\\\www.appgeo.com\\docs\\\"\n Self.SetText(theText)\n end\n \n thePrjDct.Set(\"HTMLSource\",theText)\n end\n \n if (Self.Getname = \"OpenHTMLHelpLabelButton\" ) then\n Av.Run(\"AGI/LIB (MassGIS) HTMLDocumentation.OpenPage\",{\"Default.htm\",\"\"})\n Return nil\n end\n \n if (Self.Getname = \"DislayHelpButto nsCheckBox\" ) then\n thePrjDct.Set(\"Display Help Buttons\",Self.IsSelected)\n \n Self.GetDialog.FindbyName(\"HelpLabelButton1\").SetVisible(Self.isSelected)\n Self.GetDialog.FindbyName(\"HelpLabelButton3\").SetVisible(Self.isSelected)\n\n Return nil\n end\n \n if (Self.GetName = \"LocalHTMLHelpLabelButton\") then\n \n theFile = FileDialog.Show(\"defau*.htm\",\"*.htm\",\"Locate your online help default.htm file...\")\n \n if (thefile = nil) then\n Return nil\n end\n \n theFile = theFile.Clone\n theFile.StripFile\n \n Self.GetDialog.FindbyName(\"LocalHTMLHelpTextLine\").SetText(theFile.AsString)\n thePrjDct.Set(\"HTMLSource\",theFile.AsString)\n end" ) (Script.51 Name: "AGI/LIB (MassGIS) HTMLDocumentation.Update" SourceCode: "' Name:AGI/LIB (MassGIS) HTMLDocumentation.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:20:37 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:20:37 1999\n'------------------------------------------------------------------------\n\n if (Av.GetProject.GetObjecttag.Is(Dictionary).Not) then\n Av.GetProject.SetObjecttag(Dictionary.Make(100))\n end\n \n theProject = Av.GetProject\n theProjectD ct = theProject.GetObjecttag\n \n displayHelpStatus = theProjectDct.Get(\"Display Help Buttons\")\n \n if (displayHelpStatus.is(Boolean).not) then\n displayHelpStatus = false\n end\n \n if (displayHelpStatus.Not) then\n Self.SetVisible(false)\n Return nil\n end\n \n Self.SetEnabled(true)\n Self.SetVisible(true)" ) (Script.52 Name: "AGI/LIB (MassGIS) HTMLDocumentation.VarTextLine.Changed" SourceCode: "' Name:AGI/LIB (MassGIS) HTMLDocumentation.VarTextLine.Changed\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:20:49 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:20:49 1999\n'------------------------------------------------------------------------\n\n theName = Self.GetTag\n thePath = Self.GetText\n \n System.SetEnvVar(theName.AsString.Trim,thePath.AsString.Trim)\n" ) (Script.53 Name: "AGI/LIB (MassGIS) Icon Dictionary" SourceCode: "' Name: AGI/LIB (MassGIS) Icon Dictionary\n' Headline: Creates and Returns an Icon Dictionary\n' Called By: Any Script\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Apr 03 17:31:52 1998\n'\n' Requires: None\n'\n' Returns: Icon Dictionary\n'\n' Comments: This script creates a temporary icon dictionary and returns\n' it to the script which ran this script.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Apr 03 17:31:52 1998\n'---------------------------------------------------------------- --------\n \n if (Av.GetProject.GetObjecttag.is(Dictionary).Not) then\n Av.GetProject.SetObjecttag(Dictionary.Make(20))\n end\n \n IconDictionary = nil\n if (Av.GetProject.GetObjecttag.Get(\"IconDictionaryResouce\").is(Dictionary)) then\n \n IconDictionary = Av.GetProject.GetObjecttag.Get(\"IconDictionaryResouce\")\n \n if (IconDictionary.ReturnKeys.Count = 0) then\n IconDictionary = nil\n end\n end\n \n if (Self = nil) then\n IconDictionary = nil\n end \n \n if (IconDictionary.is(Dictionary)) then\n Return (IconDictionary)\n else\n \n ' Creates an empty Icon Dictionary\n IconDictionary = NameDictionary.Make( IconMgr.GetIcons.Count )\n \n ' Loops through all the icons and adds them\n ' to the new dictioanary\n \n For each aIcon in IconMgr.GetIcons.Clone\n IconDictionary.Add( aIcon )\n end\n \n Av.GetProject.GetObjecttag.Set(\"IconDictionaryResouce\",IconDictionary)\n\n Return (IconDictionary)\n end" ) (Script.54 Name: "AGI/LIB (MassGIS) MG.Add/Remove ThemeID from Thmiddct" SourceCode: "' Name:AGI/LIB (MassGIS) MG.Add/Rem0ove ThemeID from Thmiddct\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:22:38 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:22:38 1999\n'------------------------------------------------------------------------\n\n theEvent = Self.Get(0)\n \n ThmIDDct = Av.GetProject.GetObjecttag.Get(\"Thmiddct\")\n Men1Dct = Av.GetProject.GetObjecttag.Get(\"Men1Dct\")\n Men12Dct = Av.GetPr oject.GetObjecttag.Get(\"Men12Dct\")\n\n if (theEvent = \"Remove\") then\n \n ThemeID = Self.Get(1).Get(0)\n Men1 = Self.Get(1).Get(1).AsString.Trim\n Men2 = Self.Get(1).Get(2).AsString.Trim\n \n if (ThemeID.Is(List)) then\n ThemeID = ThemeID.Get(0)\n end\n \n '--------------------------------------------------------------------------- \n Men1List = Men1Dct.Get(Men1) \n \n if (Men1List.Is(List)) then\n if (Men1List.FindbyValue(Men2) <> -1) then\n Men1List.Remove(Men1List.FindbyValue(Men2))\n Men1Dct.Set(Men1.AsString.Trim,Men1List)\n end\n end\n\n '---------------------------------------------------------------------------\n \n if (Men12Dct.Get(Men1+Men2).is(List)) then\n \n if (Men12Dct.Get(Men1+Men2).Count = 1) then\n Men12Dct.Remove(Men1+Men2)\n elseif (Men12Dct.Get(Men1+Men2).Count > 1) then\n if (Men12Dct.Get(Men1+Men2).Find byValue(ThemeID) <> -1) then\n theList = Men12Dct.Get(Men1+Men2)\n theList.Remove(Men12Dct.Get(Men1+Men2).FindbyValue(ThemeID))\n Men12Dct.Set(Men1+Men2,theList)\n end\n end\n end\n \n if (Men12Dct.Get(Men1+Men2).is(List)) then\n if (Men12Dct.Get(Men1+Men2).Count = 0) then\n Men1Dct.Remove(Men1)\n end\n end\n\n if (ThmIDDct.Get(ThemeID).is(List) ) then\n ThmIDDct.Remove(ThemeID)\n end \n \n Av.PurgeObjects\n Return nil \n end" ) (Script.55 Name: "AGI/LIB (MassGIS) MG.Dict Rebuild" SourceCode: "' Name: AGI/LIB (MassGIS) MG.Dict Rebuild\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Apr 03 17:31:52 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n' This script rebuilds project dictionaries. Input is either Nil\n' or a prefix string. If the input is\n' nil, then the script produces a msgbox so that\n' the user can choose the type of rebuild\n' the want.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Apr 03 17:31:52 1998\n'------------------------------------------------------------------------\n\n Prefix = Self\n QuickRebuild = false\n \n if (Self.Is(List)) then\n Prefix = Self.Get(0)\n \n if (Self.Count = 2) then \n QuickRebuild = Self.Get(1)\n end\n end\n \n if (QuickRebuild.is(Boolean).not) then\n QuickRebuild = false\n end\n \n if (Prefix = Nil) then\n PrefixList = {\"2D Theme Inventory\",\"3D Theme Inventory\",\n \"2D Extent Inventory \",\"3D Extent Inventory\",\n \"Link Parameters\",\"Alias Parameters\"}\n \n st1 = \"Choose the type of Dictionary you want to rebuild.\"\n st2 = \"Rebuild Dictionaries\"\n Prefix = Msgbox.Listasstring(PrefixList,st1,st2)\n if (Prefix = Nil) then\n Return Nil\n end\n \n if (Prefix = \"2D Theme Inventory\") then\n Prefix = \"inv_\"\n end\n if (Prefix = \"3D Theme Inventory\") then\n Prefix = \"inv3d_\"\n end\n \n if (Prefix = \"2D Extent Inventory\") then\n Prefix = \"ext_\"\n end\n \n if (Prefix = \"3D Extent Inventory\") then\n Prefix = \"ext3d_\"\n end \n \n if (Prefix = \"Alias Parameters\") then\n Prefix = \"als_\"\n end\n \n if (Prefix = \"Link Parameters\") then\n Prefix = \"lnk_\"\n end \n end\n \n Prjdct = Av.GetProject.GetObjectTag\n if (Prjdct = Nil) then\n Av.GetProject.SetObjectTag(Dictionary.Make(10))\n Prjdct = Av.GetProject.GetObjectTag\n end\n \nAv.PurgeObjects \nPrefix = Prefix.asstring.lcase\n'------------------------------------------------------------------------------------\n\nif (Prefix.contains(\"lnk_\")) then\n\n Av.Run(\"AGI/LIB (MassGIS) MG.Join/Link Dct\",(av.run(\"AGI/LIB (MassGIS) GetVtabList\",{\"lnk_\",false})))\n \n Return nil\n end\n \nif (Prefix.contains(\"als_\")) then\n\n Av.Run(\"AGI/LIB (MassGIS) MG.Inquery Dct\",(av.run(\"AGI/LIB (MassGIS) GetVtabList\",{\"als_\",false})))\n \n Retu rn nil\n end\n\nif (Prefix.contains(\"ext_\")) then\n\n Av.Run(\"AGI/LIB (MassGIS) MG.Dict_ExtDct\",(av.run(\"AGI/LIB (MassGIS) GetVtabList\",{\"ext_\",false})))\n \n _ProjectExtentDctError = false\n Return nil\n end\n \nif (Prefix.contains(\"Inv3d_\")) then\n\n Av.run(\"AGI/LIB (MassGIS) MG.Dict_3DThmiddct\",(Av.run(\"AGI/LIB (MassGIS) GetVtabList\",{\"inv3d_\",false})))\n \n Return nil\n end\n \nif (Prefix.contains(\"inv_\")) then\n \n Av.Run(\"AGI/LIB (MassGIS) MG.Dict_Thmiddct \",(Av.run(\"AGI/LIB (MassGIS) GetVtabList\",{\"inv_\",false})))\n \n Return nil\n end\n \nAv.PurgeObjects" ) (Script.56 Name: "AGI/LIB (MassGIS) MG.Dict_ExtDct" SourceCode: "' Name: AGI/LIB (MassGIS) MG.Dict_extdct\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Apr 03 17:31:52 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Apr 03 17:31:52 1998\n'------------------------------------------------------------------------\n\n VtabList = Self\n \n TotalRecNum = 0\n for each theVtab in VtabList\n TotalRecNum = TotalRecNum + theVtab.GetNumRecords.Clone\n end\n \n TotalRecString = TotalRecNu m.AsString\n \n if (TotalRecNum < 100) then\n TotalRecNum = 100\n end\n\n ExtDct = Dictionary.Make(100)\n ZmenDct = Dictionary.Make(100)\n Zmen2Dct = Dictionary.Make(100)\n ExtFileNameDct = Dictionary.Make(100)\n \n For each theVtab in VtabList\n \n Av.ShowMsg(\"Reading Extents from \"+theVtab.AsString+\"...\")\n counter = 0\n \n Av.ShowStopButton\n NumOfRecs = theVtab.GetNumRecords\n \n for each r in theVtab\n \n counter = counter + 1\n pcnt = ((counter/theVtab.GetNumRecords) * 100).Round\n DoMore = Av.SetStatus(pcnt)\n Av.ShowMsg(\"Reading Extents from \"+theVtab.AsString+\" (\"+pcnt.AsString+\"% \"+Counter.AsString+\"/\"+NumOfRecs.AsString+\")\")\n \n men1 = theVtab.ReturnValue(theVtab.FindField(\"men1\"),r)\n men2 = theVtab.ReturnValue(theVtab.FindField(\"men2\"),r)\n \n if (theVtab.FindField(\"Men3\") <> nil) then\n Men3 = theVtab.ReturnValue(theVtab.FindField(\"men3\"),r)\n else\n Men3 = Men2.Clone\n end\n \n Xmin = theVtab.ReturnValue(theVtab.FindField(\"xmin\"),r)\n Ymin = theVtab.ReturnValue(theVtab.FindField(\"ymin\"),r)\n Xmax = theVtab.ReturnValue(theVtab.FindField(\"xmax\"),r)\n Ymax = theVtab.ReturnValue(theVtab.FindField(\"ymax\"),r)\n Active = theVtab.ReturnValue( theVtab.FindField(\"active\"),r)\n \n if (Active.AsString.LCase = \"n\") then\n Continue\n end\n \n men1men2 = men1+men2\n \n theRect = Rect.MakeXY(xmin,ymin,xmax,ymax)\n\n ExtFileNameDct.Add(Men1Men2+Men3,theVtab.GetBaseTableFileName.Clone)\n \n if (zmendct.Get(men1)=nil) then \n men2lst = {men2}\n ZmenD ct.Add(men1,men2lst) \n else\n men2lst = ZmenDct.Get(men1) \n if (men2lst.FindByValue(men2) = -1) then \n men2lst = men2lst.Add(men2)\n ZmenDct.Set(men1,men2lst) \n end \n end \n \n '----------------------------------------------------- -------\n ' Now populating extdct\n men1men2 = men1+men2\n \n ' If men1men2 is not already a key in zmen2dct, add the current\n ' men3 to men3lst and add the current men1men2,men3lst to zmen2dct\n \n if (zmen2dct.Get(men1men2) = nil) then\n men3lst = {men3}\n zmen2dct.Add(men1men2, men3lst)\n else\n ' If men1men2 is already in zmen2dct, but if the curr ent men3\n ' is not already in the corresponding men3lst,\n ' then add the current men3 to men3lst and update zmen2dct\n \n men3lst = zmen2dct.Get(men1men2)\n \n if (men3lst.FindByValue(men3) = -1) then\n men3lst = men3lst.Add(men3)\n zmen2dct.Set(men1men2, men3lst)\n end\n end\n \n ' Now populate extdct\n men1men2men3 = men1men2 + men3 \n \n Extdct.Set(men1men2men3,therect) \n \n if (not doMore) then\n Str1 = \"Are you sure that you want to stop now?\"\n Str2 = \"\"\n if (Msgbox.YesNo(Str1,Str2,true)) then \n break\n end\n end\n end\n \n end\n \n if (ExtDct.ReturnKeys.Count = 0) then\n ExtDict = nil\n ZmenDct = nil\n Zmen2Dct = nil\n ExtFileNameDct = nil\n end\n \n Av.ClearWorkingStatus\n \n Av.GetProject.GetObjecttag.Set(\"ExtDict\",ExtDct)\n Av.GetProject.GetObjecttag.Set(\"ZmenDct\",ZmenDct)\n Av.GetProject.GetObjecttag.Set(\"Zmen2Dct\",Zmen2Dct)\n Av.GetProject.GetObjecttag.Set(\"ExtFileNameDct\",ExtFileNameDct)" ) (Script.57 Name: "AGI/LIB (MassGIS) MG.Dict_ThmidDct" SourceCode: "' Name: AGI/LIB (MassGIS) MG.Dict_thmiddct\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Apr 03 17:31:52 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n' This script was adapted from the MassGIS Dctpopulate script\n' that rebuilds project dictionaries. This script rebuilds the\n' thmiddct dictionary.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Apr 03 17:31:52 1998\n'------------------------------------------------------------ ------------\n\n thePrjDct = Av.GetProject.GetObjecttag\n UseAGICodeBase = thePrjDct.Get(\"AGICodeBase\")\n HideDisabledIDs = true\n IsUNIXOS = (System.GetOS.AsString.Contains(\"UNIX\"))\n\n'------------------------------------------------------------------------\n\n VtabList = Self\n\n if (VtabList.is(Vtab)) then\n \n if (Av.GetProject.GetObjecttag.Get(\"thmiddct\").is(Dictionary).Not) then\n Av.GetProject.GetObjecttag.Set(\"thmiddct\",Dictionary.Make(100))\n end\n\n if (Av.GetProject.GetObjecttag.Get(\"Men1Dct\").is(Dictionary).Not) then\n Av.GetProject.GetObjecttag.Set(\"Men1Dct\",Dictionary.Make(100))\n end\n \n if (Av.GetProject.GetObjecttag.Get(\"Men12Dct\").is(Dictionary).Not) then\n Av.GetProject.GetObjecttag.Set(\"Men12Dct\",Dictionary.Make(100))\n end\n\n if (Av.GetProject.GetObjecttag.Get(\"Men123Dct\").is(Dictionary).Not) then\n Av.GetProject.GetObjecttag.Set(\"Men123Dct\",Dictionary.Make(100))\n end\n \n ThmidDct = Av.GetProject.GetObjecttag.Get(\"thmiddct\")\n Men1Dct = Av.GetProject.GetObjecttag.Get(\"Men1Dct\")\n Men12Dct = Av.GetProject.GetObjecttag.Get(\"Men12Dct\")\n Men123Dct = Av.GetProject.GetObjecttag.Get(\"Men123Dct\")\n \n theVtab = VtabList\n theBitMap = theVtab.GetSelection\n \n if (theVtab.GetNumSelRecords <> 1) then\n Return nil\n end\n \n For each r in theBitMap\n ThemeID = theVtab.ReturnValue(theVtab.FindField(\"ThemeID\"),r)\n ThmidDct.Remove(ThemeID.AsString)\n end\n \n For each r in theBitMap\n \n thmid = theVtab.ReturnValue(theVtab.FindField(\"Themeid\"), r) ' 0\n men1 = theVtab.ReturnValue(theVtab.FindField(\"men1\"), r) ' 1\n men2 = theVtab.ReturnValue(theVtab.FindField(\"men2\"), r) ' 2 \n \n if (theVtab.FindField(\"men2\").is(Field)) then\n men3 = th eVtab.ReturnValue(theVtab.FindField(\"men3\"),r)\n else\n men3 = men2.Clone\n end\n \n if ((Men1.AsString.Trim.isNull) and (Men2.AsString.Trim.isNull)) then\n Continue\n end\n \n Index3 = theVtab.ReturnValue(theVtab.FindField(\"menleg\"), r) ' 3\n Index4 = theVtab.ReturnValue(theVtab.FindField(\"thmlbl\"), r) ' 4\n Index5 = theVtab.ReturnValue(theVtab.FindField(\"f trtyp\"), r) ' 5\n Index6 = theVtab.ReturnValue(theVtab.FindField(\"defleg\"), r) ' 6\n Index7 = theVtab.ReturnValue(theVtab.FindField(\"active\"), r) ' 7\n Index8 = theVtab.ReturnValue(theVtab.FindField(\"srcfile\"), r) ' 8\n Index9 = theVtab.ReturnValue(theVtab.FindField(\"qry\"), r) ' 9\n Index10 = theVtab.ReturnValue(theVtab.FindField(\"lufld\"), r) ' 10\n Index11 = theVtab.ReturnValue(theVtab.FindField(\"lufile\"), r) ' 11\n Index12 = theVtab.ReturnValue(theVtab.FindField(\"symop\"), r) ' 12\n Index13 = theVtab.ReturnValue(theVtab.FindField(\"legfld\"), r) ' 13\n Index14 = theVtab.ReturnValue(theVtab.FindField(\"legfile\"), r) ' 14\n Index15 = theVtab.ReturnValue(theVtab.FindField(\"scalemin\"), r) ' 15\n Index16 = theVtab.ReturnValue(theVtab.FindField(\"scalemax\"), r) ' 16\n Index17 = theVtab.ReturnValue(theVtab.FindField(\"comments\"), r) ' 17 \n LastAOI = Rect.MakeEmpty ' 18 \n Src_DBF = TheVtab.GetBaseTableFileName.AsString ' 19\n HotLink = \"\" ' 20\n RecNum = r.AsString.AsNumber ' 21\n \n if (Index7.AsString.isNull) then\n Index7 = \"Y\"\n end\n \n if (Index7 = \"N\") then\n Continue\n end\n\n if (IsUNIXOS) then\n Index8 = Index8.AsString.Trim.Substitute (\"\\\",\"/\")\n Index14 = Index14.AsString.Trim.Substitute(\"\\\",\"/\")\n Index11 = Index11.AsString.Trim.Substitute(\"\\\",\"/\")\n else\n Index8 = Index8.AsString.Trim.Substitute (\"/\",\"\\\")\n Index14 = Index14.AsString.Trim.Substitute(\"/\",\"\\\")\n Index11 = Index11.AsString.Trim.Substitute(\"/\",\"\\\") \n end\n \n '------------------------------------------------------------\n ' Check to make sure that the current themeid Value is not already\n ' in the Thmiddct. If it is then search for the next free \n ' themeID value and add that value\n \n thmID = thmID.AsString\n HoldId = thmID.AsString\n \n if (Thmiddct.Get(thmid.AsString) <> nil) then\n \n IntervalValue = Thmid.AsString.AsNumber + 1000\n \n if (Thmiddct.Get(IntervalValue.AsString) = nil) then\n Thmid = IntervalValue.AsString\n else\n While (Thmiddct.Get(IntervalValue.AsString) <> nil)\n IntervalValue = IntervalValue + 1\n if (Thmiddct.Get(IntervalValue.AsString) = nil) then\n Thmid = IntervalValue.AsString\n e nd\n end\n end\n thmID = {Thmid.AsString,HoldID.AsString}\n end\n \n attlst = { thmid,men1.trim,{men2.Trim,Men3.Trim},Index3.trim,Index4.trim,\n Index5.trim,Index6.trim,Index7.trim,Index8,Index9.trim,\n Index10.trim,Index11.trim,Index12.trim,Index13.trim,Index14.trim,\n Index15,Index16,Index17.trim,lastAOI,nil,src _dbf.trim,\n hotlink.trim,RecNum}\n \n if (Thmid.is(List)) then\n Thmid = thmid.Get(0)\n end\n \n '------------------------------------------------------------\n \n thmiddct.Set(thmid.AsString,attlst)\n Av.ShowMsg(\"Current Thmid:\"+thmid.asstring)\n \n if (men1dct.Get(men1)=nil) then \n men2lst = {men2}\n men1dct.Add(men1,men2lst) \n else\n men2lst = men1dct.Get(men1) \n if (men2lst.FindByValue(men2) = -1) then \n men2lst = men2lst.Add(men2)\n men1dct.Set(men1,men2lst) \n end \n end \n \n '-----------------------------------------------------------------------------\n ' Populate Men21Dict\n \n Men1Men2 = Men1.AsString+Men2.AsString \n \n if (men12dct.Get(Men1Men2) = nil) then\n men3lst = {men3}\n men12dct.Add(Men1Men2, men3lst)\n else\n men3lst = men12dct.Get(Men1Men2)\n if (men3lst.FindByValue (men3) = -1) then\n men3lst = men3lst.Add(men3)\n men12dct.Set(Men1Men2, men3lst)\n end\n end\n \n if (men123dct.Get(men1+men2+men3) = nil) then\n thmidlst = {thmid}\n men123dct.Add(men1+men2+men3,thmidlst)\n else \n thmidlst = men123dct.Get(men1+men2+men3)\n thmidlst.Add(thmid)\n men123dct.S et(men1+men2+men3,thmidlst)\n end\n end\n \n Av.GetProject.GetObjecttag.Set(\"ThmidDct\",ThmidDct)\n\n Av.PurgeObjects\n Return Nil\n end\n \n'------------------------------------------------------------------------\n \n TotalRecNum = 0\n for each theVtab in VtabList\n TotalRecNum = TotalRecNum + theVtab.GetNumRecords.Clone\n end\n \n TotalRecString = TotalRecNum.AsString\n \n if (TotalRecNum < 100) then\n TotalRecNum = 100\n end\n \n Th middct = Dictionary.Make(TotalRecNum)\n ThmidDctAlt = Dictionary.Make(TotalRecNum)\n Men1dct = Dictionary.Make(TotalRecNum) \n Men12Dct = Dictionary.Make(TotalRecNum)\n Men123Dct = Dictionary.Make(TotalRecNum)\n\n Av.ShowMsg(\"Building Thmiddct.\")\n\n For Each theVtab in VtabList\n \n if (theVtab.GetNumRecords = 0) then\n Continue\n end\n \n counter = 0 \n NumOfRecs = theVtab.GetNu mRecords\n Av.ShowStopButton\n \n For each r in theVtab\n \n counter = counter + 1\n pcnt = ((counter/theVtab.GetNumRecords) * 100).Round\n DoMore = Av.SetStatus(pcnt)\n Av.ShowMsg(\"Reading ThemeID from \"+theVtab.AsString+\" (\"+pcnt.AsString+\"% \"+Counter.AsString+\"/\"+NumOfRecs.AsString+\")\")\n \n thmid = theVtab.ReturnValue(theVtab.FindField(\"Themeid\"), r) ' 0\n men1 = theVtab.ReturnValue( theVtab.FindField(\"men1\"), r) ' 1\n men2 = theVtab.ReturnValue(theVtab.FindField(\"men2\"), r) ' 2 \n \n if (theVtab.FindField(\"men2\").is(Field)) then\n men3 = theVtab.ReturnValue(theVtab.FindField(\"men3\"),r)\n else\n men3 = men2.Clone\n end\n \n Index3 = theVtab.ReturnValue(theVtab.FindField(\"menleg\"), r) ' 3\n Index4 = theVtab.ReturnValue(theVtab.FindField(\"thmlbl\") , r) ' 4\n Index5 = theVtab.ReturnValue(theVtab.FindField(\"ftrtyp\"), r) ' 5\n Index6 = theVtab.ReturnValue(theVtab.FindField(\"defleg\"), r) ' 6\n Index7 = theVtab.ReturnValue(theVtab.FindField(\"active\"), r) ' 7\n Index8 = theVtab.ReturnValue(theVtab.FindField(\"srcfile\"), r) ' 8\n Index9 = theVtab.ReturnValue(theVtab.FindField(\"qry\"), r) ' 9\n Index10 = theVtab.ReturnValue(theVtab.FindField(\"lufld\"), r) ' 10\n I ndex11 = theVtab.ReturnValue(theVtab.FindField(\"lufile\"), r) ' 11\n Index12 = theVtab.ReturnValue(theVtab.FindField(\"symop\"), r) ' 12\n Index13 = theVtab.ReturnValue(theVtab.FindField(\"legfld\"), r) ' 13\n Index14 = theVtab.ReturnValue(theVtab.FindField(\"legfile\"), r) ' 14\n Index15 = theVtab.ReturnValue(theVtab.FindField(\"scalemin\"), r) ' 15\n Index16 = theVtab.ReturnValue(theVtab.FindField(\"scalemax\"), r) ' 16\n Index17 = theVtab.Ret urnValue(theVtab.FindField(\"comments\"), r) ' 17 \n LastAOI = Rect.MakeEmpty ' 18 \n Src_DBF = TheVtab.GetBaseTableFileName.AsString ' 19\n HotLink = \"\" ' 20\n RecNum = r.AsString.AsNumber ' 21\n \n if (Index7.AsString.isNull) then\n Index7 = \"Y\"\n end\n \n if (Index7 = \"N\") then\n Continue\n end\n \n if (IsUNIXOS) then\n Index8 = Index8.AsString.Trim.Substitute (\"\\\",\"/\")\n Index14 = Index14.AsString.Trim.Substitute(\"\\\",\"/\")\n Index11 = Index11.AsString.Trim.Substitute(\"\\\",\"/\")\n else\n Index8 = Index8.AsString.Trim.Substitute (\"/\",\"\\\")\n Index14 = Index14.AsString.Trim.Substitute(\"/\",\"\\\")\n Index11 = Index11.AsString.Trim.Substitute(\"/\",\"\\\") \n end\n \n '------------------------------------------------------------\n ' Check to make sure that the current themeid Value is not already\n ' in the Thmiddct. If it is then search for the next free \n ' themeID value and add that value\n \n thmID = thmID.AsString\n HoldId = thmID.AsString\n \n if (Thmiddct.Get(thmid.AsString) <> nil) then\n \n IntervalValue = Thmid.AsString.AsNumber + 1000\n \n if (Thmiddct.Get(IntervalValue.AsString) = nil) then\n Thmid = IntervalValue.AsString\n else\n While (Thmiddct.Get(IntervalValue.AsString) <> nil)\n IntervalValue = IntervalValue + 1\n if (Thmiddct.Get(IntervalValue.AsString) = nil) then\n Thmid = IntervalValue.AsString\n end\n end\n end\n thmID = {Thmid.AsString,HoldID.AsString}\n end\n \n\n attlst = { thmid,men1.trim,{men2.Trim,Men3.Trim},Index3.trim,Index4.trim,\n Index5.trim,Index6.trim,Index7.trim,Index8,Index9.trim,\n Index10.trim,Index11.trim,Index12.trim,Index 13.trim,Index14.trim,\n Index15,Index16,Index17.trim,lastAOI,nil,src_dbf.trim,\n \"\",RecNum}\n \n if (Thmid.is(List)) then\n Thmid = thmid.Get(0)\n end\n \n '------------------------------------------------------------\n \n thmiddct.Set(thmid.AsString,attlst) \n\n '-------------------------------------------------------------- ---------------\n \n if (men1dct.Get(men1)=nil) then \n men2lst = {men2}\n men1dct.Add(men1,men2lst) \n else\n men2lst = men1dct.Get(men1) \n if (men2lst.FindByValue(men2) = -1) then \n men2lst = men2lst.Add(men2)\n men1dct.Set(men1,men2lst) \n end \n end \n \n '-----------------------------------------------------------------------------\n ' Populate Men21Dict\n \n Men1Men2 = Men1.AsString+Men2.AsString \n \n if (men12dct.Get(Men1Men2) = nil) then\n men3lst = {men3}\n men12dc t.Add(Men1Men2, men3lst)\n else\n men3lst = men12dct.Get(Men1Men2)\n if (men3lst.FindByValue(men3) = -1) then\n men3lst = men3lst.Add(men3)\n men12dct.Set(Men1Men2, men3lst)\n end\n end\n \n if (men123dct.Get(men1+men2+men3) = nil) then\n thmidlst = {thmid}\n men123dct.Add(men1+men2+men3,thmidlst)\n else \n thmidlst = men123dct.Get(men1+men2+men3)\n thmidlst.Add(thmid)\n men123dct.Set(men1+men2+men3,thmidlst)\n end\n\n '-----------------------------------------------------------------------------\n \n if (not doMore) then\n Str1 = \"Are you sure that you want to stop now?\"\n Str2 = \"\"\n if (Msgbox.YesNo(Str1,Str2,true)) then \n break\n end\n end\n\n end\n end\n \nAv.ClearWorkingStatus \n\nAv.GetProject.GetObjecttag.Set(\"thmiddct\",thmiddct)\nAv.GetProject.GetObjecttag.Set(\"Men1Dct\",Men1dct)\nAv.GetProject.GetObjecttag.Set(\"Men12Dct\",Men12dct)\nAv.GetProject.GetObjecttag.Set(\"Men123Dct\",Men123dct)\n" ) (Script.58 Name: "AGI/LIB (MassGIS) MG.GetDictionary" SourceCode: "' Name:AGI/LIB (MassGIS) MG.GetDictionary\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:23:09 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:23:09 1999\n'------------------------------------------------------------------------\n\n ForceDictionaryUpdate = System.IsControlKeyDown\n\n if (Self.is(List)) then\n theName = Self.Get(0)\n ReportMessages = Self.Get(1)\n else\n theName = (Self).AsString\n ReportMessages = false\n end\n \n thePrjDct = Av.GetProject.GetObjecttag\n \n if (thePrjDct.is(Dictionary).not) then\n Av.GetProject.GetObjecttag(Dictionary.Make(10))\n thePrjDct = Av.GetProject.GetObjecttag\n end\n \n theDictionary = thePrjDct.Get(theName)\n \n if (_ProjectDctError.is(Boolean).Not) then\n _ProjectDctError = false\n end\n \n if (_ProjectDctError) then\n ReportMessages = true\n end\n \n if (theDictionary = nil) then\n if (ReportMessage s) then\n Msgbox.Warning(\"There seems to be a problem locating the \"+theName.Proper+\n \" Dictionary. It does not exist in the Project Dictionary.\",\n \"Dictionary Problem...\")\n end\n \n if (ForceDictionaryUpdate) then\n \n Str1 = \"There appears to be some type of Dictionary. Do you want to attempt a full rebuild.\"\n Str2 = \"Please Note...\"\n if (Msgbox.YesNo(Str1,Str2,true)) then\n \n theDictionary = thePrjDct.Get(theName)\n Av.Run(\"AGI/LIB (MassGIS) MG.Dict Rebuild\",\"inv_\")\n Av.Run(\"AGI/LIB (MassGIS) MG.Dict Rebuild\",\"ext_\")\n \n Return (theDictionary)\n end\n end\n \n Return nil\n end\n \n if (theDictionary.is(Dictionary).not) then\n if (ReportMessages) then\n Msgbox.Warning(\"There seems to be a problem locating the \"+theName.Proper+\n \" Dictionary. It does not appea r to be a dictionary exist.\",\n \"Dictionary Problem...\")\n end\n \n Return nil\n end\n \n Return (theDictionary)\n " ) (Script.59 Name: "AGI/LIB (MassGIS) MG.Inquery Dct" SourceCode: "' Name:AGI/LIB (MassGIS) MG.Inquery Dct\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:23:23 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:23:23 1999\n'------------------------------------------------------------------------\n\n VtabList = Self\n\n if (VtabList.is(List).Not) then\n \n if (Av.GetProject.GetObjecttag.Get(\"InquiryDct\").is(Dictionary).Not) then\n Av.GetProject.GetObjecttag. Set(\"InquiryDct\",Dictionary.Make(100))\n end\n\n if (Av.GetProject.GetObjecttag.Get(\"InquiryIDDct\").is(Dictionary).Not) then\n Av.GetProject.GetObjecttag.Set(\"InquiryIDDct\",Dictionary.Make(100))\n end\n\n if (Av.GetProject.GetObjecttag.Get(\"InquiryFileNameDct\").is(Dictionary).Not) then\n Av.GetProject.GetObjecttag.Set(\"InquiryFileNameDct\",Dictionary.Make(100))\n end\n \n InquiryFileNameDct = Av.GetProject.GetObjecttag.Get(\"InquiryFileNameDct\")\n InquiryDct = Av.GetProject.GetObjecttag.Get(\"InquiryDct\")\n InquiryIDDct = Av.GetProject.GetObjecttag.Get(\"Col1Dct\")\n \n InquiryFileNameDct.Remove(_CurrentThemeID.AsString)\n InquiryFileNameDct.Set(_CurrentThemeID.AsString,VtabList.GetBaseTableFileName.Clone)\n\n theVtab = VtabList\n theBitMap = theVtab.GetSelection\n \n For each r in theBitMap\n ThemeID = theVtab.ReturnValue(theVtab.FindField(\"ThemeID\"),r)\n \n Inquir yFileNameDct.Remove(ThemeID)\n FieldList = InquiryIDDct.Get(ThemeID.AsString)\n \n if (FieldList.is(List)) then\n For each fldNm in FieldList\n InquiryDct.Remove(ThemeID.AsString+fldNm.AsString)\n end\n end\n\n end\n \n\n For each r in theBitMap\n \n ThemeID = theVtab.ReturnValue(theVtab.FindField(\"ThemeID\"),r)\n ThemeFldName = theVtab.ReturnValue(theVtab.FindField(\"Tabl eField\"),r)\n FieldVisible = theVtab.ReturnValue(theVtab.FindField(\"Visible\"),r)\n FieldAlias = theVtab.ReturnValue(theVtab.FindField(\"Alias\"),r)\n \n if (InquiryIDDct.Get(ThemeID) = nil) then\n FieldNameLst = {ThemeFldName}\n InquiryIDDct.Add(ThemeID, FieldNameLst)\n else\n FieldNameLst = InquiryIDDct.Get(ThemeID)\n \n if (FieldNameLst.FindByValue(ThemeFldName) = - 1) then\n FieldNameLst.Insert(ThemeFldName)\n FieldNameLst.Add(theVtab.GetBaseTableFileName.Clone)\n FieldNameLst.RemoveDuplicates\n InquiryIDDct.Set(ThemeID, FieldNameLst)\n end\n \n end\n \n if (InquiryFileNameDct.Get(ThemeID).is(FileName).Not) then\n InquiryFileNameDct.Set(ThemeID,theVtab.GetBaseTableFileName) \n end\n\n if (InquiryDct.Get((ThemeID + ThemeFldName)) = nil) then\n InquiryDct.Add((ThemeID + ThemeFldName), {ThemeID, ThemeFldname, \n FieldVisible, FieldAlias})\n end\n\n end\n \n Av.GetProject.GetObjecttag.Set(\"InquiryDct\",InquiryDct)\n Av.GetProject.GetObjecttag.Set(\"Col1Dct\",InquiryIDDct)\n Av.PurgeObjects\n Return Nil\n end\n \n'----------------------------- ------------------------------------------------------------------\n\n TotalRecNum = 0\n for each theVtab in VtabList\n TotalRecNum = TotalRecNum + theVtab.GetNumRecords.Clone\n end\n \n TotalRecString = TotalRecNum.AsString\n \n if (TotalRecNum < 100) then\n TotalRecNum = 100\n end\n\n InquiryDct = Dictionary.Make(1000)\n InquiryIDDct = Dictionary.Make(1000)\n InquiryFileNameDct = Dictionary.Make(1000)\n \n For each theVtab in VtabList\n \n Av.ShowMsg(\"Bu ilding InQuery Dictionary.\")\n counter = 0\n Av.ShowStopButton\n \n For each r in theVtab\n \n counter = counter + 1\n pcnt = ((counter/theVtab.GetNumRecords) * 100).Round\n \n if (pcnt.Mod(5) = 0) then\n Av.SetStatus(pcnt)\n end\n \n ThemeID = theVtab.ReturnValue(theVtab.FindField(\"ThemeID\"),r)\n ThemeFldName = theVtab.ReturnValue(theVtab.Fin dField(\"TableField\"),r)\n FieldVisible = theVtab.ReturnValue(theVtab.FindField(\"Visible\"),r)\n FieldAlias = theVtab.ReturnValue(theVtab.FindField(\"Alias\"),r)\n \n if (InquiryIDDct.Get(ThemeID) = nil) then\n FieldNameLst = {ThemeFldName}\n InquiryIDDct.Add(ThemeID, FieldNameLst)\n else\n FieldNameLst = InquiryIDDct.Get(ThemeID)\n \n if (FieldNameLst.FindByValue(Theme FldName) = -1) then\n FieldNameLst.Insert(ThemeFldName)\n FieldNameLst.RemoveDuplicates\n InquiryIDDct.Set(ThemeID, FieldNameLst)\n end\n \n end\n \n if (InquiryFileNameDct.Get(ThemeID).is(FileName).Not) then\n InquiryFileNameDct.Set(ThemeID,theVtab.GetBaseTableFileName) \n end\n \n UniqueStr = (Theme ID + ThemeFldName)\n \n if (InquiryDct.Get(UniqueStr) = nil) then\n InquiryDct.Add(UniqueStr, {ThemeID, ThemeFldname, FieldVisible, FieldAlias})\n end\n \n end\n end\n\nAv.GetProject.GetObjecttag.Set(\"InquiryDct\",InquiryDct)\nAv.GetProject.GetObjecttag.Set(\"Col1Dct\",InquiryIDDct)\nAv.GetProject.GetObjecttag.Set(\"InquiryFileNameDct\",InquiryFileNameDct)" ) (Script.60 Name: "AGI/LIB (MassGIS) MG.Join/Link Dct" SourceCode: "' Name:AGI/LIB (MassGIS) MG.Join/Link Dct\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:23:33 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:23:33 1999\n'------------------------------------------------------------------------\n\n VtabList = Self\n\n if (VtabList.is(List).Not) then\n\n if (Av.GetProject.GetObjecttag.Get(\"JoinLinkDct\").is(Dictionary).Not) then\n Av.GetProject.GetObjecttag.Set( \"JoinLinkDct\",Dictionary.Make(100))\n end\n \n JoinLinkDct = Av.GetProject.GetObjecttag.Get(\"JoinLinkDct\")\n JoinLinkDct.Remove(_CurrentThemeID.AsString)\n JoinLinkDct.Set(_CurrentThemeID.AsString,VtabList.GetBaseTableFileName.Clone)\n \n Av.GetProject.GetObjecttag.Set(\"JoinLinkDct\",JoinLinkDct)\n Av.PurgeObjects\n Return Nil\n end\n \n'-----------------------------------------------------------------------------------------------\n TotalRecNu m = 0\n for each theVtab in VtabList\n TotalRecNum = TotalRecNum + theVtab.GetNumRecords.Clone\n end\n \n TotalRecString = TotalRecNum.AsString\n \n if (TotalRecNum < 100) then\n TotalRecNum = 100\n end\n\n JoinLinkDct = Dictionary.Make(1000)\n\n For each theVtab in VtabList\n \n Av.ShowMsg(\"Building Join/Link Dictionary.\")\n counter = 0\n Av.ShowStopButton\n \n For each r in theVtab\n \n counter = counter + 1\n p cnt = ((counter/theVtab.GetNumRecords) * 100).Round\n \n if (pcnt.Mod(5) = 0) then\n Av.SetStatus(pcnt)\n end\n \n ThemeID = theVtab.ReturnValue(theVtab.FindField(\"ThemeID\"),r)\n \n if (JoinLInkDct.Get(ThemeID.AsString).is(FileName)) then\n Continue\n else\n JoinLinkDct.Set(ThemeID.AsString,theVtab.GetBaseTableFileName.Clo ne)\n end\n \n end\n end\n\nAv.GetProject.GetObjecttag.Set(\"JoinLinkDct\",JoinLinkDct)\n" ) (Script.61 Name: "AGI/LIB (MassGIS) MG.UpdateDictionary" SourceCode: "' Name:AGI/LIB (MassGIS) MG.UpdateDictionary\n' Headline:\n' Called By: AGI/TMT (MassGIS) ThemeID.EditID\n' Calls To: None\n'\n' Author: Stephan Smith (Based upon the previous MassGIS and AGI Scripts)\n' Date: Fri Feb 26 13:13:43 1999\n'\n' Requires: Thmiddct (Dictionary)\n'\n' Returns: None (Places Men1Dct and Men12Dct back into the Project \n' object tag)\n'\n' Comments: This script rebuilds the Men12dct and the Men1dct Dictionaries\n' using the Thmiddct Dictionary. This is not a full rebu ild. It \n' does not access the original DBF vtabs in the mapped resources.\n' It uses the first and second'nd list events to update changes\n' that effect the way ids are accessed.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Feb 26 13:13:43 1999\n'------------------------------------------------------------------------------\n\n Thmiddct = Self\n \n Men1dct = Dictionary.Make(Thmiddct.ReturnKeys.Count) \n Men12Dct = Dictionary.Make(Thmiddct.ReturnKey s.Count)\n Men123Dct = Dictionary.Make(Thmiddct.ReturnKeys.Count)\n \n for each anID in Thmiddct.ReturnKeys\n\n Clist = Thmiddct.Get(anID)\n\n if (Clist.is(List)) then\n men1 = CList.Get(1).AsString.Trim\n men2 = Clist.Get(2)\n Men3 = \"\"\n \n if (Men2.is(list)) then\n Men3 = Men2.Get(1)\n Men2 = Men2.Get(0)\n end\n \n '-------------------------------------------------------------- ---------------\n \n if (men1dct.Get(men1)=nil) then \n men2lst = {men2}\n men1dct.Add(men1,men2lst) \n else\n men2lst = men1dct.Get(men1) \n if (men2lst.FindByValue(men2) = -1) then \n men2lst = men2lst.Add(men2)\n men1dct.Set(me n1,men2lst) \n end \n end \n \n '-----------------------------------------------------------------------------\n ' Populate Men21Dict\n \n Men1Men2 = Men1.AsString+Men2.AsString \n \n if (men12dct.Get(Men1Men2) = nil) then\n men3lst = {men3}\n men12dct.Add(Men1Men2, men3lst)\n e lse\n men3lst = men12dct.Get(Men1Men2)\n if (men3lst.FindByValue(men3) = -1) then\n men3lst = men3lst.Add(men3)\n men12dct.Set(Men1Men2, men3lst)\n end\n end\n \n if (men123dct.Get(men1+men2+men3) = nil) then\n thmidlst = {anID}\n men123dct.Add(men1+men2+men3,thmidlst)\n else \n thmidlst = men123dct.Get(men1+men2+me n3)\n thmidlst.Add(AnID)\n men123dct.Set(men1+men2+men3,thmidlst)\n end\n \n end\n end\n\nAv.GetProject.GetObjecttag.Set(\"Men1Dct\",Men1dct)\nAv.GetProject.GetObjecttag.Set(\"Men12Dct\",Men12dct)\nAv.GetProject.GetObjecttag.Set(\"Men123Dct\",Men123dct)\n" ) (Script.62 Name: "AGI/LIB (MassGIS) Project.CheckDictionaries" SourceCode: "' Name: AGI/LIB (MassGIS) Project.CheckDictionaries\n' Headline: Checks the status of Project Objecttag Dictionaries\n' Called By: Any Script\n' Calls To: None\n'\n' Author: Stephan Smith\n' Date: Fri Apr 03 17:31:52 1998\n'\n' Requires: none\n'\n' Returns: Boolean (true/false)\n'\n' Comments: This script checks the status of Project Dictionaries. If all\n' the dictionaries exist in the project dictionary (Objecttag)\n' then the script returns true. If any of the dictionaries do not\n' exis t then return false.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Apr 03 17:31:52 1998\n'------------------------------------------------------------------------\n\n CheckList = Self\n\n' Check to make sure the incoming SELF is a list\n if (CheckList.is(List).not) then \n Return nil \n end\n \n' Get the Objecttag of the project, if the objecttag is not a \n' dictionary then return false.\n\n Prjdct = Av.GetProject.GetObjectTag\n if (Prjdct.is(Dictionary).not) then\n Return False\n e nd\n \n' Loop through all the values in the the incoming list of strings\n For each PrjObj in CheckList\n if (Av.GetProject.GetObjectTag.get(PrjObj.AsString) = Nil) then\n ' If a Dictionary returns a nil, then the dictionary does not exist\n ' so the script will end and return the boolean value false.\n Msgbox.Info(PrjObj.asstring++\"is not valid.\",\"\")\n Return (False)\n end\n end\n\n' Since the script has not found a nil value, assume that all \n' dictionaries exist, retu rn true.\n Return(True)" ) (Script.63 Name: "AGI/LIB (MassGIS) SED.CoreRoutines" SourceCode: "' Name:AGI/LIB (MassGIS) SED.CoreRoutines\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Tue Aug 03 14:18:19 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Tue Aug 03 14:18:19 1999\n'------------------------------------------------------------------------\n\nif (Self.GetName = \"Find in Project\") then\n\n theDocs = av.GetProject.GetDocs.Clone\n \n ' Intialise the required variables\n save = nil\n SEdSearchString = \"\"\n \n ' Get last values if possible\n \n if (SELF.Is(Ctrl)) then\n save = SELF.GetObjectTag\n if ((nil <> save) AND (1 = save.Count)) then\n SEdSearchString = save.Get(0)\n end\n end\n \n 'Get search string\n theLabels = {\"Find \"}\n theDefaults = {SEdSearchString}\n \n theStrings = MsgBox.MultiInput(\"\", \n \"Find String\",\n theLabels, \n theDefaults)\n if (0 = theStrings.Count) then\n Return nil\n end\n \n ' Extract the entered parameters\n SEdSearchString = theStrings.Get(0)\n \n ' Process all of the SEd's\n findCount = 0\n for each aDoc in theDocs\n \n ' Ignore everything but SEd's\n if (aDoc.Is(SEd).Not) then\n break\n end\n \n ' Open the Doc\n isDocOpen = aDoc.GetWin.IsOpen\n if (isDocOpen.Not) then\n aDoc.GetWin.Resize(800,400)\n aDoc.GetWin.Open\n end\n \n ' Get the current cursor postion\n atBeginning = TRUE\n savePosition = aDoc.ReturnInsertPos\n \n if (0 <> savePosition) then\n atBeginning = FALSE\n end \n \n ' Reset the search position to the start of the script\n aDoc.SetInsertPos(0)\n \n ' Find each search string \n found = aDoc.Search(SEdSearchString) \n if ( atBeginning.Not) then\n aDoc.SetInsertPos(0)\n found = aDoc.Search(SEdSearchString)\n end\n \n ' If found, then replace it\n while (found)\n findCount = findCount + 1\n aDoc.GetWin.Invalidate\n yn = MsgBox.YesNo(\"Find next occurance of string '\"+SEdSearchString+\"'?\",\n \"Find String in Project\", \n TRUE)\n if (yn.Not) then\n ' Save to the object tag\n i f (SELF.Is(Ctrl)) then\n SELF.SetObjectTag({SEdSearchString})\n end\n\n Return nil\n end\n \n ' Find the next occurance\n found = aDoc.Search(SEdSearchString) \n end \n \n ' Restore cursor position in text if string not found \n aDoc.SetInsertPos(savePosition)\n \n ' Close the Doc\n if (isDocOpen.Not) then\n aDoc.GetWin.Close\n end\n end\n \n ' Save to the object tag\n if (SELF.Is(Ctrl)) then\n SELF.SetObjectTag({SEdSearchString})\n end\n \n ' Display results \n if (0 = findCount) then\n MsgBox.Info(\"The find string '\"+SEdSearchString+\"' was not found in the Project\",\n \"Find String in Project\")\n Av.ClearMsg\n else\n Av.ShowMsg(\"Find string '\"+SEdSearchString+\"' found '\"+\n findCount.AsString+\" times in the Project\")\n end\n\n Ret urn true\n end\n \n'------------------------------------------------------------------------\n\nif (Self.GetName = \"Find and Replace in Project\") then\n\n ' Get all of the documents in the Project\n theDocs = av.GetProject.GetDocs.Clone\n \n ' Intialise the required variables\n save = nil\n SEdSearchString = \"\"\n SEdReplaceString = \"\"\n SEdReplacePrompt = FALSE\n \n ' Get last values if possible\n if (SELF.Is(Ctrl)) then\n save = SELF .GetObjectTag\n \n if ((nil <> save) AND (3 = save.Count)) then\n SEdSearchString = save.Get(0)\n SEdReplaceString = save.Get(1)\n SEdReplacePrompt = save.Get(2)\n end\n end\n \n ' Get search string, replace string and prompt option\n \n theLabels = {\"Search for\"+tab, \"Replace with\"+tab,\"Prompt (Y/N)\"+tab}\n theDefaults = {SEdSearchString, SEdReplaceString}\n \n if (SEdReplacePrompt) then\n theDe faults.Add(\"Yes\")\n else\n theDefaults.Add(\"No\")\n end\n \n theStrings = MsgBox.MultiInput(\"\", \"Search & Replace\",theLabels,theDefaults)\n \n if (0 = theStrings.Count) then\n Return nil\n end\n \n ' Extract the entered parameters\n SEdSearchString = theStrings.Get(0)\n SEdReplaceString = theStrings.Get(1)\n SEdReplacePromptStr = theStrings.Get(2)\n \n ' Display the replace prompt for each occurance of the search string?\n SEdReplacePrompt = SEdReplacePromptStr.UCase.Contains(\"y\")\n \n ' Process all of the SEd's\n findCount = 0\n for each aDoc in theDocs\n \n ' Ignore everything but SEd's\n if (aDoc.Is(SEd).Not) then\n break\n end\n \n ' Open the Doc\n isDocOpen = aDoc.GetWin.IsOpen\n if (isDocOpen.Not) then\n aDoc.GetWin.Open\n end\n \n ' Get the current cursor postion\n atBeginning = TRUE\n savePosition = aDoc.Retur nInsertPos\n if (0 <> savePosition) then\n atBeginning = FALSE\n end \n \n ' Reset the search position to the start of the script\n aDoc.SetInsertPos(0)\n \n ' Find each search string \n found = aDoc.Search(SEdSearchString) \n if (atBeginning.Not) then\n aDoc.SetInsertPos(0)\n found = aDoc.Search(SEdSearchString)\n end\n \n ' If found, then replace it\n while (found)\n findCount = findCount + 1\n aDoc.GetWin.Invalidate\n \n if (SEdReplacePrompt) then\n changeIt = MsgBox.YesNoCancel(\"Replace '\"+SEdSearchString+\"'\"+NL+\n \"with '\"+SEdReplaceString+\"'\", \n \"Project Search & Replace\", \n TRUE) \n if (nil = changeIt) then\n break\n end\n else\n changeIt = TRUE\n end \n \n ' Replac e it\n if (changeIt) then\n aDoc.CutSelected \n aDoc.Insert(SEdReplaceString)\n end\n \n ' Find the next occurance\n found = aDoc.Search(SEdSearchString) \n end \n \n ' Restore cursor position in text if string not found \n aDoc.SetInsertPos(savePosition)\n \n ' Close the Doc\n if (isDocOpen.Not) then\n aDoc.GetWin.Close\n end\n end\n \n ' Save to the object tag\n if (SELF.Is(Ctrl)) then\n SELF.SetObjectTag({SEdSearchString})\n end\n \n ' Display results \n if (0 = findCount) then\n MsgBox.Info(\"The find string '\"+SEdSearchString+\"' was not found in the Project\",\n \"Project Search & Replace\")\n av.ClearMsg\n else\n av.ShowMsg(\"Find string '\"+SEdSearchString+\"' found '\"+findCount.AsString+\" times in the Project\")\n end\n\n Return true\n end\n'------------------------------------------------------------------------\n if (Self.GetName = \"Display Uncompiled Scripts\") then\n if ((self = Nil) or (self.is(Button))) then \n ' Get all of the documents in the Project\n theDocs = av.GetProject.GetDocs.Clone\n else\n theDocs = Self\n end\n \n ' Initialise the list\n uncompiledScripts = List.Make\n \n ' Process all of the SEd's\n for each aDoc in theDocs\n \n ' Ignore everything but SEd's\n if (aDoc.Is(SEd).Not) then\n break\n end\n \n ' Check to see if the SEd is compiled\n if (aDoc.IsCompiled.Not) then\n uncompiledScripts.Add(aDoc.GetName)\n end\n end\n \n ' Display results \n if (uncompiledScripts.Count > 0) then\n uncompiledScripts.Sort(TRUE)\n Str1 = \"Please note that these scripts \"+nl+\n \" are NOT compiled.\"\n Str2 = \"Uncompiled Scripts\"\n MsgBox.ListAsString(uncompiledScripts,Str1,Str2)\n else\n Msgbox.Info(\"All Scripts are compiled.\",\"\")\n end\n \n av.ClearMsg\n Return nil\n end\n'------------------------------------------------------------------------\n\nif (Self.GetName = \"Add Documentation\") then\n\n theDoc = Av.GetActiveDoc\n if (theDoc.is(SED).not) then \n Return Nil\n end\n \n theDoc.SetInsertPos (0)\n \n theName = theDoc.GetCreator\n \n if (theName.AsString.Trim.isNull) then\n \n theName = Av.GetLicensedUser \n if (theName.AsString.Trim.isNull) then\n theName = \"\"\n end\n \n if (th eName.AsString.Trim.Count < 4) then\n theName = \"\"\n end\n end\n \n InsertString = \"' Name:\"+theDoc.getname+NL\n +\"' Headline:\"+NL\n +\"' Called By:\"+NL\n +\"' Calls To:\"+NL+\"'\"+NL\n +\"' Author: \"+theName+NL\n +\"' Date:\"++Date.Now.AsString+NL\n +\"'\"+NL\n +\"' Requires:\"+NL\n +\"'\"+NL\n +\"' Returns:\"+NL\n +\"'\"+N L\n +\"' Comments:\"+NL\n +\"'\"+NL\n +\"'\"+NL\n +\"' Copyright© Applied Geographics Inc. Boston,MA.\"++Date.Now.asString+nl\n +\"'------------------------------------------------------------------------\"+nl+nl\n \n \n theDoc.insert(InsertString)\n theDoc.compile\n Return nil\n end\n \n" ) (Script.64 Name: "AGI/LIB (MassGIS) SED.CreateScriptWithHeader" SourceCode: "' Name: AGI/LIB (MassGIS) SEd.CreateScriptWithHeader\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Andrew Kvaal\n' Date: Fri Apr 03 17:31:52 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: The create script for SEds, this adds a \n' header for documentation automatically.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Apr 03 17:31:52 1998\n'------------------------------------------------------------------------\n\nHeaderString = \"' Name:\"+NL\n +\"' Headline:\"+NL\n +\"' Called By:\"+NL\n +\"' Calls To:\"+NL+\"'\"+NL\n +\"' Author:\"+NL\n +\"' Date:\"++Date.Now.AsString+NL\n +\"'\"+NL\n +\"' Requires:\"+NL\n +\"'\"+NL\n +\"' Returns:\"+NL\n +\"'\"+NL\n +\"' Comments:\"+NL\n +\"'\"+NL\n +\"'\"+NL\n +\"' Copyright© Applied Geographics Inc. Boston,MA.\"++Date.Now.asString+nl\n +\"'---------------------------------------------------------------- --------\"+nl\n \nnewSEd = SEd.MakeWithGUI(av.GetProject.GetSelectedGUI.GetName)\nnewSed.SetSource(HeaderString)\nnewSEd.GetWin.Open\n\n" ) (Script.65 Name: "AGI/LIB (MassGIS) ToolsMenu.Update" SourceCode: "' Name:AGI/LIB (MassGIS) ToolsMenu.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Tue Aug 03 13:36:06 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This script is the add/remove and update script for the\n' MassGIS Menu Choice. This script updates the choices on\n' the menu every time the project gui and GUIDocs updates.\n' When the Alt and Shift Keys are down, the access to ext\n' scripts are visible on the menu.\n'\n'\n' Copyright© Applied Ge ographics Inc. Boston,MA. Tue Aug 03 13:36:06 1999\n'------------------------------------------------------------------------\n\n if (Av.GetProject = nil) then\n Return nil\n end\n\n if (Av.GetProject.GetObjecttag.is(Dictionary).not) then\n Av.GetProject.SetObjecttag(Dictionary.Make(100))\n end\n \n OpenAGITools1 = System.IsAltkeydown\n OpenAGITools2 = System.IsShiftkeydown\n \n'-------------------------------------------------------------------------\n\n if (Self.Is(String)) then\n if (S elf.AsString.Lcase = \"remove\") then\n\n For each theGUI in Av.GetProject.GetGUIs\n aMenuBar = Av.Getproject.FindGUI(theGUI.AsString).GetMenuBar\n if (aMenuBar.FindbyLabel(\"MassGIS\") <> Nil) then\n aMenuBar.Remove(aMenuBar.FindbyLabel(\"MassGIS\"))\n end\n end\n \n end\n end\n \n'-------------------------------------------------------------------------\n\n if (OpenAGITools1 and OpenAGITools2) then \n Av.GetProject.GetObjectt ag.Set(\"Show Hidden Menu Choices\",true)\n end\n \n theToolStatusFlag = false\n if (System.GetOS.AsString.Contains(\"UNIX\")) then\n theToolStatusFlag = true\n else\n theToolStatusFlag = Av.GetProject.GetObjecttag.Get(\"Show Hidden Menu Choices\")\n if (theToolStatusFlag.is(Boolean).not) then\n theToolStatusFlag = false\n end\n end\n \n IsDeveloperExtensionLoaded = false\n if (Extension.GetExtensions.Get(\"AGI Developer Library\") <> nil) then\n theToolStatusFlag = true\n IsDeveloperExtensionLoaded = true\n end\n\n'---------------------------------------------------------------------------------\n \n For each aGUI in Av.GetProject.GetGUIs\n \n CurrentGUIMenuBar = aGUI.GetMenuBar\n ToolsMenu = CurrentGUIMenuBar.FindByLabel(\"MassGIS\")\n \n if (ToolsMenu <> nil) then\n CurrentGUIMenuBar.Remove(ToolsMenu)\n end\n end\n \n'---------------------------------------------------------------------------------\n\n TargetGUIList = {}\n TargetGUIList.Add( Av.GetProject.FindGUI(\"View\"))\n TargetGUIList.Add(Av.GetProject.FindGUI(\"Project\"))\n \n For each aGUI in TargetGUIList\n \n if (aGUI.is(DocGUI).Not) then\n Continue\n end\n \n CurrentGUIMenuBar = aGUI.GetMenuBar\n ToolsMenu = CurrentGUIMenuBar.FindByLabel(\"MassGIS\")\n \n if (ToolsMenu <> nil) then\n CurrentGUIMenuBar.Remove(ToolsMenu)\n end\n \n ToolsMenu = CurrentGUIMenuBar.FindByLabel(\"MassGIS\")\n \n if (ToolsMenu = nil) then\n \n ToolsMenu = Menu.Make\n ToolsMenu.SetLabel(\"MassGIS\")\n ToolsMenu.SetVisible(true)\n \n ToolsMenu.SetUpdate(\"AGI/LIB (MassGIS) ToolsMenu.Update\")\n CurrentGUIMenuBar.Add(ToolsMenu,CurrentGUIMenuBar.GetControls.Count)\n \n TotalItems = 0\n \n TheExt = Extension.GetExtensions.Get(\"MassGIS Data Viewer Utilities\")\n \n if (theExt.is(Extension)) then\n theVersion = theExt.GetVersion\n theBn dNum = theExt.GetPreferences.Get(\"AGI Development Version\")\n ExtensionChoice = Choice.Make\n ExtensionChoice.SetLabel(\"MassGIS Data Viewer Utilities, Version: \"+theBndNum.AsString+\", Build \"+theVersion.AsString)\n ToolsMenu.Add(ExtensionChoice,ToolsMenu.GetControls.Count)\n end\n \n ExtensionChoice = Choice.Make\n ExtensionChoice.SetLabel(\"Online Help and Settings...\")\n ExtensionChoice.SetClick(\"AGI/LIB (M assGIS) HTMLDocumentation.Open\")\n ExtensionChoice.SetHelp(\"\")\n ToolsMenu.Add(ExtensionChoice,ToolsMenu.GetControls.Count)\n \n SpaceChoice = Space.Make\n ToolsMenu.Add(SpaceChoice,ToolsMenu.GetControls.Count)\n \n if (theToolStatusFlag) then\n \n ExtensionChoice = Choice.Make\n ExtensionChoice.SetLabel(\"Access Extension Scripts...\")\n ExtensionChoice.SetClick(\"AGI/LIB (MassGIS) Add/Remove Extension Scripts\")\n ExtensionChoice. SetHelp(\"\")\n ToolsMenu.Add(ExtensionChoice,ToolsMenu.GetControls.Count)\n \n if (IsDeveloperExtensionLoaded) then\n ExtensionChoice = Choice.Make\n ExtensionChoice.SetLabel(\"AutoSave Extensions...\")\n ExtensionChoice.SetClick(\"AGI/DEV ExtensionControl.Open\")\n ExtensionChoice.SetHelp(\"\")\n ToolsMenu.Add(ExtensionChoice,ToolsMenu.GetControls.Count)\n end\n \n if (IsDevel operExtensionLoaded) then\n ExtensionChoice = Choice.Make\n ExtensionChoice.SetLabel(\"Browse Extension Scripts...\")\n ExtensionChoice.SetClick(\"AGI/DEV ScriptTool.Open\")\n ExtensionChoice.SetHelp(\"\")\n ToolsMenu.Add(ExtensionChoice,ToolsMenu.GetControls.Count)\n end\n \n if (IsDeveloperExtensionLoaded) then\n ExtensionChoice = Choice.Make\n ExtensionChoice.SetLabel(\"Recover Scripts...\")\n ExtensionChoice.SetClick(\"AGI/DEV DevGUI.RecoverScripts\")\n ExtensionChoice.SetHelp(\"\")\n ToolsMenu.Add(ExtensionChoice,ToolsMenu.GetControls.Count)\n end\n \n if (IsDeveloperExtensionLoaded) then \n ExtensionChoice = Choice.Make\n ExtensionChoice.SetLabel(\"Operating System Emulation\")\n ExtensionChoice.SetClick(\"AGI/DEV System.Change Look\")\n ExtensionChoice.SetHelp(\"\")\n ToolsMenu.Add(ExtensionChoice,ToolsMenu.GetControls.Count)\n end\n \n if (IsDeveloperExtensionLoaded) then \n ExtensionChoice = Choice.Make\n ExtensionChoice.SetLabel(\"Advanced Theme Inventory...\")\n ExtensionChoice.SetClick(\"AGI/LIB (MassGIS) ThemeInv.Open\")\n ExtensionChoice.SetHelp(\"\")\n ToolsMenu.Add(ExtensionChoice,ToolsMenu.GetControls.Count)\n end\n end\n \n end\n end" ) (Script.66 Name: "AGI/LIB (MassGIS) Verify Input" SourceCode: "' Name: AGI/LIB (MassGIS) Verify Input\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Apr 03 17:31:52 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n' This script is designed to be run at the\n' top of anyscript which is receiving data ie\n' as a parameters. This script accepts two list,\n' the first the incoming data and the second, a\n' list of expected classes.\n'\n' if (nil = av.Run(\"AGI : Script|Verify Input\", {SELF, {String, Boolean}})) then\n' MsgBox.Error(Script.The.GetName, \"Invalid Parameters\")\n' end \n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Apr 03 17:31:52 1998\n'------------------------------------------------------------------------\n \n if (Self = Nil) then \n Return (false) \n end\n \n if (Self.is(List).not) then \n theMsg = \"Input is not a list.\"\n Msgbox.info(theMsg,\"Script Error (#1)\")\n\n Return (false) \n end\n \n'----- ---------------------------------------------------------------------\n\n if ((Self.get(0).is(List).not) or (Self.get(1).is(List).not)) then \n \n theMsg = \"Input does not contain the required parameters.\"\n \n Msgbox.info(theMsg,\"Script Error (#2)\") \n \n Return (false)\n end\n\n'--------------------------------------------------------------------------\n' if the number of items in both the raw data and the class list\n' is not equal then the script will return Nil\n\n LabelList = Self.Get(2)\n ScriptName = Self.Get(3)\n\n if (Self.get(0).count > Self.get(1).count) then\n \n theMsg = \"Number of Input Values exceeds the number of Expected Classes\"\n \n Msgbox.info(theMsg,\"Script Error (#3)\"++ScriptName.asstring)\n \n Return (false)\n end\n \n if (Self.get(0).count < Self.get(1).count) then\n \n theMsg = \"Number of Expected Classes exceeds number of data values.\"\n \n Msgbox.info(theMsg,\"Script Error (#3)\"++ScriptName. asstring)\n \n Return (false)\n end\n\nif (System.IsControlKeyDown) then\n ' This is a quick escape in case of some type of infinite loop \n ' in error messages. Hold the Shift key down to escape this script.\n\n theMsg = \"Control Key Kill\"\n \n Exit\n end\n\n\n ReportMessage = nil\n if (SELF.Count = 5) then\n ReportMessage = SELF.Get(4)\n end\n\n if (ScriptName = Nil) then\n Scriptname = \"\"\n end\n \n'----------------------------------------------------- --------------------- \n' this loop checks each of the incoming values with the type of class\n' expected, ie if \"Steve\" a String Class, or true a Boolean Class.\n\n IsSELFgood = true\n \n for each param in 0..(Self.get(1).Count - 1)\n \n ' Compare the value with the expected class, if <> then \n ' their is a problem, and the loop will return nil.\n \n Msg1 = SELF.Get(0).Get(param).AsString.Quote+SELF.Get(1).Get(param).GetClassName\n \n if (Self.get(0).get(param).is(Self.get(1).get( param)).not) then \n \n Msg2 = ScriptName+\" (parameters \"+(param + 1).asstring+\")\"\n Msg1 = \"Input Parameter (\"+(param + 1).asstring+\") (\"+labellist.get(param)+\") is invalid, expected a \"+\n Self.get(1).get(param).getclassname.asstring+\", but received a \"+\n Self.get(0).get(param).getclass.getclassname+\".\"\n \n Msgbox.info(Msg1,msg2)\n \n IsSELFgood = false\n break\n end\n end\n\n if (IsSELFgood.not) then\n\n if (ReportMessage <> nil) then\n \n Msg1 = ScriptName+nl+\"An error occurred in the SELF object of this script.\"+nl+\"\"+nl+\n \"Function:\"+nl+\" \"+ReportMessage.AsString+nl+\"\"+nl+\"Expected Input Values\"+nl\n \n Inc = 1 \n For each aValue in SELF.Get(2)\n \n if (Inc > SELF.Get(1).Count) then\n Msg1 = Msg1.AsString+nl+\"\"+nl+\"Returns: \"+nl+\" \"+aValue\n else\n Msg1 = Msg1.AsString+nl+\" \"+I nc.AsString+\") \"+aValue\n end\n \n Inc = Inc + 1\n end\n \n Msg2 = \"Help Message...\" \n Msgbox.Report(Msg1,Msg2)\n end\n end\n\n\nReturn (IsSELFgood) \n\n" ) (Script.67 Name: "AGI/TMT (MassGIS) AddDataToInventoryDialog.Apply.Click" SourceCode: "' Name: AGI/TMT (MassGIS) AddDataToInventoryDialog.Apply.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Apr 03 17:31:52 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Apr 03 17:31:52 1998\n'------------------------------------------------------------------------\n\n if (Self.GetName = \"DoneLabelButton\") then\n Self.GetDialog.SetObjecttag(nil)\n end\n\n if (Self.GetName = \"CancelLabelButton\") then\n Self.GetDia log.SetObjecttag(false)\n end\n\n if (Self.GetName = \"ApplyLabelButton\") then\n Self.GetDialog.SetObjecttag(true)\n end\n \n Self.GetDialog.Close" ) (Script.68 Name: "AGI/TMT (MassGIS) AddDataToInventoryDialog.CheckKeys" SourceCode: "' Name:AGI/TMT (MassGIS) AddDataToInventoryDialog.CheckKeys\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Jul 28 16:22:10 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This script checks to make sure that the men1/men2/men3\n' values are unique. It there are not, then the script searches\n' for the next available Men3 value.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Jul 28 16:22:10 1999\n'----------------------------------------------------------- -------------\n\n Men1Dct = nil\n Men12Dct = nil\n Men123Dct = nil\n \n if (Av.GetActiveDoc.GetClass.GetClassName = \"View\") then\n Men1Dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"men1Dct\",false}) \n Men12Dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"men12Dct\",false})\n Men123Dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"men123Dct\",false})\n end\n \n if ((Men12Dct = nil) or (Men12Dct = nil) or (Men123Dct = nil)) then\n Return nil\n end\n\n' Get The Men1 and Men2 Keys String From the Dialog\n\n Men1 = Self.GetDialog.FindbyName(\"1TextLine\").GetText\n Men2 = Self.GetDialog.FindbyName(\"2TextLine\").GetText\n Men3 = Self.GetDialog.FindbyName(\"3TextLine\").GetText\n HoldMen2 = Men3.Clone\n \n ThemeTitle = Self.GetDialog.FindbyName(\"ThemeTitleTextLine\").GetObjecttag\n\n Men3 = (Av.Run(\"AGI/TMT (MassGIS) ThemeID.GetUniqueName\",{Men123Dct,Men1,Men2,Men3})).AsString.Trim\n \n if (HoldMen2.AsString.LCase.Trim <> Men3.AsString.LCase.Trim) then\n \n Str1 = \"The Menu Titles were altered to make the titles you entered unique! Do you want to use the unique value?\"\n Str2 = \"\"\n if (Msgbox.YesNo(Str1,Str2,true)) then\n Self.GetDialog.FindbyName(\"3TextLine\").SetText(Men3.AsString.Trim)\n end\n\n end\n \n" ) (Script.69 Name: "AGI/TMT (MassGIS) AddDataToInventoryDialog.ComboBox" SourceCode: "' Name:AGI/LIB (MassGIS) AddDataToInventoryDialog.ComboBox\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Mar 03 14:18:15 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Mar 03 14:18:15 1999\n'------------------------------------------------------------------------\n\n theVTab = Self.GetSelection\n \n if (theVtab.is(String)) then\n\n theVtab = Av.Run(\"AGI/TMT (MassGIS) DBF.Create2DThemeDBF\",Nil)\n \n if (TheVtab.is(V tab).Not) then\n theList = Self.GetList\n Self.DefineFromList(theList)\n Return nil\n end\n \n theList = Self.GetList\n theList.Insert(theVtab)\n theList.RemoveDuplicates\n Self.DefineFromList(theList)\n \n Self.GetDialog.Update\n end\n \n Self.GetDialog.FindbyName(\"DBFTextLabel\").Update\n \n if (File.CanDelete(theVtab.GetBaseTableFileName).not) then\n Msgbox.Warning(\"This file is Read Only. If you want to add a Theme ID \"+\n \"to this file, then change the write protection.\",\n theVtab.GetBaseTableFileName.AsString+\"...\")\n Self.GetDialog.Update\n Return nil\n end\n \n if (theVtab.HasError) then\n Msgbox.Warning(\"This Dbase vtab has an error. It can not be used to save these parameters.\",\n theVtab.GetBaseTableFileName.AsString+\"...\")\n Self.GetDialog.Update\n Return nil\n end\n\n \n TheThemeID = Self.GetDialog.FindbyName(\"ThemeIDTextLabel\").GetText\n \n TheThemeID = Av.Run(\"AGI/TMT (MassGIS) ThemeID.FindMaxThemeID\",{theVtab,TheThemeID.AsString})\n \n Self.GetDialog.FindbyName(\"ThemeIDTextLabel\").Settext(TheThemeID.AsString)\n Self.GetDialog.FindbyName(\"ThemeIDTextLabel\").Apply\n \n if (Self.GetDialog.FindbyName(\"LegendPathTextLine\") <> nil) then\n Self.GetDialog.FindbyName(\"LegendPathTextLine\").Update\n end \n" ) (Script.70 Name: "AGI/TMT (MassGIS) AddDataToInventoryDialog.DBFTextLabel.Update" SourceCode: "' Name:AGI/TMT (MassGIS) AddDataToInventoryDialog.DBFTextLabel.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:24:23 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:24:23 1999\n'------------------------------------------------------------------------\n\n n = Av.Run(\"AGI/LIB (MassGIS) Icon Dictionary\",\"\")\n \n DestinationComboBox = Self.GetDialog.FindbyName(\"DestinationComboBox\")\n \n theFile = Destinat ionComboBox.GetSelection\n \n if (theFile.is(Vtab)) then\n theFile = theFile.GetBaseTableFileName\n \n if (theFile.is(FileName)) then\n theFile = theFile.GetFullName.AsString.AsFileName\n end\n else\n Self.SetVisible(false)\n Self.GetDialog.FindbyName(\"DBFIconBox\").SetVisible(False)\n Self.GetDialog.Update\n Return Nil\n end \n \n Self.SetVisible(true)\n theIcon = nil\n \n if (theFile.is(FileName)) then\n if (File.IsWritable(theFile)) then\n theIc on = n.Get(\"Save\")\n\n else\n theIcon = n.Get(\"Lock\")\n System.Beep\n end\n else\n if (theFile.isEditable) then\n theIcon = n.Get(\"Save\")\n else\n theIcon = n.Get(\"Lock\")\n System.Beep\n end\n end\n \n if (theIcon.is(Icon)) then\n Self.GetDialog.FindbyName(\"DBFIconBox\").SetIcon(theIcon)\n Self.GetDialog.FindbyName(\"DBFIconBox\").SetVisible(true)\n else\n Self.GetDialog.FindbyName(\"DBFIconBox\").SetVisible(false)\n end\n \n Self.SetLabel(theFile.AsString)" ) (Script.71 Name: "AGI/TMT (MassGIS) AddDataToInventoryDialog.LegendPathTextLine.Apply" SourceCode: "' Name:AGI/LIB (MassGIS) AddDataToInventoryDialog.LegendPathTextLine.Changed\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Mar 03 14:18:33 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Mar 03 14:18:33 1999\n'------------------------------------------------------------------------\n\n thePath = Self.GetDialog.FindbyName(\"LegendPathTextLine\").GetText\n\n if (thePath.AsString.Contains(\"$\")) then \n \n VariableName = nil\n \n For each aNum in 0..(ThePath.Count - 1)\n \n st = thePath.left(aNum)\n if (st.contains(\"/\")) then \n st = St.Substitute(\"$\",\"\")\n VariableName = st.substitute(\"/\",\"\")\n break\n end\n \n if (st.contains(\"\\\")) then \n st = St.Substitute(\"$\",\"\")\n VariableName = st.substitute(\"\\\",\"\")\n break\n end\n end\n \n if (VariableName <> nil) then\n \n t heVarPath = System.GetEnvvar(VariableName)\n \n if (theVarPath.AsString.AsFileName.isDir.not) then\n \n theOriginalFile = Self.GetTag.AsString\n \n theNewPath = thePath.Clone.Substitute(\"$\"+Variablename.Trim,\"\")\n theNewLegPath = theOriginalFile.Substitute(theNewPath,\"\")\n \n Str1 = \"You have entered a legend file path that contains an \"+\n \"Unknown Path Variable. Do you want to create with var iable now?\"\n Str2 = \"Unknown Variable \"+VariableName.Trim.UCase+\"...\"\n \n If (Msgbox.YesNo(Str1,Str2,true)) then\n System.SetEnvVar(VariableName.AsString.Trim.UCase,theNewLegPath)\n end \n\n end\n \n end\n end \n \n Self.GetDialog.FindbyName(\"UndoTool2\").Update\n" ) (Script.72 Name: "AGI/TMT (MassGIS) AddDataToInventoryDialog.LegendPathTextLine.Update" SourceCode: "' Name:AGI/LIB (MassGIS) AddDataToInventory.LegendPathTextLine.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Tue Jan 05 20:33:26 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Tue Jan 05 20:33:26 1999\n'------------------------------------------------------------------------\n\n theThemeTitle = Self.GetDialog.FindbyName(\"ThemeTitleTextLine\").GetText\n \n DestinationComboBox = Self.GetDialog.FindbyName(\"DestinationComboBox\")\n \n theVtab = DestinationComboBox.GetSelection\n \n if (theVtab.is(Vtab).not) then\n theVtab = Self.GetDialog.FindbyName(\"DestinationComboBox\").GetList.Get(0)\n end\n \n'--------------------------------------------------------------------------\n \n ThemeLegendFileName = Av.Run(\"AGI/TMT (MassGIS) ThemeID.Generate Legend FileName\",{theVtab}) \n \n Self.SetText(ThemeLegendFileName.AsString) \n Self.SetTag(ThemeLegendFileName.AsString) \n" ) (Script.73 Name: "AGI/TMT (MassGIS) AddDataToInventoryDialog.Open" SourceCode: "' Name:AGI/TMT (MassGIS) AddDataToInventoryDialog.Open\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Dec 21 09:29:33 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This is the Open and Create script for adding ThemeIDs\n' to the Theme Inventory DBF. If requires that the user input\n' as a list of values, 0) Datalist (List of Strings)\n' 1) title (String) \n' 2) Theme ID (String)\n' 3) Current Theme (Theme)\n' 4) List of DBF (List of FileNames) \n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Apr 03 17:31:52 1998\n'------------------------------------------------------------------------\n\n if (Self.is(List).not) then \n Return nil \n end\n\n DataList = Self.Get(0)\n ThemeID = Self.Get(1)\n CurrentTheme = Self.Get(2)\n ListofDBFs = Self.Get(3)\n \n \n' Verify the Status of the incoming data\n if (DataList.is(List).no t) then Return(nil) end\n if (ThemeID.is(String).not) then Return(nil) end\n if (CurrentTheme.is(Theme).not) then Return(nil) end\n if (ListofDBFs.is(List).not) then Return(nil) end\n \n ListofDBFs.Add(\"\")\n \n TheDialog = Dialog.MakeSized(true,true,true,true,Rect.MakeXY(0,0,530,500))\n TheDialog.SetObjecttag(nil)\n \n n = Av.Run(\"AGI/LIB (MassGIS) Icon Dictionary\",\"\")\n\n'----------------------------------------------------------------------------- ----------\n\n TheDialog.SetName (\"AddDataMenu(MassGIS)\")\n TheDialog.SetAlwaysOnTop (true)\n TheDialog.SetCloseable (true)\n TheDialog.SetEscapeEnabled (true)\n TheDialog.UsetitleBar (true)\n TheDialog.Setmodal (true)\n TheDialog.SetResizable (false)\n TheDialog.SetUpdate (\"AGI/TMT (MassGIS) AddDataToInventoryDialog.Update\")\n TheDialog.SetTitle (\"Step 1, Add Theme to Inventory...\" )\n\n'--------------------------------------------------------------------------------------\n\n c = LabelButton.Make\n c.SetName (\"HelpLabelButton\")\n c.SetClick (\"AGI/LIB (MassGIS) HTMLDocumentation.OpenPage\")\n c.SetUpdate (\"AGI/LIB (MassGIS) HTMLDocumentation.Update\")\n c.SetVisible (false)\n c.SetEnabled (false)\n c.SetLabel (\"Help\")\n c.SetTag (\"LIB\\AddingThemeIDMenu.htm\")\n \n theDialog.GetControlPanel.add(c,Rect.Makexy(300,160,4 00,180))\n c.Update\n \n'---------------------------------------------------------------------------------------\n\n c = TextLine.Make\n c.SetName (\"ThemeIDTextLabel\")\n c.SetApply (\"AGI/TMT (MassGIS) AddDataToInventoryDialog.ThemeID\")\n c.SetFocusLost (\"AGI/TMT (MassGIS) AddDataToInventoryDialog.ThemeID\")\n c.setText (ThemeID)\n c.setTextType (#TEXTLINE_TYPE_REAL)\n c.setLabel (\"Theme ID: \"+ThemeID.AsString)\n\n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(150,6 0,330,80))\n\n'----------------------------------------------------------------------------------------\n\n c = ComboBox.Make\n c.SetName (\"DestinationComboBox\")\n c.setLabel (\"Store this Theme ID in\")\n c.SetSelect (\"AGI/TMT (MassGIS) AddDataToInventoryDialog.ComboBox\")\n c.SetHelp (\"//This list of valid Theme DBF files that the user can User can\"+\n \" can choose from for the new Theme ID.\")\n \n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(40,30,400,20 0))\n c.DefineFromList (ListofDBFs)\n \n'--------------------------------------------------------------------------------------------------\n\n c = TextLabel.Make\n c.SetName (\"1TextLabel\")\n c.Setlabel (\"Menu 1 Title\")\n\n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(40,100,200,120))\n\n'--------------------------------------------------------------------------------------------------\n\n c = TextLine.Make\n c.SetName (\"1TextLine\")\n c.SetApply (\"AGI/TMT (MassGIS) AddDataT oInventoryDialog.CheckKeys\")\n c.SetfocusLost (\"AGI/TMT (MassGIS) AddDataToInventoryDialog.CheckKeys\")\n c.SetHelp (\"//This is the Primary Title that will be used to describe the new Theme ID.\")\n c.settext (DataList.Get(0).AsString)\n\n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(120,100,450,120))\n\n'---------------------------------------------------------------------------------------------------\n\n c = TextLabel.Make\n c.SetName (\"2TextLabel\")\n c.Setlabel (\"Men u 2 Title\")\n\n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(40,130,200,150))\n \n'---------------------------------------------------------------------------------------------------\n\n c = TextLine.Make\n c.SetName (\"2TextLine\")\n c.setApply (\"AGI/TMT (MassGIS) AddDataToInventoryDialog.CheckKeys\")\n c.SetfocusLost (\"AGI/TMT (MassGIS) AddDataToInventoryDialog.CheckKeys\")\n c.SetHelp (\"//This is the Secondary Title that will be used to describe the\"+\n \" ne w Theme ID.\")\n c.settext (DataList.Get(1).AsString)\n\n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(120,130,450,150))\n\n'---------------------------------------------------------------------------------------------------\n\n c = TextLabel.Make\n c.SetName (\"3TextLabel\")\n c.Setlabel (\"Menu 3 Title\")\n\n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(40,160,200,180))\n\n'---------------------------------------------------------------------------------------------------\n\n c = TextLine.Ma ke\n c.SetName (\"3TextLine\")\n c.SetApply (\"AGI/TMT (MassGIS) AddDataToInventoryDialog.CheckKeys\")\n c.SetFocusLost (\"AGI/TMT (MassGIS) AddDataToInventoryDialog.CheckKeys\")\n c.SetHelp (\"//This is the Third Title that will be used to describe the new Theme ID.\")\n c.Settext (DataList.Get(2).AsString)\n\n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(120,160,450,180))\n\n'-------------------------------------------------------------------------------------------------\n\n ThemeTitleTextLine = TextLine.Make\n ThemeTitleTextLine.SetName (\"ThemeTitleTextLine\")\n ThemeTitleTextLine.Setlabel (\"TOC Theme Title\")\n ThemeTitleTextLine.SetHelp (\"//This is the Title that will be used when the theme is added\"+\n \" to a View. It will also be used in the Legend AVL file title.\")\n ThemeTitleTextLine.settext (DataList.get(3).AsString)\n ThemeTitleTextLine.SetObjectTag (CurrentTheme)\n\n TheDialog.GetControl Panel.Add(ThemeTitleTextLine,Rect.MakeXY(40,210,450,230))\n\n'-------------------------------------------------------------------------------------------------\n\n FeatureTypeTextLabel = TextLabel.Make\n FeatureTypeTextLabel.SetName (\"FeatureTypeTextLabel\")\n FeatureTypeTextLabel.SetLabel (\"\")\n TheDialog.GetControlPanel.Add(FeatureTypeTextLabel,Rect.MakeXY(40,260,400,300))\n\n if (CurrentTheme.GetClass.GetClassName = \"DBTheme\") then\n FeatureTypeTextLabel.SetLabel(\"This is a \"+CurrentThe me.GetShapeClass.GetClassName+\" SDE Theme (DBTheme).\")\n else\n if (CurrentTheme.is(FTheme)) then\n FeatureTypeTextLabel.SetLabel(\"This is a \"+CurrentTheme.GetFtab.GetShapeClass.GetClassName.AsString+\" theme (FTheme).\")\n end\n \n if (CurrentTheme.GetClass.GetClassName = \"GTheme\") then\n FeatureTypeTextLabel.SetLabel(\"This is a Grid Theme (GTheme).\")\n end\n \n if (CurrentTheme.GetClass.GetClassName = \"STheme\") then\n FeatureTypeTextLabel.Set Label(\"This is a Surface Theme (STheme).\")\n end\n \n if (CurrentTheme.is(ITheme)) then\n FeatureTypeTextLabel.SetLabel(\"This is an Image Theme (ITheme).\")\n end \n end\n \n if (DataList.Count > 5) then\n ThemeType = Datalist.Get(7)\n if (ThemeType.AsString.Trim.IsNull.Not) then\n FeatureTypeTextLabel.SetLabel(FeatureTypeTextLabel.GetLabel.AsString+\" (\"+ThemeType.AsString.Trim.Proper+\")\")\n end\n end\n \n'-------------------------- -----------------------------------------------------------------------\n\n DBFIconBox = IconBox.Make\n DBFIconBox.SetName (\"DBFIconBox\")\n\n TheDialog.GetControlPanel.Add(DBFIconBox,Rect.MakeXY(50,420,100,450))\n \n'-------------------------------------------------------------------------------------------------\n\n DBFTextLabel = TextLabel.Make\n DBFTextLabel.SetName (\"DBFTextLabel\")\n DBFTextLabel.SetUpdate (\"AGI/TMT (MassGIS) AddDataToInventoryDialog.DBFTextLabel.Update\")\n\n TheD ialog.GetControlPanel.Add(DBFTextLabel,Rect.MakeXY(90,430,400,470))\n\n'-------------------------------------------------------------------------------------------------\n\n OptionalControlPanel = ControlPanel.Make\n OptionalControlPanel.SetName (\"OptionalControlPanel\")\n OptionalControlPanel.SetLabel (\"Optional Settings\")\n OptionalControlPanel.SetVisibleBorder (true)\n TheDialog.GetControlPanel.Add(OptionalControlPanel,Rect.MakeXY(40,280,460,410))\n \n'----------------------------------- ---------------------------------------------------------------\n\n SourcePathTextLine = TextLine.Make\n SourcePathTextLine.SetName (\"SourcePathTextLine\")\n SourcePathTextLine.Setlabel (\"Source\")\n \n if (CurrentTheme.GetClass.GetClassName = \"DBTheme\") then\n SourcePathTextLine.SetText (\"DBTheme or SDE Source\")\n SourcePathTextLine.SetObjecttag (\"DBTheme\")\n SourcePathTextLine.SetEnabled (false)\n else\n if (CurrentTheme.GetSrcName.GetFileName = nil) t hen\n SourcePathTextLine.SetText (CurrentTheme.GetSrcName.AsString)\n SourcePathTextLine.SetObjecttag (CurrentTheme.GetSrcName) \n else\n SourcePathTextLine.SetText (CurrentTheme.GetSrcName.GetFileName.AsString)\n SourcePathTextLine.SetObjecttag (CurrentTheme.GetSrcName.GetFileName)\n end\n end\n \n OptionalControlPanel.Add(SourcePathTextLine,Rect.MakeXY(30,40,352,60))\n \n'----------------------------------------------------- ---------------------------------------------\n\n LegendPathTextLine = TextLine.Make\n LegendPathTextLine.SetName (\"LegendPathTextLine\")\n LegendPathTextLine.Setlabel (\"Legend\")\n LegendPathTextLine.SetUpdate (\"AGI/TMT (MassGIS) AddDataToInventoryDialog.LegendPathTextLine.Update\")\n LegendPathTextLine.SetObjecttag (DataList.Get(5).AsString.Trim)\n LegendPathTextLine.SetApply (\"AGI/TMT (MassGIS) AddDataToInventoryDialog.LegendPathTextLine.Apply\")\n LegendPathTextLine.S etText (DataList.Get(5).AsString.Trim)\n \n OptionalControlPanel.Add(LegendPathTextLine,Rect.MakeXY(30,80,352,100))\n\n'------------------------------------------------------------------------------------------------\n\n CancelLabelButton = labelbutton.Make\n CancelLabelButton.SetName (\"DoneLabelButton\")\n CancelLabelButton.SetClick (\"AGI/TMT (MassGIS) AddDataToInventoryDialog.Apply.Click\")\n CancelLabelButton.SetLabel (\"Done\")\n \n TheDialog.GetControlPanel.Add(CancelLabelButton,Rect .MakeXY(170,460,280,490))\n\n'------------------------------------------------------------------------------------------------\n\n CancelLabelButton = labelbutton.Make\n CancelLabelButton.SetName (\"CancelLabelButton\")\n CancelLabelButton.SetClick (\"AGI/TMT (MassGIS) AddDataToInventoryDialog.Apply.Click\")\n CancelLabelButton.SetLabel (\"Cancel\")\n \n TheDialog.GetControlPanel.Add(CancelLabelButton,Rect.MakeXY(290,460,400,490))\n \n'--------------------------------------------------------------- ----------------------------------\n\n ApplyLabelButton = Labelbutton.Make\n ApplyLabelButton.SetName (\"ApplyLabelButton\")\n ApplyLabelButton.SetClick (\"AGI/TMT (MassGIS) AddDataToInventoryDialog.Apply.Click\")\n ApplyLabelButton.SetLabel (\"Continue >>\")\n \n TheDialog.GetControlPanel.Add(ApplyLabelButton,Rect.MakeXY(410,460,520,490))\n \n TheDialog.SetObjecttag(false)\n \n'--------------------------------------------------------------------------\n' Add the dialog to the project and Ope n it in its current location\n \n Av.GetProject.AddDialog(theDialog)\n TheDialog.FindbyName(\"1TextLine\").Focus\n DBFTextLabel.Update\n \n Av.Run(\"AGI/LIB (MassGIS) Dialog.MovetoCenterOfScreen\",theDialog)\n \n theDialog.SetObjecttag(false)\n\nReturn (theDialog)\n" ) (Script.74 Name: "AGI/TMT (MassGIS) AddDataToInventoryDialog.PathComboBox.Select" SourceCode: "' Name:AGI/LIB (MassGIS) AddDataToInventoryDialog.PathComboBox.Select\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Dec 18 18:50:42 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Dec 18 18:50:42 1998\n'------------------------------------------------------------------------\n\nif (Self.GetName = \"PathComboBox1\") then\n \n theVarName = Self.GetSelection.AsString.Trim\n theVarName = theVarName.AsString.Substitute(\"$\",\"\")\n \n thePathString = System.GetEnvVar(theVarName)\n \n theSourcePath = Self.GetDialog.FindbyName(\"SourcePathTextLine\").GetObjecttag\n \n if (theSourcePath.AsString.LCase.Contains(thePathString.AsString.LCase)) then\n \n theString = theSourcePath.AsString.Substitute(thePathString.Trim,\"$\"+theVarName.trim.UCase)\n \n Self.GetDialog.FindbyName(\"SourcePathTextLine\").SetText(theString.AsString)\n end\n end\n \nif (Self.GetName = \"PathComboBox2\") then\n \n theVarName = Self.GetSelection.A sString.Trim\n theVarName = theVarName.AsString.Substitute(\"$\",\"\")\n \n thePathString = System.GetEnvVar(theVarName)\n \n theSourcePath = Self.GetDialog.FindbyName(\"LegendPathTextLine\").GetText\n \n if (theSourcePath.AsString.LCase.Contains(thePathString.AsString.LCase)) then\n \n theString = theSourcePath.AsString.Substitute(thePathString.Trim,\"$\"+theVarName.trim.UCase)\n \n Self.GetDialog.FindbyName(\"LegendPathTextLine\").SetText(theString.AsString)\n end\n end" ) (Script.75 Name: "AGI/TMT (MassGIS) AddDataToInventoryDialog.ThemeID" SourceCode: "' Name: AGI/LIB (MassGIS) AddDataToInventoryDialog.ThemeID\n' Headline: Verifies any Change in the ThemeID Textline\n' Called By: Dialog Control Apply Event\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Apr 03 17:31:52 1998\n'\n' Requires: Self to be a Dialog Control, ie Textline\n'\n' Returns: None\n'\n' Comments: This is an apply Script for the Msgbox1. Is checks to makes\n' user that any number the user enters into the ThemeID TextLine\n' is a valid it number, ie it has not already been us ed by another\n' themeid. If the number is already in use, then increment to the\n' first available. \n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Apr 03 17:31:52 1998\n'------------------------------------------------------------------------\n \n' Get the Source Dialog and Dialog Controls\n TheDialog = Self.GetDialog\n ThemeIDTextLabel = TheDialog.FindbyName(\"ThemeIDTextLabel\")\n \n' Get the new ThemeID String\n TheThemeID = ThemeIDTextLabel.GetText\n \n' If the New ThemeID Stri ng is a negative nubmer then make it a \n' positive number \n if (TheThemeID.AsString.AsNumber < 0) then \n TheThemeID = (TheThemeID.AsString.AsNumber * -1).AsString \n end\n\n'--------------------------------------------------------------\n' Get the Theme Project Dictionary\n Thmiddct = Av.GetProject.GetObjectTag.get(\"Thmiddct\")\n \n' Verify the Dictioanary\n if (Thmiddct.is(Dictionary)) then\n ThemeIDList= Thmiddct.returnKeys\n if (ThemeIDList.count > 0) then\n \n IDExists = ThemeIDLis t.FindbyValue(TheThemeID)\n \n While (IDExists <> -1)\n TheThemeID = TheThemeID.AsString.AsNumber + 1\n IDExists = ThemeIDList.FindbyValue(TheThemeID.AsString)\n end\n end\n end\n\n' Update the TextLine Labe to reflect the ThemeID Value\n if (theThemeID.AsString.Count > 0) then\n ' Set the TextLine Text\n ThemeIDTextLabel.SetText(TheThemeID.AsString)\n ' Set the TextLine Label\n ThemeIDTextLabel.SetLabel(\"Theme ID: \"+TheThemeID.AsString)\n end" ) (Script.76 Name: "AGI/TMT (MassGIS) AddDataToInventoryDialog.Update" SourceCode: "' Name:AGI/TMT (MassGIS) AddDataToInventoryDialog.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 12:03:35 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This script makes sure that the selected vtab is \n' editable, if it is a vtab and editable, then the \n' controls will be enabled.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 12:03:35 1999\n'------------------------------------------------------------------------\n\n DestinationCo mboBox = Self.FindbyName(\"DestinationComboBox\")\n \n theVtab = DestinationComboBox.GetSelection\n\n EnableStatus = theVtab.is(Vtab)\n\n if (theVtab.is(Vtab)) then\n \n if (File.CanDelete(theVtab.GetBaseTableFileName).Not) then\n EnableStatus = false\n end\n \n if (EnableStatus) then\n if (theVtab.HasError) then\n EnableStatus = false\n end\n end\n end\n \n Self.FindbyName(\"1TextLine\").SetEnabled(EnableStatus)\n Self.FindbyName(\"2T extLine\").SetEnabled(EnableStatus)\n Self.FindbyName(\"3TextLine\").SetEnabled(EnableStatus)\n Self.FindbyName(\"ApplyLabelButton\").SetEnabled(EnableStatus)\n Self.FindbyName(\"DoneLabelButton\").SetEnabled(EnableStatus)\n Self.FindbyName(\"1TextLabel\").SetEnabled(EnableStatus)\n Self.FindbyName(\"2TextLabel\").SetEnabled(EnableStatus)\n Self.FindbyName(\"3TextLabel\").SetEnabled(EnableStatus)\n Self.FindbyName(\"DBFTextLabel\").SetEnabled(EnableStatus) \n Self.FindbyName(\"ThemeIDTextLabel\").SetEnabled(EnableStatus)\n Self.FindbyName(\"FeatureTypeTextLabel\").SetEnabled(EnableStatus)\n Self.FindbyName(\"OptionalControlPanel\").SetEnabled(EnableStatus)\n Self.FindbyName(\"ThemeTitleTextLine\").SetEnabled(EnableStatus)" ) (Script.77 Name: "AGI/TMT (MassGIS) AliasEdit.CloseLabelButton" SourceCode: "' Name:AGI/TMT (MassGIS) AliasEdit.CloseLabelButton\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Thu Jul 29 14:12:00 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Thu Jul 29 14:12:00 1999\n'------------------------------------------------------------------------\n\n Self.GetDialog.FindbyName(\"CancelLabelButton\").SetObjecttag(true)\n Self.GetDialog.Close\n " ) (Script.78 Name: "AGI/TMT (MassGIS) AliasEdit.ControlPanel.Update" SourceCode: "' Name:AGI/TMT (MassGIS) AliasEdit.ControlPanel.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Thu Jul 29 14:11:52 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Thu Jul 29 14:11:52 1999\n'------------------------------------------------------------------------\n\nReturn Nil\n if (Self.GetObjecttag.is(Boolean)) then\n if (Self.GetObjecttag.Not) then\n Self.SetEnabled(false)\n Return nil\n end\n en d\n \n Self.SetEnabled(Self.GetDialog.FindbyName(\"ParametersListBox\").GetSelection.Count > 0)\n " ) (Script.79 Name: "AGI/TMT (MassGIS) AliasEdit.DBFComboBox.Select" SourceCode: "' Name:AGI/TMT (MassGIS) AliasEdit.DBFComboBox.Select\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Thu Jul 29 14:11:47 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Thu Jul 29 14:11:47 1999\n'------------------------------------------------------------------------\n\n theSelection = Self.GetSelection\n \n if (theSelection.is(FileName)) then\n Self.GetDialog.FindbyName(\"ParametersListBox\").SetObjecttag(theSelection.Clone)\n Self.GetDialog.FindbyName(\"ParametersListBox\").Update\n Self.GetDialog.FindbyName(\"AliasTextLine\").SetText(\"\")\n Self.GetDialog.FindbyName(\"ParametersListBox\").BroadCastUpdate\n Return Nil\n else\n theVtab = Av.Run(\"AGI/TMT (MassGIS) DBF.CreateAliasDBF\",Nil)\n \n if (TheVtab.is(Vtab).Not) then\n theList = Self.GetList\n Self.DefineFromList(theList)\n Self.GetDialog.FindbyName(\"ParametersListBox\").BroadCastUpdate\n Return nil\n end\n \n theList = Self.GetList\n theList.Insert(theVtab.GetBaseTableFileName.Clone)\n theList.RemoveDuplicates\n Self.DefineFromList(theList)\n \n Self.GetDialog.FindbyName(\"ParametersListBox\").SetObjecttag(theVtab.GetBaseTableFileName.Clone)\n Self.GetDialog.FindbyName(\"AliasTextLine\").SetText(\"\")\n Self.GetDialog.FindbyName(\"ParametersListBox\").Update\n Self.GetDialog.FindbyName(\"ParametersListBox\").BroadCastUpdate\n end\n " ) (Script.80 Name: "AGI/TMT (MassGIS) AliasEdit.Open" SourceCode: "' Name:AGI/TMT (MassGIS) AliasEdit.Open\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Thu Jul 29 14:11:42 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This script creates and opens the Alias Dialog Menu.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Thu Jul 29 14:11:42 1999\n'------------------------------------------------------------------------\n\n ThemeID = Self.Get(0)\n TheTheme = Self.Get(1)\n \n _CurrentThemeID = ThemeID.AsString\n \n InquiryIDDct = Av.Ge tProject.GetObjecttag.Get(\"InquiryIDDct\")\n InquiryFileNameDct = Av.GetProject.GetObjecttag.Get(\"InquiryFileNameDct\")\n \n theVtabFileName = InquiryFileNameDct.Get(ThemeID.AsString)'\n theVtabList = Av.Run(\"AGI/LIB (MassGIS) GetVtabList\",{\"als_\",true})\n \n'---------------------------------------------------------------------------------------\n\n EditStatus = true\n \n if (theVtabFileName.AsString.Contains(\"inquiry.dbf\")) then\n EditStatus = Av.Run(\"AGI/TMT (MassGIS) CheckPassword\",\"\")\n end\n\n'-- -------------------------------------------------------------------------------------\n\n VtabFileList = {}\n For each aVtab in theVtabList\n VtabFileList.Add(aVtab.GetBaseTableFileName.Clone)\n end\n \n VtabFileList.Add(\"\")\n \n if (theVtabFileName.is(FileName)) then\n VtabFileList.Insert(theVtabFileName)\n end \n \n VtabFileList.RemoveDuplicates \n \n'--------------------------------------------------------------------------------------\n \n ThmIDDct = Av.GetProject.GetObjecttag.Get(\"ThmIDDct\")\n \n if (ThmIDDct.Is(Dictionary)) then\n Clist = ThmIDDct.Get(ThemeID)\n \n if (Clist.is(List)) then\n SourceVtabFileName = Clist.Get(20)\n \n if (SourceVtabFilename.AsString.Contains(\"themeinv.dbf\")) then\n EditStatus = Av.Run(\"AGI/TMT (MassGIS) CheckPassword\",\"\")\n end\n end\n end\n\n'--------------------------------------------------------------------------------------\n\n TheDialo g = Dialog.MakeSized(true,true,true,true,Rect.MakeXY(0,0,530,500))\n \n n = Av.Run(\"AGI/LIB (MassGIS) Icon Dictionary\",\"\")\n \n'-------------------------------------------------------------------------------------\n\n TheDialog.SetName (\"AliasesEditMenu(MassGIS)\")\n TheDialog.SetAlwaysOnTop (true)\n TheDialog.SetCloseable (true)\n TheDialog.SetEscapeEnabled (true)\n TheDialog.UsetitleBar (true)\n TheDialog.Setmodal (true)\n TheD ialog.SetResizable (false)\n \n if (theTheme.is(Theme)) then\n TheDialog.SetTitle (\"Step 2, ThemeID: \"+ThemeID.AsString+\", Field Parameters\")\n else\n TheDialog.SetTitle (\"ThemeID: \"+ThemeID.AsString+\", Field Parameters\")\n end\n\n ListenList = {}\n \n'--------------------------------------------------------------------------------------\n\n c = TextLabel.Make\n c.SetName (\"MessageTextLabel\")\n c.SetLabel (\"\")\n \n theDialog.GetControlPanel.add(c,Rect.Makexy(10,1 0,500,100))\n\n'--------------------------------------------------------------------------------------\n\n c = ListBox.Make\n c.SetName (\"ParametersListBox\")\n c.SetSelect (\"AGI/TMT (MassGIS) AliasEdit.ParametersListBox.Select\")\n c.SetUpdate (\"AGI/TMT (MassGIS) AliasEdit.ParametersListBox.Update\")\n c.SetSelectionStyle (#LISTBOX_SELECTION_SINGLEROW)\n c.SetFieldNamesVisible (true)\n c.SetHorizontalScroll (false)\n c.SetObjecttag (theVtabFileName)\n c.SetTag (ThemeID.AsString)\n \n theDialog.GetControlPanel.add(c,Rect.Makexy(10,80,520,300))\n ParametersListBox = c\n \n'---------------------------------------------------------------------------------\n\n if (theTheme.is(Ftheme)) then\n c = ComboBox.Make\n c.SetName (\"ThemeFieldsComboBox\")\n c.SetLabel (\"Available Theme Fields\")\n c.SetSelect (\"AGI/TMT (MassGIS) AliasEdit.ThemeFieldsComboBox.Select\")\n c.SetObjecttag (theTheme)\n \n TheDialog.GetContr olPanel.Add(c,Rect.MakeXY(200,55,520,450))\n c.DefineFromList (theTHeme.GetFtab.GetFields.Clone)\n end\n \n'---------------------------------------------------------------------------------\n\n c = ComboBox.Make\n c.SetName (\"DBFComboBox\")\n c.SetLabel (\"Store your field options in\")\n c.DefineFromList (VtabFileList)\n c.SetSelect (\"AGI/TMT (MassGIS) AliasEdit.DBFComboBox.Select\")\n \n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(50,310,520,450))\n DBFComboB ox = c\n DBFComboBox.SetEnabled(EditStatus)\n\n'---------------------------------------------------------------------------------\n\n c = ControlPanel.Make\n c.SetName (\"OptionControlPanel\")\n c.SetLabel (\"Field Options\")\n c.SetVisibleBorder (true)\n c.SetUpdate (\"AGI/TMT (MassGIS) AliasEdit.ControlPanel.Update\")\n \n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(10,340,520,435))\n OptionControlPanel = c\n ListenList.Add(c)\n\n'---------------------------------------------- ----------------------------------------\n\n c = TextLine.Make\n c.SetName (\"NameTextLine\")\n c.SetLabel (\"Field Name\")\n c.SetUpdate (\"AGI/TMT (MassGIS) AliasEdit.Parameters.Update\")\n c.SetChanged (\"AGI/TMT (MassGIS) AliasEdit.Parameters.Click\")\n \n OptionControlPanel.add(c,Rect.Makexy(50,30,300,50))\n c.SetEnabled (false)\n ListenList.Add(c)\n \n'--------------------------------------------------------------------------------------\n\n c = TextLine.M ake\n c.SetName (\"AliasTextLine\")\n c.SetLabel (\"Field Alias\")\n c.SetUpdate (\"AGI/TMT (MassGIS) AliasEdit.Parameters.Update\")\n c.SetChanged (\"AGI/TMT (MassGIS) AliasEdit.Parameters.Click\")\n \n OptionControlPanel.add(c,Rect.Makexy(50,60,300,80))\n c.SetEnabled (false)\n ListenList.Add(c)\n \n'--------------------------------------------------------------------------------------\n\n c = CheckBox.Make\n c.SetName (\"VisibilityCheckBox\")\n c.Set Label (\"Visibility\")\n c.SetUpdate (\"AGI/TMT (MassGIS) AliasEdit.Parameters.Update\")\n c.SetClick (\"AGI/TMT (MassGIS) AliasEdit.Parameters.Click\")\n \n OptionControlPanel.add(c,Rect.Makexy(310,40,500,60))\n c.SetEnabled (false)\n ListenList.Add(c)\n\n'--------------------------------------------------------------------------------------\n\n c = Button.Make\n c.SetName (\"AddFieldButton\")\n c.SetIcon (n.Get(\"AddTheme\"))\n c.SetUpdate (\"AG I/TMT (MassGIS) AliasEdit.Parameters.Update\")\n c.SetClick (\"AGI/TMT (MassGIS) AliasEdit.Parameters.Click\")\n c.SetHelp (\"Add New Field//Use this option to Add\"+\n \"a new field to the list of theme fields for this theme.\")\n \n OptionControlPanel.add(c,Rect.Makexy(10,20,40,50))\n\n c.SetEnabled (false)\n ListenList.Add(c)\n\n'--------------------------------------------------------------------------------------\n\n c = CheckBox.Make \n c.SetName (\"LabelCheckBox\")\n c.SetLabel (\"Label\")\n c.SetUpdate (\"AGI/TMT (MassGIS) AliasEdit.Parameters.Update\")\n c.SetClick (\"AGI/TMT (MassGIS) AliasEdit.Parameters.Click\")\n \n OptionControlPanel.add(c,Rect.Makexy(400,40,500,60))\n c.SetEnabled (false)\n ListenList.Add(c)\n \n'--------------------------------------------------------------------------------------\n\n c = Button.Make\n c.SetName (\"DeleteFieldButton\")\n c.SetIcon (n.Get(\"Cut\"))\n c.SetUpdate (\"AGI/TMT (MassGIS) AliasEdit.Parameters.Update\")\n c.SetClick (\"AGI/TMT (MassGIS) AliasEdit.Parameters.Click\")\n c.SetHelp (\"Delete Field Parameters//Use this option to delete\"+\n \"the selected field parameters.\")\n \n OptionControlPanel.add(c,Rect.Makexy(10,55,40,85))\n\n c.SetVisible(true)\n c.SetEnabled(false)\n ListenList.Add(c)\n\n'--------------------------------------------------------------------------\n\n c = TextLa bel.Make\n c.SetName (\"Message2TextLabel\")\n c.SetLabel (\"Please note, All changes you make are automatic\"+nl+\n \"saved and are reflected the Inventory.\")\n \n theDialog.GetControlPanel.add(c,Rect.Makexy(10,460,410,500))\n\n'--------------------------------------------------------------------------\n \n c = LabelButton.Make\n c.SetName (\"CancelLabelButton\")\n c.SetLabel (\"Cancel\")\n c.SetClick (\"AGI/LIB (MassGIS) Dialog.CloseLabel Button\")\n c.SetObjecttag (false)\n \n theDialog.GetControlPanel.add(c,Rect.Makexy(290,460,400,490))\n CancelLabelButton = c\n\n if (theTheme.is(Theme)) then\n 'theDialog.GetControlPanel.add(c,Rect.Makexy(290,460,400,490)) \n c.SetLabel(\"Done\")\n else\n 'theDialog.GetControlPanel.add(c,Rect.Makexy(410,460,520,490))\n end\n \n'--------------------------------------------------------------------------\n \n c = LabelButton.Make\n c.SetName (\"OKLabelButton\")\n c.SetLabel (\"Ok\")\n c.SetClick (\"AGI/TMT (MassGIS) AliasEdit.CloseLabelButton\")\n \n if (theTheme.is(Theme).Not) then\n c.SetEnabled(false)\n else\n c.SetLabel(\"Continue >>\")\n end\n \n theDialog.GetControlPanel.add(c,Rect.Makexy(410,460,520,490))\n \n'--------------------------------------------------------------------------\n\n Av.GetProject.AddDialog(theDialog)\n \n Av.Run(\"AGI/LIB (MassGIS) Dialog.MovetoCenterOfScreen\",theDialog)\n \n ParametersListBox.SetListeners(ListenList)\n Pa rametersListBox.Update\n ParametersListBox.BroadCastUpdate\n \n theDialog.Open\n \n ContinueBoolean = true\n theVtab = nil\n \n if (CancelLabelButton.GetObjecttag) then\n theVtab = ParametersListBox.GetVtab\n else\n ContinueBoolean = false\n end\n \n Av.GetProject.RemoveDialog(theDialog.AsString)\n\nReturn ({theVtab,ContinueBoolean})\n\n " ) (Script.81 Name: "AGI/TMT (MassGIS) AliasEdit.Parameters.Click" SourceCode: "' Name:AGI/TMT (MassGIS) AliasEdit.Parameters.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Thu Jul 29 14:11:37 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Thu Jul 29 14:11:37 1999\n'------------------------------------------------------------------------\n\n if (Self.GetObjecttag.is(Boolean)) then\n Self.SetEnabled(Self.GetObjecttag)\n\n if (Self.isEnabled.Not) then\n Return Nil\n end\n \n end\n \n ParametersListBox = Self.GetDialog.FindbyName(\"ParametersListBox\")\n theVtab = ParametersListBox.GetVtab\n \n if (theVtab.is(Vtab).Not) then\n Return nil\n end\n \n aRec = ParametersListBox.GetCurrentRecord\n theCurrentRow = ParametersListBox.GetCurrentRow\n \n'-----------------------------------------------------------------------------------\n\n if ((Self.GetName = \"VisibilityCheckBox\") or (Self.GetName = \"LabelCheckBox\")) then\n \n if (aRec = -1 ) then\n Msgbox.Warning(\"a problem found trying to edit this record...\",\"\")\n Return Nil\n end\n \n LabelCheckBox = Self.GetDialog.FindbyName(\"LabelCheckBox\")\n VisibilityCheckBox = Self.GetDialog.FindbyName(\"VisibilityCheckBox\")\n \n if (theVtab.isEditable.Not) then\n theVtab.SetEditable(true)\n end\n \n theString = \"\"\n if (VisibilityCheckBox.isSelected) then\n theString = \"Y\"\n \n if (LabelCheckBox.isSelected) then\n theString = \"L\"\n end\n else\n theString = \"N\"\n end\n \n Visible = theVtab.FindField(\"Visible\")\n \n theVtab.SetValue(Visible,aRec,theString)\n theVtab.SetEditable(false)\n theVtab.SetEditable(true)\n \n ParametersListBox.Update\n ParametersListBox.GoRow (theCurrentRow)\n ParametersListBox.SelectCurrent (false)\n ParametersListBox.ShowCurrent\n Self.GetDialog.FindbyName(\"OKLabelButton\").SetEnabled(true )\n\n if (Self.GetDialog.FindbyName(\"CancelLabelButton\").GetLabel = \"Cancel\") then\n Self.GetDialog.FindbyName(\"CancelLabelButton\").SetEnabled(false)\n end\n \n Self.GetDialog.FindbyName(\"CancelLabelButton\").SetObjecttag(true)\n \n if (theString = \"N\") then\n LabelCheckBox.SetSelected(False)\n LabelCheckBox.SetEnabled(false)\n else\n LabelCheckBox.SetEnabled(true)\n end \n \n Return Nil\n end\n \n'---------------------- -------------------------------------------------------------\n \n if (Self.GetName = \"AliasTextLine\") then\n \n if (aRec = -1 ) then\n Msgbox.Warning(\"a problem found trying to edit this record...\",\"\")\n Return Nil\n end\n \n if (theVtab.isEditable.Not) then\n theVtab.SetEditable(true)\n end\n\n AliasFld = theVtab.FindField(\"Alias\")\n \n theVtab.SetValue(AliasFld,aRec,Self.GetText.AsString.Trim)\n theVtab.SetEditable(false)\n theVtab.SetEditable(true)\n \n ParametersListBox.Update\n ParametersListBox.GoRow (theCurrentRow)\n\n ParametersListBox.SelectCurrent (false)\n ParametersListBox.ShowCurrent \n Self.GetDialog.FindbyName(\"OKLabelButton\").SetEnabled(true)\n \n if (Self.GetDialog.FindbyName(\"CancelLabelButton\").GetLabel = \"Cancel\") then\n Self.GetDialog.FindbyName(\"CancelLabelButton\").SetEnabled(false)\n end\n \n Self.GetDialog.FindbyName(\"CancelLabelButton\").Se tObjecttag(true) \n Return Nil\n end\n \n'-----------------------------------------------------------------------------------\n \n if (Self.GetName = \"NameTextLine\") then\n \n if (aRec = -1 ) then\n Msgbox.Warning(\"a problem found trying to edit this record...\",\"\")\n Return Nil\n end\n \n if (theVtab.isEditable.Not) then\n theVtab.SetEditable(true)\n end\n\n TableField = theVtab.FindField(\"TableField\")\n \n theVtab.SetValue (TableField,aRec,Self.GetText.AsString.Trim)\n theVtab.SetEditable(false)\n theVtab.SetEditable(true)\n \n ParametersListBox.Update\n ParametersListBox.GoRow (theCurrentRow)\n\n ParametersListBox.SelectCurrent (false)\n ParametersListBox.ShowCurrent \n Self.GetDialog.FindbyName(\"OKLabelButton\").SetEnabled(true)\n\n if (Self.GetDialog.FindbyName(\"CancelLabelButton\").GetLabel = \"Cancel\") then\n Self.GetDialog.FindbyName(\"CancelLabelButton\").SetEnabled(false)\n end\n \n Self.GetDialog.FindbyName(\"CancelLabelButton\").SetObjecttag(true) \n Return Nil\n end\n \n'-----------------------------------------------------------------------------------\n \n if (Self.GetName = \"DeleteFieldButton\") then\n \n if (aRec = -1 ) then\n Msgbox.Warning(\"a problem found trying to edit this record...\",\"\")\n Return Nil\n end\n \n Str1 = \"Are you sure that you can want to remove this field's parameters?\"\n Str2 = \"Delete N ow...\"\n if (Msgbox.YesNo(Str1,Str2,false).Not) then\n Return Nil\n end\n\n if (theVtab.isEditable.Not) then\n theVtab.SetEditable(true)\n Msgbox.Info(\"ddddd\",\"\")\n end\n\n if (aRec = -1) then\n Msgbox.Info(aRec.AsString,\"\")\n Return NIl\n end\n \n theVtab.RemoveRecord(aRec)\n theVtab.SetEditable(false)\n theVtab.SetEditable(true)\n \n ParametersListBox.Update\n ParametersListBox.GoRow (0)\n Parame tersListBox.SelectCurrent (false)\n ParametersListBox.ShowCurrent\n ParametersListBox.Select\n\n Self.GetDialog.FindbyName(\"OKLabelButton\").SetEnabled(true)\n\n if (Self.GetDialog.FindbyName(\"CancelLabelButton\").GetLabel = \"Cancel\") then\n Self.GetDialog.FindbyName(\"CancelLabelButton\").SetEnabled(false)\n end\n \n Self.GetDialog.FindbyName(\"CancelLabelButton\").SetObjecttag(true)\n Return Nil\n end\n \n'----------------------------------------------------- ------------------------------\n \n if (Self.GetName = \"AddFieldButton\") then\n \n theCurrentRow = theVtab.GetNumSelRecords\n ThemeID = ParametersListBox.GetTag\n \n if (theVtab.isEditable.Not) then\n theVtab.SetEditable(true)\n end\n\n Str1 = \"Enter a field name...\"\n Str2 = \"Add Field Parameters...\"\n theField = Msgbox.Input(Str1,Str2,\"New Field\")\n \n if (theField = nil) then\n Return nil\n end\n \n if (theField.AsString.Tr im.isNull) then\n Return nil\n end\n \n aNewRec = theVtab.AddRecord \n theVtab.SetValue(theVtab.FindField(\"ThemeID\"),aNewRec,ThemeID.AsString.Trim)\n theVtab.SetValue(theVtab.FindField(\"Visible\"),aNewRec,\"Y\")\n theVtab.SetValue(theVtab.FindField(\"TableField\"),aNewRec,theField.AsString.Trim)\n theVtab.SetEditable(false)\n theVtab.SetEditable(true)\n \n ParametersListBox.Update\n ParametersListBox.GoRow (theCurrentRow)\n ParametersListBox.SelectCurr ent (false) \n ParametersListBox.ShowCurrent\n ParametersListBox.Select\n \n Self.GetDialog.FindbyName(\"OKLabelButton\").SetEnabled(true)\n\n if (Self.GetDialog.FindbyName(\"CancelLabelButton\").GetLabel = \"Cancel\") then\n Self.GetDialog.FindbyName(\"CancelLabelButton\").SetEnabled(false)\n end\n \n Self.GetDialog.FindbyName(\"CancelLabelButton\").SetObjecttag(true)\n Return Nil\n end" ) (Script.82 Name: "AGI/TMT (MassGIS) AliasEdit.Parameters.Update" SourceCode: "' Name:AGI/TMT (MassGIS) AliasEdit.Parameters.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Thu Jul 29 14:11:32 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Thu Jul 29 14:11:32 1999\n'------------------------------------------------------------------------\n\n if (Self.GetName = \"DeleteFieldButton\") then\n \n theListBox = Self.GetDialog.FindbyName(\"ParametersListBox\")\n theSelection = theListBox.GetSelection\n \n if (theSelection.Count = 0) then\n Self.SetEnabled(False)\n else\n Self.SetEnabled(True)\n end\n \n theVtab = theListBox.GetVtab\n \n if (theVtab.is(Vtab).Not) then\n Self.SetVisible(false)\n else\n if (theVtab.GetNumSelRecords > 0) then\n Self.SetVisible(true)\n else\n Self.SetVisible(false)\n end\n end\n\n Return Nil\n end\n \n'------------------------------------------------------------------- -------------\n\n if (Self.GetName = \"AddFieldButton\") then\n \n theFileName = Self.GetDialog.FindbyName(\"DBFComboBox\").GetSelection\n \n if (theFileName.is(FileName)) then\n Self.SetEnabled(true) \n else\n Self.SetEnabled(false)\n end\n \n Return Nil\n end\n \n if (Self.GetObjecttag.is(Boolean)) then\n Self.SetEnabled(Self.GetObjecttag)\n Return Nil\n end\n\n Self.SetEnabled(Self.GetDialog.FindbyName(\"ParametersListBox\").GetSelection. Count > 0)\n \n if (Self.IsEnabled.Not) then\n \n if (Self.Is(TextLine)) then\n Self.SetText(\"\")\n end\n \n if (Self.Is(CheckBox)) then\n Self.SetSelected(false)\n end\n\n end" ) (Script.83 Name: "AGI/TMT (MassGIS) AliasEdit.ParametersListBox.Select" SourceCode: "' Name:AGI/TMT (MassGIS) AliasEdit.ParametersListBox.Select\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Thu Jul 29 14:11:26 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Thu Jul 29 14:11:26 1999\n'------------------------------------------------------------------------\n\n theVtab = Self.GetVtab\n aRec = Self.GetCurrentRecord\n \n if (aRec = -1) then\n Self.GetDialog.FindbyName(\"NameTextLine\").SetEnabled(false)\n Self.GetDial og.FindbyName(\"NameTextLine\").SetText(\"\")\n Self.GetDialog.FindbyName(\"AliasTextLine\").SetEnabled(false)\n Self.GetDialog.FindbyName(\"AliasTextLine\").SetText(\"\")\n Self.GetDialog.FindbyName(\"VisibilityCheckBox\").SetEnabled(false) \n Self.GetDialog.FindbyName(\"VisibilityCheckBox\").SetSelected(false)\n Self.GetDialog.FindbyName(\"AddFieldButton\").SetEnabled(true)\n Self.GetDialog.FindbyName(\"DeleteFieldButton\").SetEnabled(false)\n Self.GetDialog.FindbyName(\"LabelCheckBox\").SetEnabled(false ) \n Self.GetDialog.FindbyName(\"LabelCheckBox\").SetSelected(false)\n Self.BroadCastUpdate\n Return Nil\n end\n \n if (theVtab.is(Vtab).Not) then\n Self.GetDialog.FindbyName(\"AliasTextLine\").SetEnabled(false)\n Self.GetDialog.FindbyName(\"AliasTextLine\").SetText(\"\")\n Self.GetDialog.FindbyName(\"VisibilityCheckBox\").SetSelected(false)\n Self.GetDialog.FindbyName(\"VisibilityCheckBox\").SetEnabled(false)\n Self.GetDialog.FindbyName(\"AddFieldButton\").SetEnabled(true)\n Self.GetD ialog.FindbyName(\"DeleteFieldButton\").SetEnabled(false)\n Self.GetDialog.FindbyName(\"LabelCheckBox\").SetEnabled(false) \n Self.GetDialog.FindbyName(\"LabelCheckBox\").SetSelected(false) \n Self.BroadCastUpdate\n Return Nil\n end\n \n VisStatus = theVtab.ReturnValue(theVtab.FindField(\"Visible\"),aRec)\n \n if (VisStatus.AsString.Trim = \"N\") then\n Self.GetDialog.FindbyName(\"LabelCheckBox\").SetEnabled(false)\n Self.GetDialog.FindbyName(\"LabelCheckBox\").SetSelected(false)\n Self.GetDi alog.FindbyName(\"VisibilityCheckBox\").SetSelected(false) \n else\n if (VisStatus.AsString.Trim = \"L\") then\n Self.GetDialog.FindbyName(\"LabelCheckBox\").SetEnabled(true)\n Self.GetDialog.FindbyName(\"LabelCheckBox\").SetSelected(true)\n else\n Self.GetDialog.FindbyName(\"LabelCheckBox\").SetEnabled(true)\n Self.GetDialog.FindbyName(\"LabelCheckBox\").SetSelected(false) \n end\n \n Self.GetDialog.FindbyName(\"VisibilityCheckBox\").SetSelected(true) \n end\n \n Self.GetDialog.FindbyName(\"NameTextLine\").SetEnabled(True)\n Self.GetDialog.FindbyName(\"NameTextLine\").SetText(theVtab.ReturnValue(theVtab.FindField(\"TableField\"),aRec))\n Self.GetDialog.FindbyName(\"AliasTextLine\").SetEnabled(true)\n Self.GetDialog.FindbyName(\"AliasTextLine\").SetText(theVtab.ReturnValue(theVtab.FindField(\"Alias\"),aRec))\n Self.GetDialog.FindbyName(\"VisibilityCheckBox\").SetEnabled(true) \n Self.GetDialog.FindbyName(\"AddFieldButton\").SetEnabled(true)\n Self.GetDialog.FindbyName(\"DeleteFieldButt on\").SetEnabled(true)\n \n Self.BroadCastUpdate\n " ) (Script.84 Name: "AGI/TMT (MassGIS) AliasEdit.ParametersListBox.Update" SourceCode: "' Name:AGI/TMT (MassGIS) AliasEdit.ParametersListBox.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Thu Jul 29 14:11:19 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Thu Jul 29 14:11:19 1999\n'------------------------------------------------------------------------\n\n theVtab = nil\n theFileName = Self.GetObjecttag\n \n if (theFileName = nil) then\n \n if (Self.GetDialog.FindbyName(\"DBFComboBox\").isEnabled.Not) then\n theLabel = \"You do not have Administrator access to add/delete or edit \"+nl+\n \"the Alias properties for this themeID!\"\n \n Self.GetDialog.FindbyName(\"MessageTextLabel\").SetLabel(theLabel)\n Self.SetFieldNamesVisible (false)\n Self.DefineFromList({\"Hint:\",\n \" The Alias parameters for this ThemeID can not be added without\",\n \" Administrator access.\"})\n Return nil\n else\n theLabel = \"This theme ID's Field parameters does not have a designated\"+nl+\n \"Database file. Choose a DBF to store any Join/Link Events you enter..\"\n \n Self.GetDialog.FindbyName(\"MessageTextLabel\").SetLabel(theLabel)\n Self.SetFieldNamesVisible (false)\n Self.DefineFromList({\"Hint:\",\n \" This menu allows you to add field parameters for the current theme. To start\",\n \" adding and defining these parameters you need to choose a target database to\",\n \" store the events. \",\n \"\",\n \" Use the Store in Options to either choose an existing dbase file or create \",\n \" a new one...\"})\n Return Nil\n end\n end\n \n if (theFileName = nil) then\n Return nil\n end\n \n ThemeID = Self.GetTag\n theVtab = Vtab.Make(th eFileName,true,false)\n \n if (theVtab.HasError) then\n Return Nil\n end\n \n'---------------------------------------------------------------------\n\n theList = Self.GetDialog.FindbyName(\"DBFComboBox\").GetList\n theList.Insert(theVtab.GetBaseTableFileName.Clone)\n theList.RemoveDuplicates\n \n Self.GetDialog.FindbyName(\"DBFComboBox\").DefineFromList(theList)\n\n'--------------------------------------------------------------------- \n \n QueryString = \" [ThemeID] = \"+ThemeID.AsString.Quote\n theQuery = theVtab.Query (QueryString, theVtab.GetSelection, #VTAB_SELTYPE_NEW) \n \n if (theVtab.is(Vtab).Not) then\n Return nil\n end\n \n theVtab = Vtab.Make(theFileName,true,false)\n QueryString = \" [ThemeID] = \"+ThemeID.AsString.Quote\n \n theQuery = theVtab.Query (QueryString, theVtab.GetSelection, #VTAB_SELTYPE_NEW)\n\n VisibleField = {}\n \n if (theVtab.FindField(\"ThemeID\") <> nil) then\n theVtab.FindField(\"ThemeID\").SetAlias(\"Reference ID\")\n theVtab.FindField(\"ThemeID\").SetVisible(false)\n end\n\n if (theVtab.FindField(\"TableField\") <> nil) then\n theVtab.FindField(\"TableField\").SetAlias(\"Table Field Name\")\n VisibleField.Add(theVtab.FindField(\"TableField\"))\n end\n\n if (theVtab.FindField(\"Visible\") <> nil) then\n theVtab.FindField(\"Visible\").SetAlias(\"Field Visibility\")\n VisibleField.Add(theVtab.FindField(\"Visible\"))\n end\n\n if (theVtab.FindField(\"Alias\") <> nil) then\n theVtab.FindField(\"Alias\").SetAlias(\"Field Alias\")\n VisibleField.Add(theVtab.FindFi eld(\"Alias\"))\n end\n\n Self.DefineFromVtab(theVtab,VisibleField,true)\n Self.SetFieldNamesVisible (true)\n \n'----------------------------------------------------------------------------\n\n AdminAccess = Av.Run(\"AGI/TMT (MassGIS) CheckPassword\",\"\")\n\n if (theVtab.AsString = \"inquiry.dbf\") then\n if (AdminAccess.Not) then\n Self.GetDialog.FindbyName(\"AddFieldButton\").SetVisible(false)\n Self.GetDialog.FindbyName(\"DeleteFieldButton\").SetVisible(false)\n Self.GetDialog.FindbyNam e(\"AliasTextLine\").SetObjecttag(false)\n Self.GetDialog.FindbyName(\"VisibilityCheckBox\").SetObjecttag(false) \n Self.GetDialog.FindbyName(\"LabelCheckBox\").SetObjecttag(false) \n Self.GetDialog.FindbyName(\"NameTextLine\").SetObjecttag(false) \n Self.GetDialog.FindbyName(\"AliasTextLine\").SetEnabled(false) \n \n theLabel = \"This theme ID's Field parameters are stored in the Inquiry.dbf\"+nl+\n \"file. You do NOT have write access to edit th ese parameters.\"\n\n Self.GetDialog.FindbyName(\"MessageTextLabel\").SetLabel(theLabel)\n Self.GetDialog.FindbyName(\"MessageTextLabel\").SetVisible(true)\n Self.GetDialog.FindbyName(\"Message2TextLabel\").SetLabel(theVtab.GetBaseTableFileName.AsString.Proper+nl+\"Sorry, No Write Access...\")\n else\n \n theLabel = \"This theme ID's Join/Link Events are stored in the Inquiry.dbf\"+nl+\n \"file. You have full Administrator access to edit these parameters.\"\n \n Self.GetDialog.FindbyName(\"MessageTextLabel\").SetLabel(theLabel)\n Self.GetDialog.FindbyName(\"MessageTextLabel\").SetVisible(true)\n end\n else\n theLabel = \"This theme ID's Join/Link Events are stored in the \"+theVtab.AsString+nl+\n \"file. You have standard access to edit these parameters.\"\n \n Self.GetDialog.FindbyName(\"MessageTextLabel\").SetLabel(theLabel)\n Self.GetDialog.FindbyName(\"MessageTextLabel\").SetVisible(true)\n end\n" ) (Script.85 Name: "AGI/TMT (MassGIS) AliasEdit.ThemeFieldsComboBox.Select" SourceCode: "' Name:AGI/TMT (MassGIS) AliasEdit.ThemeFieldsComboBox.Select\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Thu Jul 29 14:11:13 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Thu Jul 29 14:11:13 1999\n'------------------------------------------------------------------------\n\n theField = Self.GetSelection\n ParametersListBox = Self.GetDialog.FindbyName(\"ParametersListBox\")\n theVtab = ParametersListBox.GetVtab\n theTheme = Self.GetObjecttag\n \n if (theVtab.is(Vtab).Not) then\n Msgbox.Info(\"Please choose or create a Inquiry Database before you start \"+\n \"adding fields...\",\"Note...\")\n Return nil\n end\n \n if (theField.is(Field)) then\n\n ThemeID = ParametersListBox.GetTag\n \n if (theVtab.isEditable.Not) then\n theVtab.SetEditable(true)\n end\n \n VisStatus = \"N\"\n \n if (theField.isVisible) then\n VisStatus = \"Y\"\n end\n \n if (theTheme.GetLabelField.is(Field)) then \n if (theTheme.GetLabelField = theField) then\n VisStatus = \"L\"\n end\n end\n\n aNewRec = theVtab.AddRecord \n theVtab.SetValue(theVtab.FindField(\"ThemeID\"), aNewRec, ThemeID.AsString.Trim)\n theVtab.SetValue(theVtab.FindField(\"Visible\"), aNewRec, VisStatus.AsString)\n theVtab.SetValue(theVtab.FindField(\"TableField\"),aNewRec, theField.AsString.Trim)\n theVtab.SetValue(theVtab.FindField(\"Ali as\"), aNewRec, theField.GetAlias.AsString.Trim)\n theVtab.SetEditable(false)\n theVtab.SetEditable(true)\n \n ParametersListBox.Update\n Self.GetDialog.FindbyName(\"CancelLabelButton\").SetObjecttag(true)\n Return Nil\n\n end" ) (Script.86 Name: "AGI/TMT (MassGIS) CheckPassword" SourceCode: "' Name:AGI/TMT (MassGIS) CheckPassword\n' Headline:\n' Called By: Several Scripts\n' Calls To: None\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:24:09 1999\n'\n' Requires: _AdminEditPassword\n'\n' Returns: Boolean (true/false)\n'\n' Comments: This script is called by other scripts in all the tools to\n' check the Administrator access of the current users. You can\n' change the administrator password globally by altering the value\n' in this script.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:24:09 1999\n'------------------------------------------------------------------------\n\n theStatus = (_AdminEditPassword.AsString.Trim = \"administrator\")\n \n Return (theStatus)\n" ) (Script.87 Name: "AGI/TMT (MassGIS) DBF.Create2DThemeDBF" SourceCode: "' Name:AGI/TMT (MassGIS) DBF.Create2DThemeDBF\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Thu Jul 29 14:11:05 1999\n'\n' Requires:\n'\n' Returns: Vtab\n'\n' Comments: This script is used by other scripts to create new Inventory\n' (Theme) Vtab files. It returns a Vtab to the calling script.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Thu Jul 29 14:11:05 1999\n'------------------------------------------------------------------------\n\n if (Av.GetProject.GetFileName <> nil) then\n thePrjFileName = Av.GetProject.GetFileName.Clone\n thePrjFileName.StripFile\n Def = thePrjFileName.MakeTmp(\"inv_inv\", \"dbf\")\n else\n Def = Av.GetProject.MakeFileName(\"inv_inv\", \"dbf\")\n end\n \n file1 = FileDialog.Put(Def,\"inv_*.dbf\",\"DBF File *.dbf\")\n \n if (file1 = Nil) then \n Return Nil \n end\n \n'------------------------------------------------------------------------\n\n if (Av.GetProject.GetFileName = nil) then\n Msgb ox.Warning(\"The current project has not been saved, so the Theme Tool will \"+\n \"will not be able to automatically find and load this Dbase file.\",\"Please Note...\")\n else\n thePath = Av.GetProject.GetFileName.Clone\n thePath.StripFile\n FilePath = file1.Clone\n FilePath.StripFile\n \n if (FilePath <> thePath) then\n Msgbox.Warning(\"This file is not saved in the current project directory. While the file is \"+\n \"va lid, the Theme Tool will not find and load its ThemeID's.\",\"Please Note...\")\n end\n end\n \n'-------------------------------------------------------------------------\n\n myvtab = VTab.MakeNew(file1,dbase)\n \n if (MyVtab.is(Vtab).not) then\n Msgbox.Warning(\"Unable to create this Extent Inventory DBase file!\",file1.AsString)\n Av.PurgeObjects\n Return Nil \n end\n \n if (MyVtab.HasError) then\n Msgbox.Warning(\"An Error was found while trying to creat e this Extent Inventory DBase file!\",file1.AsString)\n Av.PurgeObjects\n Return Nil \n end\n \n MyVtab.SetEditable(true)\n \n field1 = Field.Make(\"themeid\" ,#FIELD_CHAR, 16,0)\n field2 = Field.Make(\"Men1\" ,#FIELD_CHAR,200,0)\n field3 = Field.Make(\"Men2\" ,#FIELD_CHAR,200,0)\n field4 = Field.Make(\"Men3\" ,#FIELD_CHAR,200,0)\n field5 = Field.Make(\"Menleg\" ,#FIELD_CHAR,200,0)\n field6 = Field.Make(\"Thmlbl\" ,#FIELD_CHAR,200,0)\n field7 = Field.Make(\"Ftrtyp \" ,#FIELD_CHAR, 50,0)\n field8 = Field.Make(\"Defleg\" ,#FIELD_CHAR, 1,0)\n field9 = Field.Make(\"Active\" ,#FIELD_CHAR, 1,0)\n field10 = Field.Make(\"Srcfile\" ,#FIELD_CHAR,200,0)\n field11 = Field.Make(\"Qry\" ,#FIELD_CHAR,200,0)\n field12 = Field.Make(\"Lufld\" ,#FIELD_CHAR,100,0)\n field13 = Field.Make(\"Lufile\" ,#FIELD_CHAR,200,0)\n field14 = Field.Make(\"Symop\" ,#FIELD_CHAR, 20,0)\n field15 = Field.Make(\"Legfld\" ,#FIELD_CHAR,100,0)\n field16 = Field.Make(\"Legfile\" ,#FIELD_CHAR,2 00,0)\n field17 = Field.Make(\"Scalemin\",#FIELD_FLOAT,26,5)\n field18 = Field.Make(\"Scalemax\",#FIELD_FLOAT,26,5)\n field19 = Field.Make(\"Comments\",#FIELD_CHAR,100,0)\n fldlst = {field1,field2,field3,field4,field5,field6,field7}\n fldlst = fldlst + {field8,field9,field10,field11,field12}\n fldlst = fldlst + {field13,field14,field15,field16,field17,field18,field19}\n \n SDE1 = Field.Make(\"SDEFlag\", #FIELD_LOGICAL, 10,0)\n SDE2 = Field.Make(\"SDESrvInst\", #FIELD_CHAR ,250,0)\n SDE3 = Field.Make(\"SDEDatBase\", #FIELD_CHAR ,250,0)\n SDE4 = Field.Make(\"SDEUserNam\", #FIELD_CHAR , 50,0)\n SDE5 = Field.Make(\"SDEPassWd\", #FIELD_CHAR ,100,0)\n SDE6 = Field.Make(\"SDETableNm\", #FIELD_CHAR ,100,0)\n SDE7 = Field.Make(\"SDESColumn\", #FIELD_CHAR ,100,0)\n SDE8 = Field.Make(\"SDEConType\", #FIELD_CHAR ,100,0)\n SDE9 = Field.Make(\"SDESelFlds\", #FIELD_CHAR ,250,0)\n SDE10 = Field.Make(\"SDESelFld2\", #FIELD_CHAR ,250,0)\n \n fldlst = fldlst + {SDE1,SDE2,SDE3,SDE4,SDE 5,SDE6,SDE7,SDE8,SDE9,SDE10}\n \n myvtab.AddFields(fldlst)\n \n \n MyVtab.SetEditable(false)\n Av.PurgeObjects\n \nReturn (MyVtab)" ) (Script.88 Name: "AGI/TMT (MassGIS) DBF.CreateAliasDBF" SourceCode: "' Name:AGI/TMT (MassGIS) DBF.CreateAliasDBF\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Thu Jul 29 14:10:59 1999\n'\n' Requires: Nil\n'\n' Returns: VTab\n'\n' Comments: This script is used by other scripts to create a new\n' Theme Field Parmeters Dbase file. It returns a Vtab to the\n' calling script.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Thu Jul 29 14:10:59 1999\n'------------------------------------------------------------------------\n\n if (Av.GetProj ect.GetFileName <> nil) then\n thePrjFileName = Av.GetProject.GetFileName.Clone\n thePrjFileName.StripFile\n Def = thePrjFileName.MakeTmp(\"als_usr\", \"dbf\")\n else\n Def = Av.GetProject.MakeFileName(\"als_usr\", \"dbf\")\n end\n\n file1 = FileDialog.Put(Def,\"Als_*.dbf\",\"DBF File *.dbf\")\n \n if (file1 = Nil) then \n Return Nil \n end\n \n'------------------------------------------------------------------------\n\n if (Av.GetProject.GetFileName = nil) then\n Msgbox.Warning(\"Th e current project has not been saved, so the Alias Tool will \"+\n \"will not be able to automatically find and load this Dbase file.\",\"Please Note...\")\n else\n thePath = Av.GetProject.GetFileName.Clone\n thePath.StripFile\n FilePath = file1.Clone\n FilePath.StripFile\n \n if (FilePath <> thePath) then\n Msgbox.Warning(\"This file is not saved in the current project directory. While the file is \"+\n \"valid, the Exten t Tool will not find and load its Alias Parameters.\",\"Please Note...\")\n end\n end\n \n'-------------------------------------------------------------------------\n\n myvtab = VTab.MakeNew(file1,dbase)\n \n if (MyVtab.is(Vtab).not) then\n Msgbox.Warning(\"Unable to create this Alias Inventory DBase file!\",file1.AsString)\n Av.PurgeObjects\n Return Nil \n end\n \n if (MyVtab.HasError) then\n Msgbox.Warning(\"An Error was found while trying to create this Alias Inventory DBas e file!\",file1.AsString)\n Av.PurgeObjects\n Return Nil \n end\n \n MyVtab.SetEditable(true)\n\n field1 = Field.Make(\"Themeid\" ,#FIELD_CHAR, 16,0)\n field2 = Field.Make(\"TableField\" ,#FIELD_CHAR, 200,0)\n field3 = Field.Make(\"Visible\" ,#FIELD_CHAR, 10,0)\n field4 = Field.Make(\"Alias\" ,#FIELD_CHAR, 200,0)\n\n fldlst = {field1,field2,field3,field4,}\n \n myvtab.AddFields(fldlst)\n \n MyVtab.SetEditable(false)\n Av.PurgeObjects\n \nReturn (MyVtab)" ) (Script.89 Name: "AGI/TMT (MassGIS) DBF.CreateJoin/LinkDBF" SourceCode: "' Name:AGI/TMT (MassGIS) DBF.CreateJoin/LinkDBF\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Thu Jul 29 14:10:52 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This script is used by other scripts to build a new \n' Vtab (Dbase file) for use in the Join/Link functionality.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Thu Jul 29 14:10:52 1999\n'------------------------------------------------------------------------\n\n if (Av.GetProject.GetFileName <> nil) then\n thePrjFileName = Av.GetProject.GetFileName.Clone\n thePrjFileName.StripFile\n Def = thePrjFileName.MakeTmp(\"lnk_usr\", \"dbf\")\n else\n Def = Av.GetProject.MakeFileName(\"lnk_usr\", \"dbf\")\n end\n\n file1 = FileDialog.Put(Def,\"lnk_*.dbf\",\"DBF File *.dbf\")\n \n if (file1 = Nil) then \n Return Nil \n end\n \n'------------------------------------------------------------------------\n\n if (Av.GetProject.GetFileName = nil) then\n Msgbox.Warning(\"The current project has not been save d, so the Join/Link tools will \"+\n \"will not be able to automatically find and load this Dbase file.\",\"Please Note...\")\n else\n thePath = Av.GetProject.GetFileName.Clone\n thePath.StripFile\n FilePath = file1.Clone\n FilePath.StripFile\n \n if (FilePath <> thePath) then\n Msgbox.Warning(\"This file is not saved in the current project directory. While the file is \"+\n \"valid, the Extent Tool will not find and load its Join/Link Events.\",\"Please Note...\")\n end\n end\n \n'-------------------------------------------------------------------------\n\n MyVtab = VTab.MakeNew(file1,dbase)\n \n if (MyVtab.is(Vtab).not) then\n Msgbox.Warning(\"Unable to create this Join/Link Inventory DBase file!\",file1.AsString)\n Av.PurgeObjects\n Return Nil \n end\n \n if (MyVtab.HasError) then\n Msgbox.Warning(\"An Error was found while trying to create this Join/Link Inventory DBase file!\",file1.AsStrin g)\n Av.PurgeObjects\n Return Nil \n end\n \n MyVtab.SetEditable(true)\n\n field1 = Field.Make(\"Themeid\" ,#FIELD_CHAR, 16 ,0)\n field2 = Field.Make(\"Field1\" ,#FIELD_CHAR, 200,0)\n field3 = Field.Make(\"TheTable\" ,#FIELD_CHAR, 200,0)\n field4 = Field.Make(\"Field2\" ,#FIELD_CHAR, 200,0)\n field5 = Field.Make(\"IDLabel\" ,#FIELD_CHAR, 200,0)\n field6 = Field.Make(\"JoinorLink\",#FIELD_CHAR, 200,0)\n field7 = Field.Make(\"Query\" ,#FIELD_CHAR, 200,0)\n field8 = Field. Make(\"TheTable2\" ,#FIELD_CHAR, 200,0)\n field9 = Field.Make(\"ResultTabl\",#FIELD_CHAR, 200,0)\n field10 = Field.Make(\"Thmlbl\" ,#FIELD_CHAR, 200,0)\n field11 = Field.Make(\"Men3\" ,#FIELD_CHAR, 200,0)\n\n fldlst = {field1,field2,field3,field4,\n field5,field6,field7,field8,\n field9,field10,field11}\n \n MyVtab.AddFields(fldlst) \n MyVtab.SetEditable(false)\n Av.PurgeObjects\n \nReturn (MyVtab)" ) (Script.90 Name: "AGI/TMT (MassGIS) Join/LinkMenu.AddToProjectLabelButton.Click" SourceCode: "' Name:AGI/TMT (MassGIS) Join/LinkMenu.AddToProjectLabelButton.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Jul 28 13:49:49 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Jul 28 13:49:49 1999\n'------------------------------------------------------------------------\n\n if (Self.GetDialog.FindbyName(\"TableFieldName\").isEnabled.Not) then\n Self.SetVisible(false)\n Return Nil\n end\n \n theTableName = Sel f.GetDialog.FindbyName(\"TableFieldName\").GetText\n \n if (TheTableName.AsString.isNull) then\n Self.SetVisible(false)\n Return Nil\n end\n\n theFileName = TheTableName.AsString.AsFileName\n \n if (File.Exists(theFileName).Not) then\n Self.SetVisible(false)\n Return nil\n end\n \n theVtab = Vtab.Make(theFileName,false,false)\n \n if (theVtab.HasError) then\n Msgbox.Warning(\"Unable to open this database into an ArcView Table!\",\"Stopping...\")\n Return Nil\n end\n \n a table = Table.Make(theVtab)\n atable.SetName(theFileName.GetBaseName.AsString)\n \n Av.GetProject.AddDoc(atable)\n \n Self.GetDialog.FindbyName(\"DataBaselistBox\").BroadCastUpdate" ) (Script.91 Name: "AGI/TMT (MassGIS) Join/LinkMenu.CloseLabelButton" SourceCode: "' Name:AGI/TMT (MassGIS) Join/LinkMenu.CloseLabelButton\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:25:12 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:25:12 1999\n'------------------------------------------------------------------------\n\n Self.GetDialog.FindbyName(\"CancelLabelButton\").SetObjecttag(true)\n Self.GetDialog.FindbyName(\"CancelLabelButton\").Click" ) (Script.92 Name: "AGI/TMT (MassGIS) Join/LinkMenu.ControlPanel.Update" SourceCode: "' Name:AGI/TMT (MassGIS) Join/LinkMenu.ControlPanel.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:27:08 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:27:08 1999\n'------------------------------------------------------------------------\n\n if (Self.GetObjecttag.is(Boolean)) then\n if (Self.GetObjecttag.Not) then\n Self.SetEnabled(false)\n Return nil\n end\n end\n \n Self.SetEnabled(Self.GetDialog.FindbyName(\"DataBaselistBox\").GetSelection.Count > 0)\n " ) (Script.93 Name: "AGI/TMT (MassGIS) Join/LinkMenu.DataBaseListBox.Apply" SourceCode: "' Name:AGI/TMT (MassGIS) Join/LinkMenu.DataBaseListBox.Apply\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Aug 25 11:51:54 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Aug 25 11:51:54 1999\n'------------------------------------------------------------------------\n\n Self.Select" ) (Script.94 Name: "AGI/TMT (MassGIS) Join/LinkMenu.DataBaseListBox.Select" SourceCode: "' Name:AGI/TMT (MassGIS) Join/LinkMenu.DataBaseListBox.Select\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:27:22 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:27:22 1999\n'------------------------------------------------------------------------\n\n theVtab = Self.GetVtab\n aRec = Self.GetCurrentRecord\n \n if (aRec = -1) then\n Self.GetDialog.FindbyName(\"TableFieldName\").SetText(\"\")\n Self.GetDialog.F indbyName(\"Field1TextLine\").SetText(\"\")\n Self.GetDialog.FindbyName(\"Field2TextLine\").SetText(\"\")\n Self.GetDialog.FindbyName(\"QueryTextLine\").SetText(\"\") \n Self.GetDialog.FindbyName(\"ResultTableTextLine\").SetText(\"\") \n Self.GetDialog.FindbyName(\"IDLabelTextLine\").SetText(\"\")\n Self.GetDialog.FindbyName(\"Table2TextLine\").SetText(\"\")\n Self.GetDialog.FindbyName(\"ReverseCheckBox\").SetSelected(false)\n \n Self.GetDialog.FindbyName(\"TableFieldName\").SetEnabled(false)\n Self.GetDialo g.FindbyName(\"Field1TextLine\").SetEnabled(false)\n Self.GetDialog.FindbyName(\"Field2TextLine\").SetEnabled(false)\n Self.GetDialog.FindbyName(\"QueryTextLine\").SetEnabled(false)\n Self.GetDialog.FindbyName(\"ResultTableTextLine\").SetEnabled(false) \n Self.GetDialog.FindbyName(\"IDLabelTextLine\").SetEnabled(false)\n Self.GetDialog.FindbyName(\"Table2TextLine\").SetEnabled(false)\n Self.GetDialog.FindbyName(\"ReverseCheckBox\").SetEnabled(false)\n Self.GetDialog.FindbyName(\"JoinRadioButton\").SetE nabled(false)\n Self.GetDialog.FindbyName(\"LinkRadioButton\").SetEnabled(false)\n \n Self.BroadCastUpdate\n Return Nil\n end\n \n if (theVtab.is(Vtab).Not) then\n Self.BroadCastUpdate\n Return Nil\n end\n \n JoinorLink = theVtab.ReturnValue(theVtab.FindField(\"JoinOrLink\"),aRec)\n JoinStatus = true\n Direction = true\n \n if (JoinOrLink.AsString.IsNull) then\n JoinStatus = true\n else\n if (JoinorLink.AsString.Trim = \"BL\") then\n JoinStatus = false\n Direction = fa lse\n end\n \n if (JoinorLink.AsString.Trim = \"BJ\") then\n JoinStatus = true\n Direction = false\n end\n\n if (JoinorLink.AsString.Trim = \"J\") then\n JoinStatus = true\n Direction = true\n end\n\n if (JoinorLink.AsString.Trim = \"L\") then\n JoinStatus = false\n Direction = true\n end\n end\n \n if (JoinStatus) then\n Self.GetDialog.FindbyName(\"JoinRadioButton\").Select\n else\n Self.GetDialog.FindbyName(\"LinkRadioB utton\").Select\n end\n\n if (Direction) then\n Self.GetDialog.FindbyName(\"ReverseCheckBox\").SetSelected(false)\n else\n Self.GetDialog.FindbyName(\"ReverseCheckBox\").SetSelected(true)\n end\n\n Self.GetDialog.FindbyName(\"TableFieldName\").SetText(theVtab.ReturnValue(theVtab.FindField(\"TheTable\"),aRec))\n Self.GetDialog.FindbyName(\"Field1TextLine\").SetText(theVtab.ReturnValue(theVtab.FindField(\"Field1\"),aRec))\n Self.GetDialog.FindbyName(\"Field2TextLine\").SetText(theVtab.ReturnValue(theVtab.FindField(\"Fie ld2\"),aRec))\n Self.GetDialog.FindbyName(\"QueryTextLine\").SetText(theVtab.ReturnValue(theVtab.FindField(\"Query\"),aRec)) \n Self.GetDialog.FindbyName(\"ResultTableTextLine\").SetText(theVtab.ReturnValue(theVtab.FindField(\"ResultTabl\"),aRec)) \n Self.GetDialog.FindbyName(\"IDLabelTextLine\").SetText(theVtab.ReturnValue(theVtab.FindField(\"IDLabel\"),aRec))\n Self.GetDialog.FindbyName(\"Table2TextLine\").SetText(theVtab.ReturnValue(theVtab.FindField(\"TheTable2\"),aRec))\n \n Self.BroadCastUpdate" ) (Script.95 Name: "AGI/TMT (MassGIS) Join/LinkMenu.DataBaseListBox.Update" SourceCode: "' Name:AGI/TMT (MassGIS) Join/LinkMenu.DataBaseListBox.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:27:37 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:27:37 1999\n'------------------------------------------------------------------------\n\n theVtab = nil\n theFileName = Self.GetObjecttag\n \n if (theFileName = nil) then\n\n if (Self.GetDialog.FindbyName(\"DBFComboBox\").isEnabled.Not) then\n theLabel = \"You do not have Administrator access to add/delete or edit \"+nl+\n \"the Join/Link events for this themeID!\"\n \n Self.GetDialog.FindbyName(\"MessageTextLabel\").SetLabel(theLabel)\n Self.SetFieldNamesVisible (false)\n Self.DefineFromList({\"Hint:\",\n \" The Join/Link events for this ThemeID can not be added without\",\n \" Administrator access.\"})\n \n Return Nil\n else\n theLabel = \"This theme ID's Field parameters does not have a designated\"+nl+\n \"Database file. Choose a DBF to store any Join/Link Events you enter..\"\n \n Self.GetDialog.FindbyName(\"MessageTextLabel\").SetLabel(theLabel)\n Self.SetFieldNamesVisible (false)\n Self.DefineFromList({\"Hint:\",\n \" This menu allows you to add Join/Link Events to the current theme. To start\",\n \" adding and defining these events you need to choose a target database to\",\n \" store the events. \",\n \"\",\n \" Use the Store in Options to either choose an existing dbase file or create a new one...\"})\n Return Nil\n end\n end\n \n ThemeID = Self.GetTag\n theVtab = Vtab.Make(theFileName,true,false)\n QueryString = \" [ThemeID] = \"+ThemeID.AsString .Quote\n theQuery = theVtab.Query (QueryString, theVtab.GetSelection, #VTAB_SELTYPE_NEW) \n \n if (theVtab.is(Vtab).Not) then\n Return nil\n end\n \n'-----------------------------------------------------------------\n\n theList = Self.GetDialog.FindbyName(\"DBFComboBox\").GetList\n theList.Insert(theVtab.GetBaseTableFileName.Clone)\n theList.RemoveDuplicates\n \n Self.GetDialog.FindbyName(\"DBFComboBox\").DefineFromList(theList)\n \n'-----------------------------------------------------------------\n\n VisibleField = {}\n \n if (theVtab.FindField(\"TheTable\") <> nil) then\n theVtab.FindField(\"TheTable\").SetAlias(\"Target Database\")\n VisibleField.Add(theVtab.FindField(\"TheTable\"))\n end\n \n if (theVtab.FindField(\"Field1\") <> nil) then\n theVtab.FindField(\"Field1\").SetAlias(\"From Field\")\n VisibleField.Add(theVtab.FindField(\"Field1\"))\n end\n\n if (theVtab.FindField(\"Field2\") <> nil) then\n theVtab.FindField(\"Field2\").SetAlias(\"To Field\")\n VisibleField.Add(theVtab.FindF ield(\"Field2\"))\n end\n\n if (theVtab.FindField(\"JoinorLink\") <> nil) then\n theVtab.FindField(\"JoinorLink\").SetAlias(\"Connection Type\")\n VisibleField.Add(theVtab.FindField(\"JoinorLink\"))\n end\n \n Self.DefineFromVtab(theVtab,VisibleField,true)\n Self.SetFieldNamesVisible (true)\n \n'----------------------------------------------------------------------------\n\n AdminAccess = Av.Run(\"AGI/TMT (MassGIS) CheckPassword\",\"\")\n \n Self.GetDialog.FindbyName(\"AdvancedControlPanel\").SetObjecttag (true)\n Self.GetDialog.FindbyName(\"OptionControlPanel\").SetObjecttag(true)\n \n if (theVtab.AsString = \"joinlink.dbf\") then\n if (AdminAccess.Not) then\n Self.GetDialog.FindbyName(\"AddButton\").SetVisible(false)\n Self.GetDialog.FindbyName(\"DeleteButton\").SetVisible(false) \n \n theLabel = \"This theme ID's Join/Link events are stored in the JoinLink.dbf\"+nl+\n \"file. You do NOT have write access to edit these parameters.\"\n \n Self.GetDialog.FindbyName(\"MessageTextLabel\").SetLabel(theLabel)\n Self.GetDialog.FindbyName(\"MessageTextLabel\").SetVisible(true)\n Self.GetDialog.FindbyName(\"AdvancedControlPanel\").SetObjecttag(false)\n Self.GetDialog.FindbyName(\"OptionControlPanel\").SetObjecttag(false)\n else\n \n theLabel = \"This theme ID's Field parameters are stored in the JoinLink.dbf\"+nl+\n \"file. You have full Administrator access to edit these parameters.\"\n \n Self.GetDialog.FindbyName(\"MessageTextLabel\").SetLabel(theLabel)\n Self.GetDialog.FindbyName(\"MessageTextLabel\").SetVisible(true)\n end\n else\n theLabel = \"This theme ID's Field parameters are stored in the \"+theVtab.AsString+nl+\n \"file. You have standard access to edit these parameters.\"\n \n Self.GetDialog.FindbyName(\"MessageTextLabel\").SetLabel(theLabel)\n Self.GetDialog.FindbyName(\"MessageTextLabel\").SetVisible(tr ue)\n end\n" ) (Script.96 Name: "AGI/TMT (MassGIS) Join/LinkMenu.DBFComboBox.Select" SourceCode: "' Name:AGI/TMT (MassGIS) Join/LinkMenu.DBFComboBox.Select\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:27:51 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:27:51 1999\n'------------------------------------------------------------------------\n\n theSelection = Self.GetSelection\n \n if (theSelection.is(FileName)) then\n Self.GetDialog.FindbyName(\"TableFieldName\").SetText(\"\")\n Self.GetDialog.Findb yName(\"Field1TextLine\").SetText(\"\")\n Self.GetDialog.FindbyName(\"Field2TextLine\").SetText(\"\")\n Self.GetDialog.FindbyName(\"QueryTextLine\").SetText(\"\") \n Self.GetDialog.FindbyName(\"ResultTableTextLine\").SetText(\"\") \n Self.GetDialog.FindbyName(\"IDLabelTextLine\").SetText(\"\")\n Self.GetDialog.FindbyName(\"Table2TextLine\").SetText(\"\")\n Self.GetDialog.FindbyName(\"ReverseCheckBox\").SetSelected(false)\n\n Self.GetDialog.FindbyName(\"DataBaselistBox\").SetObjecttag(theSelection.Clone)\n Self.GetDialog.FindbyName(\"DataBaselistBox\").Update\n Self.GetDialog.FindbyName(\"DataBaselistBox\").BroadCastUpdate\n Return Nil\n else\n theVtab = Av.Run(\"AGI/TMT (MassGIS) DBF.CreateJoin/LinkDBF\",Nil)\n \n if (TheVtab.is(Vtab).Not) then\n theList = Self.GetList\n Self.DefineFromList(theList)\n Return nil\n end\n \n theList = Self.GetList\n theList.Insert(theVtab.GetBaseTableFileName.Clone)\n theList.RemoveDuplicates\n Self.Define FromList(theList)\n \n Self.GetDialog.FindbyName(\"TableFieldName\").SetText(\"\")\n Self.GetDialog.FindbyName(\"Field1TextLine\").SetText(\"\")\n Self.GetDialog.FindbyName(\"Field2TextLine\").SetText(\"\")\n Self.GetDialog.FindbyName(\"QueryTextLine\").SetText(\"\") \n Self.GetDialog.FindbyName(\"ResultTableTextLine\").SetText(\"\") \n Self.GetDialog.FindbyName(\"IDLabelTextLine\").SetText(\"\")\n Self.GetDialog.FindbyName(\"Table2TextLine\").SetText(\"\")\n Self.GetDialog.FindbyName(\"ReverseCheckB ox\").SetSelected(false)\n\n Self.GetDialog.FindbyName(\"DataBaselistBox\").SetObjecttag(theVtab.GetBaseTableFileName.Clone)\n Self.GetDialog.FindbyName(\"DataBaselistBox\").Update\n Self.GetDialog.FindbyName(\"DataBaselistBox\").BroadCastUpdate\n end" ) (Script.97 Name: "AGI/TMT (MassGIS) Join/LinkMenu.Open" SourceCode: "' Name:AGI/TMT (MassGIS) Join/LinkMenu.Open\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:28:15 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This scripts creates the Join/Link Menu for both adding and\n' editing parameters.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:28:15 1999\n'------------------------------------------------------------------------\n\n ThemeID = Self.Get(0)\n TheTheme = Self.Get(1) \n \n _CurrentThemeID = ThemeID.AsString\n \n'--------------------------------------------------------------------------------------\n\n n = Av.Run(\"AGI/LIB (MassGIS) Icon Dictionary\",\"\")\n \n TheDialog = Dialog.MakeSized(true,true,true,true,Rect.MakeXY(0,0,530,500))\n \n TheDialog.SetName (\"Join(MassGIS) Menu\")\n TheDialog.SetAlwaysOnTop (true)\n TheDialog.SetCloseable (true)\n TheDialog.SetEscapeEnabled (true)\n TheDialog.UsetitleBar (true)\n TheDialog.SetModal (true)\n TheDialog.SetResizable (false)\n \n if (theTheme.is(Theme)) then\n TheDialog.SetTitle (\"Step 3, ThemeID: \"+ThemeID.AsString+\", Join/Link Events\")\n else\n TheDialog.SetTitle (\"ThemeID: \"+ThemeID.AsString+\", Join/Link Events\")\n end\n\n Av.GetProject.RemoveDialog(theDialog.AsString)\n Av.Getproject.Adddialog(TheDialog)\n ListenList = {}\n \n'---------------------------------------------------------------------------------\n\n c = TextLabel.Make\n c.SetName (\"MessageTextLabel\")\n c.SetLabel (\"\")\n \n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(10,5,500,100))\n\n'-------------------------------------------------------------------------------------\n\n JoinLinkDct = Av.GetProject.GetObjecttag.Get(\"JoinLinkDct\")\n \n if (JoinLinkDct.Get(ThemeID.AsString).is(FileName)) then\n theVtabFileName = JoinLinkDct.Get(ThemeID.AsString)\n else\n theVtabFileName = nil\n end\n \n theVtabList = Av.Run(\"AGI/LIB (MassGIS) GetVtabList\",{\"lnk_\",true})\n \n VtabFileList = {}\n For each aVtab in theVtabList\n VtabFileList.Add(aVtab.GetBaseTableFileName.Clone)\n end\n \n VtabFileList.Add(\"\")\n VtabFileList.RemoveDuplicates\n \n'---------------------------------------------------------------------------------------\n\n EditStatus = true\n \n if (theVtabFileName.AsString.Contains(\"joinlink.dbf\")) then\n EditStatus = Av.Run(\"AGI/TMT (MassGIS) CheckPassword\",\"\")\n end\n\n'------------------------------------ ---------------------------------------------\n\n ThmIDDCt = Av.GetProject.GetObjecttag.Get(\"ThmIDDCt\")\n \n if (ThmIDDCt.is(Dictionary)) then\n Clist = ThmIDDCt.Get(ThemeID.AsString)\n \n if (Clist.is(List)) then\n SourceVtabFilename = Clist.Get(20)\n TheDialog.SetObjecttag(SourceVtabFileName.Clone)\n \n if (SourceVtabFilename.AsString.Contains(\"themeinv.dbf\")) then\n EditStatus = Av.Run(\"AGI/TMT (MassGIS) CheckPassword\",\"\")\n end\n end\n end\n \n'---------------------------------------------------------------------------------\n\n c = ListBox.Make\n c.SetName (\"DataBaselistBox\")\n c.SetHorizontalScroll (false)\n c.SetSelect (\"AGI/TMT (MassGIS) Join/LinkMenu.DataBaseListBox.Select\")\n c.SetApply (\"AGI/TMT (MassGIS) Join/LinkMenu.DataBaseListBox.Apply\")\n c.SetUpdate (\"AGI/TMT (MassGIS) Join/LinkMenu.DataBaseListBox.Update\")\n c.SetSelectionStyle (#LISTBOX_SELECTION_SINGLEROW )\n c. SetVerticalScroll (true)\n c.SetObjecttag (theVtabFileName)\n c.SetTag (ThemeID.AsString)\n c.SetFieldNamesVisible (true)\n \n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(10,40,520,190))\n DataBaselistBox = c\n \n DataBaselistBox.DefineFromList(VtabFilelist)\n \n'---------------------------------------------------------------------------------\n\n c = ComboBox.Make\n c.SetName (\"DBFComboBox\")\n c.SetLabel (\"Store your join/link events in\")\n c.DefineFromList (VtabFileList)\n c.SetSelect (\"AGI/TMT (MassGIS) Join/LinkMenu.DBFComboBox.Select\")\n \n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(90,205,520,350))\n DBFComboBox = c\n DBFComboBox.SetEnabled(EditStatus)\n \n'---------------------------------------------------------------------------------\n\n c = ControlPanel.Make\n c.SetName (\"OptionControlPanel\")\n c.SetLabel (\"Join/Link Options\")\n c.SetVisibleBorder (true)\n c.SetUpdate (\"AGI/TMT (MassGIS) Join/LinkMen u.ControlPanel.Update\")\n \n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(10,225,520,335))\n OptionControlPanel = c\n ListenList.Add(c)\n \n'---------------------------------------------------------------------------------\n\n c = TextLine.Make\n c.SetName (\"TableFieldName\")\n c.SetLabel (\"Table\")\n c.SetChanged (\"AGI/TMT (MassGIS) Join/LinkMenu.Parameters.Click\")\n c.SetTag (\"TheTable\")\n \n OptionControlPanel.Add(c,Rect.MakeXY(60,25,400,45))\n \n'------------------ ---------------------------------------------------------------\n\n c = Button.Make\n c.SetName (\"OpenFileButton\")\n c.SetClick (\"AGI/TMT (MassGIS) Join/LinkMenu.OpenFileButton.Click\")\n \n OptionControlPanel.Add(c,Rect.MakeXY(405,25,435,45))\n c.SetIcon(n.Get(\"Open\"))\n\n'---------------------------------------------------------------------------------\n\n c = Button.Make\n c.SetName (\"AddToProjectLabelButton\")\n c.SetClick (\"AGI/TMT (MassGIS) Join/LinkMenu.AddToPr ojectLabelButton.Click\")\n c.SetUpdate (\"AGI/TMT (MassGIS) Join/LinkMenu.SetFieldLabelButton.Update\")\n \n OptionControlPanel.Add(c,Rect.MakeXY(440,25,470,45))\n c.SetIcon(n.Get(\"Table\"))\n ListenList.Add(c)\n \n'---------------------------------------------------------------------------------\n\n c = TextLine.Make\n c.SetName (\"Field1TextLine\")\n c.SetLabel (\"From Field\")\n c.SetChanged (\"AGI/TMT (MassGIS) Join/LinkMenu.Parameters.Click\")\n c.SetTag (\"Fi eld1\")\n \n OptionControlPanel.Add(c,Rect.MakeXY(60,55,280,75))\n\n'---------------------------------------------------------------------------------\n\n c = TextLine.Make\n c.SetName (\"Field2TextLine\")\n c.SetLabel (\"To Field\")\n c.SetChanged (\"AGI/TMT (MassGIS) Join/LinkMenu.Parameters.Click\")\n c.SetTag (\"Field2\")\n \n OptionControlPanel.Add(c,Rect.MakeXY(60,80,280,100))\n\n'---------------------------------------------------------------------------------\n\n c = La belButton.Make\n c.SetName (\"SetField1LabelButton\")\n c.SetLabel (\"...\")\n c.SetClick (\"AGI/TMT (MassGIS) Join/LinkMenu.SetFieldLabelButton.Click\")\n c.SetUpdate (\"AGI/TMT (MassGIS) Join/LinkMenu.SetFieldLabelButton.Update\")\n \n OptionControlPanel.Add(c,Rect.MakeXY(280,55,300,75))\n ListenList.add(c)\n\n'---------------------------------------------------------------------------------\n\n c = LabelButton.Make\n c.SetName (\"SetField2LabelButton\")\n c.Se tLabel (\"...\")\n c.SetClick (\"AGI/TMT (MassGIS) Join/LinkMenu.SetFieldLabelButton.Click\")\n c.SetUpdate (\"AGI/TMT (MassGIS) Join/LinkMenu.SetFieldLabelButton.Update\")\n \n OptionControlPanel.Add(c,Rect.MakeXY(280,80,300,100))\n ListenList.add(c)\n \n'---------------------------------------------------------------------------------\n\n c = RadioButton.Make\n c.SetName (\"LinkRadioButton\")\n c.SetLabel (\"Link\")\n c.SetClick (\"AGI/TMT (MassGIS) J oin/LinkMenu.Parameters.Click\")\n c.SetTag (\"JoinOrLink\")\n \n OptionControlPanel.Add(c,Rect.MakeXY(320,80,400,100))\n\n'---------------------------------------------------------------------------------\n\n c = RadioButton.Make\n c.SetName (\"JoinRadioButton\")\n c.SetLabel (\"Join\")\n c.SetClick (\"AGI/TMT (MassGIS) Join/LinkMenu.Parameters.Click\")\n c.SetTag (\"JoinOrLink\")\n \n OptionControlPanel.Add(c,Rect.MakeXY(320,55,400,75))\n\n'--------------------- ------------------------------------------------------------\n\n c = CheckBox.Make\n c.SetName (\"ReverseCheckBox\")\n c.SetLabel (\"Reverse\")\n c.SetClick (\"AGI/TMT (MassGIS) Join/LinkMenu.Parameters.Click\")\n c.SetTag (\"JoinOrLink\")\n \n OptionControlPanel.Add(c,Rect.MakeXY(400,80,500,100))\n \n'---------------------------------------------------------------------------------\n\n c = IconBox.Make\n c.SetName (\"JoinLinkIconBox\")\n\n OptionControlPanel.Add (c,Rect.MakeXY(10,20,40,40))\n c.SetIcon (n.Get(\"Link\"))\n \n'---------------------------------------------------------------------------------\n\n c = ControlPanel.Make\n c.SetName (\"AdvancedControlPanel\")\n c.SetLabel (\"Advanced Options\")\n c.SetVisibleBorder (true)\n c.SetUpdate (\"AGI/TMT (MassGIS) Join/LinkMenu.ControlPanel.Update\")\n \n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(10,345,520,455))\n AdvancedControlPanel = c\n ListenList.Add(c)\n \n'---------------------- -----------------------------------------------------------\n\n c = TextLine.Make\n c.SetName (\"QueryTextLine\")\n c.SetLabel (\"Query\")\n c.SetChanged (\"AGI/TMT (MassGIS) Join/LinkMenu.Parameters.Click\")\n c.SetTag (\"Query\")\n \n AdvancedControlPanel.Add(c,Rect.MakeXY(10,20,500,40))\n\n'---------------------------------------------------------------------------------\n\n c = TextLine.Make\n c.SetName (\"ResultTableTextLine\")\n c.SetLabel (\"Result s Table\")\n c.SetChanged (\"AGI/TMT (MassGIS) Join/LinkMenu.Parameters.Click\")\n c.SetTag (\"ResultTabl\")\n \n AdvancedControlPanel.Add(c,Rect.MakeXY(10,50,300,70))\n\n'---------------------------------------------------------------------------------\n\n c = TextLine.Make\n c.SetName (\"IDLabelTextLine\")\n c.SetLabel (\"ID Label\")\n c.SetChanged (\"AGI/TMT (MassGIS) Join/LinkMenu.Parameters.Click\")\n c.SetTag (\"IDLabel\")\n \n AdvancedControlPanel.Ad d(c,Rect.MakeXY(310,50,500,70))\n\n'---------------------------------------------------------------------------------\n\n c = TextLine.Make\n c.SetName (\"Table2TextLine\")\n c.SetLabel (\"Table 2\")\n c.SetTag (\"TheTable2\")\n c.SetChanged (\"AGI/TMT (MassGIS) Join/LinkMenu.Parameters.Click\")\n \n AdvancedControlPanel.Add(c,Rect.MakeXY(10,80,300,100))\n\n'---------------------------------------------------------------------------------\n\n c = Button.Make\n c.SetName (\"AddButton\")\n c.SetIcon (n.Get(\"AddTheme\"))\n c.SetClick (\"AGI/TMT (MassGIS) Join/LinkMenu.Parameters.Click\")\n c.SetUpdate (\"AGI/TMT (MassGIS) Join/LinkMenu.Parameters.Update\")\n\n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(10,195,40,220))\n ListenList.Add(c)\n \n'---------------------------------------------------------------------------------\n\n c = Button.Make\n c.SetName (\"DeleteButton\")\n c.SetIcon (n.Get(\"Cut\"))\n c.SetClick (\"AGI/TMT (MassGIS) Join/LinkMenu.Parameters.Click\")\n c.SetUpdate (\"AGI/TMT (MassGIS) Join/LinkMenu.Parameters.Update\")\n \n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(45,195,80,220))\n ListenList.Add(c)\n \n'--------------------------------------------------------------------------------\n \n c = LabelButton.Make\n c.SetName (\"CancelLabelButton\")\n c.SetLabel (\"Cancel\")\n c.SetClick (\"AGI/LIB (MassGIS) Dialog.CloseLabelButton\")\n c.SetObjecttag (fals e)\n \n if (theTheme.is(Theme)) then\n c.Setlabel(\"Done\")\n theDialog.GetControlPanel.add(c,Rect.Makexy(410,460,520,490))\n else \n theDialog.GetControlPanel.add(c,Rect.Makexy(290,460,400,490))\n end\n \n CancelLabelButton = c \n \n'--------------------------------------------------------------------------\n \n c = LabelButton.Make\n c.SetName (\"OKLabelButton\")\n c.SetLabel (\"Ok\")\n c.SetClick (\"AGI/TMT (MassGIS) Join/LinkMenu.CloseLabelButton\")\n \n if (theTheme.is(Theme).Not) then\n c.SetEnabled (false)\n else\n c.SetVisible(false)\n end\n \n theDialog.GetControlPanel.add(c,Rect.Makexy(410,460,520,490))\n \n'----------------------------------------------------------------------------------\n \n Av.Run(\"AGI/LIB (MassGIS) Dialog.MovetoCenterOfScreen\",theDialog)\n\n DataBaseListBox.SetListeners(ListenList)\n DataBaseListBox.Update\n DataBaseListBox.BroadCastUpdate\n \n TheDialog.Open\n \n theVtab = nil\n if (CancelLabelButton.GetO bjecttag) then\n theVtab = DataBaseListBox.GetVtab\n end\n \n Av.GetProject.RemoveDialog(theDialog.AsString)\n \nReturn (theVtab)\n" ) (Script.98 Name: "AGI/TMT (MassGIS) Join/LinkMenu.OpenFileButton.Click" SourceCode: "' Name:AGI/TMT (MassGIS) Join/LinkMenu.OpenFileButton.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:28:35 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:28:35 1999\n'------------------------------------------------------------------------\n\n Str1 = \"Find the Database file...\"\n theFileName = FileDialog.Show(\"*.*\",\"All files\",Str1)\n \n if (theFileName = nil) then\n Return Nil\n end\n \n Self.GetDialog.FindbyName(\"TableFieldName\").SetText(theFileName.AsString)" ) (Script.99 Name: "AGI/TMT (MassGIS) Join/LinkMenu.Parameters.Click" SourceCode: "' Name:AGI/TMT (MassGIS) Join/LinkMenu.Parameters.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:28:50 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:28:50 1999\n'------------------------------------------------------------------------\n \n ParametersListBox = Self.GetDialog.FindbyName(\"DataBaselistBox\")\n theVtab = ParametersListBox.GetVtab\n \n if (theVtab.is(Vtab).Not) then\n \n if (S elf.GetName = \"AddButton\") then\n Msgbox.Info(\"Please choose a Join/Link Database before attempting to add an event.\",\"Note...\")\n end\n \n Return Nil\n end\n \n aRec = ParametersListBox.GetCurrentRecord\n theCurrentRow = ParametersListBox.GetCurrentRow\n \n'-----------------------------------------------------------------------------------\n\n if (Self.GetTag = \"JoinOrLink\") then\n \n n = Av.Run(\"AGI/LIB (MassGIS) Icon Dictionary\",nil)\n \n if (Self.GetDi alog.FindbyName(\"LinkRadioButton\").IsSelected) then\n Self.GetDialog.FindbyName(\"TableFieldName\").SetLabel(\"Link Table\")\n Self.GetDialog.FindbyName(\"JoinLinkIconBox\").SetIcon(n.Get(\"Link\"))\n else\n Self.GetDialog.FindbyName(\"TableFieldName\").SetLabel(\"Join Table\") \n Self.GetDialog.FindbyName(\"JoinLinkIconBox\").SetIcon(n.Get(\"Join\"))\n end\n \n Suffix = \"J\"\n if (Self.GetDialog.FindbyName(\"LinkRadioButton\").IsSelected) then\n Suffix = \"L\"\n end\n\n Prefix = \"\"\n if (Self.GetDialog.FindbyName(\"ReverseCheckBox\").IsSelected) then\n Prefix = \"B\"\n end\n \n JoinString = Prefix+Suffix\n \n if (theVtab.isEditable.Not) then\n theVtab.SetEditable(true)\n end\n \n theField = theVtab.FindField(\"JoinOrLink\")\n \n if (theField = nil) then\n Return nil\n end\n \n theVtab.SetValue(theField,aRec,JoinString.AsString.Trim)\n theVtab.S etEditable(false)\n theVtab.SetEditable(true)\n \n ParametersListBox.Update\n ParametersListBox.GoRow (theCurrentRow)\n ParametersListBox.SelectCurrent (false)\n ParametersListBox.ShowCurrent\n Self.GetDialog.FindbyName(\"OKLabelButton\").SetEnabled(true)\n Self.GetDialog.FindbyName(\"CancelLabelButton\").SetObjecttag(true)\n Return Nil\n end\n \n'-----------------------------------------------------------------------------------\n \n if (Self.is(TextLine)) then\n \n if (theVtab.isEditable.Not) then\n theVtab.SetEditable(true)\n end\n\n theField = theVtab.FindField(Self.GetTag.AsString)\n \n if (theField.is(Field).Not) then\n Return Nil\n end\n \n theVtab.SetValue(theField,aRec,Self.GetText.AsString.Trim)\n theVtab.SetEditable(false)\n theVtab.SetEditable(true)\n \n ParametersListBox.Update\n ParametersListBox.GoRow (theCurrentRow)\n ParametersListBox.SelectCurrent (false)\n P arametersListBox.ShowCurrent\n \n Self.GetDialog.FindbyName(\"OKLabelButton\").SetEnabled(true)\n Self.GetDialog.FindbyName(\"CancelLabelButton\").SetObjecttag(true) \n Return Nil\n end\n \n'-----------------------------------------------------------------------------------\n \n if (Self.GetName = \"DeleteButton\") then\n \n if (aRec = -1) then\n Msgbox.INfo(\"Unable to delete...\",aRec.AsString)\n Return Nil\n end\n \n Str1 = \"Are you sure that you can want to remove this Join/Link Event?\"\n Str2 = \"Delete Now...\"\n if (Msgbox.YesNo(Str1,Str2,false).Not) then\n Return Nil\n end\n\n if (theVtab.isEditable.Not) then\n theVtab.SetEditable(true)\n end\n\n theVtab.RemoveRecord(aRec)\n theVtab.SetEditable(false)\n theVtab.SetEditable(true)\n \n ParametersListBox.Update\n ParametersListBox.GoRow (0)\n ParametersListBox.SelectCurrent (false)\n ParametersListBox.ShowCurrent\n Parameters ListBox.Select\n ParametersListBox.BroadCastUpdate\n\n Self.GetDialog.FindbyName(\"OKLabelButton\").SetEnabled(true)\n Self.GetDialog.FindbyName(\"CancelLabelButton\").SetObjecttag(true)\n Return Nil\n end\n \n'-----------------------------------------------------------------------------------\n \n if (Self.GetName = \"AddButton\") then\n \n theCurrentRow = theVtab.GetNumSelRecords\n ThemeID = ParametersListBox.GetTag\n \n if (theVtab.isEditable.Not) then\n theVtab .SetEditable(true)\n end\n\n Str1 = \"Enter a Target Table name...\"\n Str2 = \"Add Join/Link Parameters...\"\n theTable = Msgbox.Input(Str1,Str2,\"New Table\")\n \n if (Thetable = nil) then\n Return nil\n end\n \n if (theTable.AsString.Trim.isNull) then\n Return nil\n end\n \n aNewRec = theVtab.AddRecord \n theVtab.SetValue(theVtab.FindField(\"ThemeID\"),aNewRec,ThemeID.AsString.Trim)\n theVtab.SetValue(theVtab.FindField(\"Joino rLink\"),aNewRec,\"J\")\n theVtab.SetValue(theVtab.FindField(\"TheTable\"),aNewRec,theTable)\n theVtab.SetEditable(false)\n theVtab.SetEditable(true)\n \n ParametersListBox.Update\n ParametersListBox.GoRow (theCurrentRow)\n ParametersListBox.SelectCurrent (false) \n ParametersListBox.ShowCurrent \n ParametersListBox.Select\n ParametersListBox.BroadCastUpdate\n \n Self.GetDialog.FindbyName(\"OKLabelButton\").SetEnabled(true)\n Self.GetDialog.FindbyName(\"CancelLab elButton\").SetObjecttag(true) \n Return Nil\n end" ) (Script.100 Name: "AGI/TMT (MassGIS) Join/LinkMenu.Parameters.Update" SourceCode: "' Name:AGI/TMT (MassGIS) Join/LinkMenu.Parameters.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Jul 28 13:11:39 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Jul 28 13:11:39 1999\n'------------------------------------------------------------------------\n\n theVtabFileName = Self.GetDialog.FindbyName(\"DBFComboBox\").GetSelection\n \n if (theVtabFileName.is(FileName).Not) then\n Self.SetEnabled(false)\n Return Nil\n e lse\n if (File.CanDelete(theVtabFileName).Not) then\n Self.SetEnabled(false)\n Return Nil\n else\n Self.SetEnabled(true)\n end\n end\n \n if (Self.GetName = \"DeleteButton\") then\n \n theListBox = Self.GetDialog.FindbyName(\"DataBaselistBox\")\n theSelection = theListBox.GetSelection\n \n if (theSelection.Count = 0) then\n Self.SetEnabled(False)\n else\n Self.SetEnabled(True)\n end\n \n theVtab = theListBox.GetVtab\n \n if (theVtab.is(Vtab).Not) then\n Self.SetVisible(false)\n else\n if (theVtab.GetNumSelRecords > 0) then\n Self.SetVisible(true)\n else\n Self.SetVisible(false)\n end\n end\n\n end" ) (Script.101 Name: "AGI/TMT (MassGIS) Join/LinkMenu.SetFieldLabelButton.Click" SourceCode: "' Name:AGI/TMT (MassGIS) Join/LinkMenu.SetFieldLabelButton.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Jul 28 13:35:36 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Jul 28 13:35:36 1999\n'------------------------------------------------------------------------\n\n if (Self.GetDialog.FindbyName(\"TableFieldName\").isEnabled.Not) then\n Self.SetVisible(false)\n Return Nil\n end\n \n theTable = Self.GetDia log.FindbyName(\"TableFieldName\").GetText\n \n if (TheTable.AsString.isNull) then\n Self.SetVisible(false)\n Return Nil\n end\n\n aDocGUI = Av.GetProject.FindGUI(\"Table\") \n ProjTables = Av.GetProject.GetDocsWithGUI (aDocGUI)\n \n if (ProjTables.is(List).Not) then\n Self.SetVisible(false)\n Return Nil\n end\n \n if (ProjTables.Count = 0) then\n Self.SetVisible(false)\n Return Nil\n end\n \n TableList = {}\n \n For each aDoc in ProjTables\n if (aDoc.GetVtab. GetBaseTableFileName.AsString = theTable) then\n TableList.Add(aDoc)\n end\n end\n \n if (TableList.Count > 0) then\n\n if (TableList.Count = 1) then\n thePrjTable = TableList.Get(0)\n else\n Str1 = \"The following are tables in the project that have the same database source.\"\n Str2 = \"Project Tables...\"\n thePrjTable = Msgbox.ChoiceAsString(TableList,Str1,Str2)\n \n if (thePrjTable = nil) then\n Return nil\n end\n \n end\n \n theVtab = thePrjTable.GetVtab\n \n if (theVtab.HasError) then\n Msgbox.Warning(\"This table's vtab has error, unable to get a list of fields.\",\"Stopping...\")\n Return Nil\n end\n \n theFields = theVtab.GetFields\n \n Str1 = \"Select a field...\"\n Str2 = theTable.AsString+\" field\"\n \n theField = Msgbox.ChoiceAsString(theFields,Str1,Str2)\n \n if (theField = nil) then\n Return Nil\n end\n \n if (Self.GetName = \"SetField1LabelButton\") then\n Self.GetDialog.FindbyName(\"Field1TextLine\").SetText(theField.AsString)\n Self.GetDialog.FindbyName(\"Field1TextLine\").Changed\n else\n Self.GetDialog.FindbyName(\"Field2TextLine\").SetText(theField.AsString)\n Self.GetDialog.FindbyName(\"Field2TextLine\").Changed\n end \n end\n\n" ) (Script.102 Name: "AGI/TMT (MassGIS) Join/LinkMenu.SetFieldLabelButton.Update" SourceCode: "' Name:AGI/TMT (MassGIS) Join/LinkMenu.SetFieldLabelButton.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Jul 28 13:24:06 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Jul 28 13:24:06 1999\n'------------------------------------------------------------------------\n\n if (Self.GetDialog.FindbyName(\"TableFieldName\").isEnabled.Not) then\n Self.SetVisible(false)\n Return Nil\n end\n \n theTable = Self.GetDia log.FindbyName(\"TableFieldName\").GetText\n \n if (TheTable.AsString.isNull) then\n Self.SetVisible(false)\n Return Nil\n end\n\n if (Self.GetName = \"AddToProjectLabelButton\") then\n if (File.Exists(theTable.AsFileName).Not) then\n Self.SetVisible(false)\n Return nil\n end\n end\n \n aDocGUI = Av.GetProject.FindGUI(\"Table\") \n ProjTables = Av.GetProject.GetDocsWithGUI (aDocGUI)\n \n if (ProjTables.is(List).Not) then\n Self.SetVisible(false)\n Return Nil\n end\n \n if (ProjTables.Count = 0) then\n Self.SetVisible(false)\n \n if (Self.GetName = \"AddToProjectLabelButton\") then\n Self.SetVisible(true)\n end\n \n Return Nil\n end\n \n TableList = {}\n \n For each aDoc in ProjTables\n if (aDoc.GetVtab.GetBaseTableFileName.AsString = theTable) then\n TableList.Add(aDoc)\n end\n end\n \n if (TableList.Count = 0) then\n \n if (Self.GetName = \"AddToProjectLabelButton\") then\n Self.SetVisible(true)\n else\n Self.SetVisible(false)\n end\n \n else\n\n if (Self.GetName = \"AddToProjectLabelButton\") then\n Self.SetVisible(false)\n else\n Self.SetVisible(true)\n end\n\n end\n\n" ) (Script.103 Name: "AGI/TMT (MassGIS) StartTool" SourceCode: "' Name: AGI/TMT (MassGIS) StartTool\n' Headline:\n' Called By: View Button or Project Menu\n' Calls To: \n'\n' Author: Stephan Smith\n' Date: Wed Mar 05 16:45:57 1997\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This script is called by the TMT1 button on\n' each ViewGUI. IT opens the Theme Dialog.\n\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Mar 05 16:45:57 1997\n'------------------------------------------------------------------------------\n\n' Gets the Dialog Object from the Extension Space.\n' if the Dialog exists in the project. then delete the doc\n' so that it can be created by the Create Script.\n\n TheDialog = Av.GetProject.FindDialog(\"Theme(v2) Menu\")\n if (TheDialog = Nil) then\n TheDialog = Av.Run(\"AGI/TMT (MassGIS) Theme.Open\",\"\")\n else\n if (TheDialog.isOpen.not) then\n THeDialog = Av.Run(\"AGI/TMT (MassGIS) Theme.Open\",\"\")\n end\n end\n \n'------------------------------------------------------------------------------ \n' Use the following code to po sition the new Dialog \n' relative to the existing Extent or Them Dialog.\n \n if (Av.GetProject.GetObjecttag.is(Dictionary).Not) then\n Av.GetProject.SetObjecttag(Dictionary.Make(100))\n end\n \n if (Av.GetProject.GetObjecttag.get(\"ThmIDDct\") = Nil) then\n Av.Run(\"AGI/LIB (MassGIS) MG.Dict Rebuild\",\"Inv_\")\n end\n\n Av.Run(\"AGI/LIB (MassGIS) Dialog.PositionDialog\",TheDialog)\n\n" ) (Script.104 Name: "AGI/TMT (MassGIS) Theme.Activate" SourceCode: "' Name: AGI/TMT (MassGIS) Theme.Activate\n' Headline:\n' Called By: Extension during Install\n' Calls To: \n'\n' Author: Andy Kvaal\n' Date: Wed Mar 05 16:45:57 1997\n'\n' Requires:\n'\n' Comments: This is the Activate script for the Theme Dialog. It forces\n' the AddButton, DeleteButton to Update whenever\n' the user changes Active Doc. \n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Mar 05 16:45:57 1997\n'------------------------------------------------------------------------------ \n\n if (Av.GetProject.GetObjecttag.is(Dictionary).not) then\n Self.FindbyName(\"PrimaryListBox\").Empty\n Self.FindbyName(\"SecondaryListBox\").Empty\n Self.FindbyName(\"ThirdListBox\").Empty\n Self.GetControlPanel.BroadCastUpdate\n Av.Run(\"AGI/TMT (MassGIS) Theme.ReEstablishSelection\",{Self,\"\",\"\",\"\",true}) \n else\n Thmiddct = Av.GetProject.GetObjecttag.Get(\"Thmiddct\")\n \n if (Thmiddct = nil) then\n Self.FindbyName(\"PrimaryListBox\").Empty\n Self.FindbyName(\"Second aryListBox\").Empty\n Self.FindbyName(\"ThirdListBox\").Empty\n Self.GetControlPanel.BroadCastUpdate\n Av.Run(\"AGI/TMT (MassGIS) Theme.ReEstablishSelection\",{Self,\"\",\"\",\"\",true})\n end\n end\n \n Self.GetControlPanel.BroadCastUpdate\n \n if (Self.FindbyName(\"HelpButton\") <> nil) then\n Self.FindbyName(\"HelpButton\").Update\n end" ) (Script.105 Name: "AGI/TMT (MassGIS) Theme.AddButton.Click" SourceCode: "' Name: AGI/LIB (MassGIS) AddThemes.OK.Click\n' Headline:\n' Called By: Dialog AddButton Click\n' Calls To:\n'\n' Author: Stephan Smith and Andrew Kvaal\n' Date: Sat Mar 08 10:57:34 1997\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This script adds theme ID from the current view to the\n' available Theme Inventory DBF file.\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Sat Mar 08 10:57:34 1997\n'----------------------------------------------------------------------------\n\n Self.Update\n \n'-------------- --------------------------------------------------------------\n' 2) Get and verify the Destionation or Source View\n' if it is not a valid View then leave this script\n \n theView = Av.GetActiveDoc\n \n if (theView.is(View).not) then \n Return Nil \n end\n\n'---------------------------------------------------------------------------\n' 3) Determine weither or not to add all themes or only Active or \n' selected themes in the Source View\n\n PrimaryListBox = Self.GetDialog.FindbyName(\"PrimaryLi stBox\")\n SecondaryListBox = Self.GetDialog.FindbyName(\"SecondaryListBox\")\n ThirdListBox = Self.GetDialog.FindbyName(\"ThirdListBox\")\n \n Men1 = nil\n Men2 = nil\n Men3 = nil\n \n if (PrimaryListBox.GetSelection.Count = 1) then\n Men1 = PrimaryListBox.GetSelection.Get(0)\n else \n Men1 = PrimaryListBox.GetCurrentValue\n end\n \n if (SecondaryListBox.GetSelection.Count = 1) then\n Men2 = SecondaryListBox.GetSelection.Get(0)\n else \n Men2 = SecondaryListBox.GetCurrentValue\n end\n \n if (ThirdListBox.GetSelection.Count = 1) then\n Men3 = ThirdListBox.GetSelection.Get(0)\n else \n Men3 = ThirdListBox.GetCurrentValue\n end\n\n ThmIDDct = Av.GetProject.GetObjecttag.get(\"ThmIDDct\")\n \n'------------------------------------------------------------------------------------\n \n theThemes = theView.GetActiveThemes\n \n if (theThemes.Count <> 1) then \n Return nil\n end\n \n theTheme = theView.GetActiveThem es.Get(0)\n\n if (Men1 = nil) then\n theThemeMen1 = theTheme.GetName.AsString\n else\n theThemeMen1 = Men1.AsString.Trim\n end\n \n if (Men2 = nil) then\n theThemeMen2 = theTheme.GetName.AsString\n else\n theThemeMen2 = Men2.AsString.Trim\n end\n\n if (Men3 = nil) then\n theThemeMen3 = theTheme.GetName.AsString\n else\n theThemeMen3 = Men3.AsString.Trim\n end\n \n ContinueAdd = false \n ThemeID = Av.Run(\"AGI/TMT (MassGIS) ThemeID.AddThemeID\",{theView,theThemeMen1,\n theThemeMen2,theThemeMen3})\n \n'-------------------------------------------------------------------------------------\n \n if (ThemeID.is(List)) then\n ContinueAdd = ThemeId.Get(4)\n end\n\n \n if (ContinueAdd) then\n \n ResultsList = Av.Run(\"AGI/TMT (MassGIS) AliasEdit.Open\",{ThemeID.Get(0),theTheme})\n \n theAliasVtab = ResultsList.Get(0)\n ContinueAdd = ResultsList.Get(1)\n \n if (theAliasVtab.is(Vtab)) then\n Av.Run(\"AGI/LIB (MassGIS) MG.Inquery Dct\",theAliasVtab)\n end\n \n end\n\n'-------------------------------------------------------------------------------------\n\n if (ContinueAdd) then\n \n if ((theTheme.Is(ITheme).Not) and (theTheme.Is(FTheme))) then\n \n if (ThemeID.is(List)) then\n \n theVtab = Av.Run(\"AGI/TMT (MassGIS) Join/LinkMenu.Open\",{ThemeID.Get(0),theTheme})\n \n if (theVtab.is(Vtab)) then\n Av.Run(\"AGI/LIB (Ma ssGIS) MG.Join/Link Dct\",theVtab)\n end\n \n end\n end \n end\n \n'-------------------------------------------------------------------------------------\n\n if (ThemeID.Is(List)) then\n \n Men1 = ThemeID.Get(1)\n Men2 = ThemeID.Get(2)\n Men3 = ThemeID.Get(3)\n\n Av.Run(\"AGI/LIB (MassGIS) MG.UpdateDictionary\",ThmIDDct)\n Av.Run(\"AGI/TMT (MassGIS) Theme.ReEstablishSelection\",{Self.GetDialog,Men1,Men2,Men3,false})\n end\n " ) (Script.106 Name: "AGI/TMT (MassGIS) Theme.AddButton.Update" SourceCode: "' Name:AGI/TMT (MassGIS) Theme.AddButton.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:29:27 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:29:27 1999\n'------------------------------------------------------------------------\n\n MoreOptionsButton = Self.GetDialog.FindbyName(\"MoreOptionsButton\")\n \n if (MoreOptionsButton.GetObjecttag.is(Boolean).Not) then\n MoreOptionsButton.SetObjecttag(false)\n end\n \n Self.SetVisible(MoreOptionsButton.GetObjecttag)\n\n if (Self.IsVisible.Not) then\n Return nil\n end\n\n'------------------------------------------------------------------------\n\n theActiveDoc = Av.GetActiveDoc\n \n if (theActiveDoc.Is(View)) then\n \n ' the ActiveDoc is a view, make sure that it contrais at only one\n ' Active View\n if (theActiveDoc.GetActiveThemes.Count = 1) then\n Self.SetEnabled(true)\n else\n ' Either more then one or no themes are a ctive \n ' in the current view.\n Self.SetEnabled(false)\n end\n else\n ' the ActiveDoc is not a View, so disable the current Dialog Control\n Self.SetEnabled(false)\n end\n \n if (Self.Is(Button)) then\n if (Self.GetObjecttag.is(List)) then\n Self.SetIcon(Self.GetObjecttag.Get(0))\n Self.SetHelp(\"Add Theme from a View//This button provides you with the \"+\n \"ability to add a theme to the Inventory from a View.\")\n end\n\n end\n\n" ) (Script.107 Name: "AGI/TMT (MassGIS) Theme.ApplyButton.Click" SourceCode: "' Name:AGI/TMT (MassGIS) Theme.ApplyButton.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Tue Dec 15 17:41:02 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This is Click script for the Theme Dialog, ApplyButton.\n' It adds any selected themes to the \n' destination view. It uses the Project Theme Dictionaries and\n' copies of MassGIS Scripts. It the MassGIS scripts\n' are present in the project then these are used.\n' If they are not present then the copies\n' are used. This means that the extensions can use\n' an enhancements to the MassGIS data viewer or\n' run independently. \n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Mar 05 16:45:57 1997\n'------------------------------------------------------------------------------ \n\n AddScriptIsPresent = false\n AddScriptName = \"\"\n \n if (Av.GetProject.FindDoc(\"ThemeIDAdd\").is(SED).Not) then \n \n if (Extension.GetScripts.Get(\"AGI/SLS MG.ThemeIDAdd\") <> nil) then\n AddScriptIsPresent = true\n AddScriptName = \"AGI/SLS MG.ThemeIDAdd\"\n else \n Msgbox.Warning(\"Unable to find the MassGIS Script, ThemeIDAdd in the project.\",\"Stopping...\")\n Return Nil\n end\n else\n AddScriptName = \"ThemeIDAdd\"\n AddScriptIsPresent = true\n end\n \n' Force the calling script to update\n Self.Update\n \n' Get The Active View.\n\n theView = Av .GetActiveDoc\n \n if (theView.Is(View).not) then \n \n theDialogView = Self.GetDialog.GetObjecttag\n \n if (theDialogView.is(String)) then\n theView = Av.GetProject.FindDoc(theDialogView)\n end\n else\n Self.GetDialog.SetObjecttag(theView.AsString)\n end\n \n if (Self.GetDialog.IsModal.not) then\n \n if (theView.is(View).not) then\n Return nil\n end\n \n end\n \n'================================================================= ===============\n\n thePrjDct = Av.GetProject.GetObjecttag\n \n if (thePrjDct.Get(\"ThemeFeaturePlacement\").is(Boolean).Not) then\n thePrjDct.Set(\"ThemeFeaturePlacement\",false)\n end\n \n if (thePrjDct.Get(\"ThemeHideLegend\").is(Boolean).Not) then\n thePrjDct.Set(\"ThemeHideLegend\",false)\n end\n\n if (thePrjDct.Get(\"AddThemesVisible\").is(Boolean).Not) then\n thePrjDct.Set(\"AddThemesVisible\",false)\n end\n\n if (thePrjDct.Get(\"ShowThemeAddErrors\").is(Boolean).Not) then\n thePrj Dct.Set(\"ShowThemeAddErrors\",false)\n end\n\n ThemeFeaturePlacement = thePrjDct.Get(\"ThemeFeaturePlacement\")\n HideThemeLegend = thePrjDct.Get(\"ThemeHideLegend\")\n AddThemesVisible = thePrjDct.Get(\"AddThemesVisible\")\n ShowThemeAddErrors = thePrjDct.Get(\"ShowThemeAddErrors\")\n \n'-------------------------------------------------------------------------------\n' Gets the Primary and Secondary ListBox selection values.\n\n PrimaryListBox = Self.GetDialog.FindbyName(\"PrimaryListBox\")\n Se condaryListBox = Self.GetDialog.FindbyName(\"SecondaryListBox\")\n ThirdListBox = Self.GetDialog.FindbyName(\"ThirdListBox\")\n \n Men1 = nil\n Men2 = nil\n Men3List = nil\n \n if (PrimaryListBox.GetSelection.Count = 1) then\n Men1 = PrimaryListBox.GetSelection.Get(0)\n else \n Men1 = PrimaryListBox.GetCurrentValue\n end\n \n if (SecondaryListBox.GetSelection.Count = 1) then\n Men2 = SecondaryListBox.GetSelection.Get(0)\n else \n Men2 = SecondaryListBox.GetCurrentValue\n end\n\n if (ThirdListBox.GetSelection.Count > 0) then\n Men3List = ThirdListBox.GetSelection\n else \n Men3List = {ThirdListBox.GetCurrentValue}\n end\n \n If ((men1 = nil) or (Men2 = nil) or (Men3List.is(List).Not)) then\n Return nil\n end\n \n'--------------------------------------------------------------------------------\n' Gets the needed project dictionaries.\n' if they do not exist then the script exits.\n\n men123dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"men123dct\",fals e})\n thmiddct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"thmiddct\",false})\n\n ' Check the status of the Dictionaries, if they are not valid\n ' then exit the script\n \n if ((Men123dct = Nil) or (thmiddct = nil)) then \n Return Nil \n end\n\n \n'--------------------------------------------------------------------------------\n' Initializes a list to hold all themeid numbers.\n \n Thmidlist = {}\n \n' Gets a list of all themeids, this is needed because sometimes a \n' selection has two associated themeids.\n\n For each aMen3 in Men3List\n \n ThmList = men123dct.Get(Men1+Men2+aMen3)\n \n if (ThmList.is(List).not) then \n ' if the result is not a list then jump to the next \n ' selection value\n continue \n end\n \n if (ThmList.count = 0) then\n ' if the selection value is = 0 then \n ' their are no themes to add.\n Continue \n end\n \n ' adds the thmids list to the comp list.\n ThmidList = ThmidList+ThmList\n end\n \n'-------------------------------------------------------------------------\n' Loops throught the complete list and adds each themdid to the view.\n' by calling the themeIDadd script.\n\n if (Self.GetDialog.IsModal) then\n \n Self.SetObjecttag(ThmidList)\n Self.GetDialog.Close\n \n Return nil\n end\n\n if (thePrjDct.Get(\"AGICodeBase\").is(Boolean).not) then\n thePrjDct.Set(\"AGICodeBase\",false)\n end\n \n UseAGICodeBase = thePrjDct.Get(\"AGICodeBase\")\n \n'--- ----------------------------------------------------------------------\n\n For each thmid in ThmidList\n\n VerifyThm = Thmiddct.get(thmid)\n \n if (VerifyThm = Nil) then\n Msgbox.Warning(\"Unable to verify themeID #\"+thmid.asstring,\"Warning\")\n Continue\n else \n ShowErrors = true\n\n theView.GetWin.Activate\n \n \n if (AddScriptName.AsString = \"ThemeIDAdd\") then \n Av.Run(\"ThemeIDAdd\",{thmid})\n else\n Av.Run(\"AGI/SLS MG.ThemeIDAdd\",{{Thmid.AsString},Thmiddct,true,false,true,false,false,theView})\n end\n \n end\n end\n\n'----------------------------------------------------------------------------\n' Force the View to Redraw\n \n if (AddThemesVisible) then\n theView.invalidate\n end " ) (Script.108 Name: "AGI/TMT (MassGIS) Theme.ApplyButton.Update" SourceCode: "' Name:AGI/TMT (MassGIS) Theme.ApplyButton.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 09:28:06 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 09:28:06 1999\n'------------------------------------------------------------------------\n \n theView = Av.GetActiveDoc\n \n if (theView.Is(View).Not) then \n\n theDialogView = Self.GetDialog.GetObjecttag\n \n if (theDialogView.is(St ring)) then\n theView = Av.GetProject.FindDoc(theDialogView)\n end\n end\n \n if (theView.Is(View)) then\n\n Self.GetDialog.SetObjecttag(theView.AsString)\n Self.SetEnabled(true)\n \n if (theView.AsString.Count < 15) then\n Self.SetLabel(\"Add Theme(s) to \"+theView.AsString.Proper)\n else\n Self.SetLabel(\"Add Theme(s) to a view...\")\n end\n else\n Self.SetLabel(\"Add Theme(s) to a view...\")\n Self.SetEnabled(false)\n Return Nil\n end\n \n Men1List = Self.GetDialog.FindByName(\"PrimaryListBox\").GetSelection\n Men2List = Self.GetDialog.FindByName(\"SecondaryListBox\").GetSelection\n Men3List = Self.GetDialog.FindByName(\"ThirdListBox\").GetSelection\n \n Self.SetEnabled(Av.Run(\"AGI/TMT (MassGIS) Theme.ValidateSelection\",{Self.GetDialog,\"All\"}))" ) (Script.109 Name: "AGI/TMT (MassGIS) Theme.CopyButton.Click" SourceCode: "' Name: AGI/TMT (MassGIS) Theme.MapLegendButton.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Sun Mar 09 16:17:16 1997\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This script is attached to the Set Legend Button on the\n' Advanced Portion of the 2D Theme Menu. It provides the user\n' with the ability to change the selected ThemeIDs legend file\n' value by browsing the computer for an avl file.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Sun Mar 09 16:17:16 1997\n'-----------------------------------------------------------------------------\n \n' Check the Validity of the Project Dictioanaries.\n\n Men123Dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",\"Men123dct\")\n \n if (Men123Dct = nil) then\n Av.Run(\"AGI/TMT (MassGIS) Theme.DisableAll\",Self)\n Return nil\n end\n\n thmiddct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",\"thmiddct\")\n \n if (thmiddct = nil) then\n Av.Run(\"AGI/TMT (MassGIS) Theme.DisableAll\",Self)\n Re turn nil\n end\n \n'---------------------------------------------------------------------------- \n \n PrimaryListBox = Self.GetDialog.FindbyName(\"PrimaryListBox\")\n SecondaryListBox = Self.GetDialog.FindbyName(\"SecondaryListBox\")\n ThirdListBox = Self.GetDialog.FindbyName(\"ThirdListBox\")\n \n Men1 = nil\n Men2 = nil\n Men3List = nil\n \n if (PrimaryListBox.GetSelection.Count = 1) then\n Men1 = PrimaryListBox.GetSelection.Get(0)\n else \n Men1 = PrimaryListBox.GetCurrentVal ue\n end\n \n if (SecondaryListBox.GetSelection.Count = 1) then\n Men2 = SecondaryListBox.GetSelection.Get(0)\n else \n Men2 = SecondaryListBox.GetCurrentValue\n end\n\n if (ThirdListBox.GetSelection.Count = 1) then\n Men3List = ThirdListBox.GetSelection\n else \n Men3List = {ThirdListBox.GetCurrentValue}\n end\n\n if ((Men1 = nil) or (Men2 = nil) or (Men3List.is(List).Not)) then\n Return nil\n end\n \n'------------------------------------------------------------------------ -------\n' Get a list of the Theme ID numbers to Duplicate\n\n ThmIDFileNameDct = Dictionary.Make(10)\n ReverseIDDct = Dictionary.Make(10)\n GlobalStatus = false\n \n For each Men3 in Men3List\n \n ThmList = Men123Dct.Get(Men1+Men2+Men3)\n \n if (ThmList.is(List)) then\n For each anID in ThmLIst\n Clist = ThmIDDct.Get(anID)\n \n if (GlobalStatus.Not) then\n Str1 = \"Do you want to Duplicate this theme ID?\"\n Str2 = Clist.Get(1).AsString+\" ID: \"+anID.AsString\n \n if (ThmLIst.Count = 1) then\n theStatus = Msgbox.YesNo(Str1,Str2,true)\n else\n theStatus = Msgbox.AllYesNo(Str1,Str2,true)\n end\n \n if (theStatus = nil) then\n theStatus = true\n GlobalStatus = true\n end\n end\n \n if (the Status.Not) then\n Continue\n end\n \n if (Clist.Get(0).is(List)) then\n ReverseIDDct.Add(anID,Clist.Get(0).Get(1))\n anID = Clist.Get(0).Get(1)\n else\n ReverseIDDct.Add(anID,anID)\n end\n \n if (Clist.is(List)) then\n if (ThmIDFileNameDct.Get(Clist.Get(20)).is(List).Not) then\n ThmIDFileNameDct.Set(Clist.Get(20), {anID})\n else\n IDList = ThmIDFileNameDct.Get(Clist.Get(20))\n IDList.Add(AnID.Clone)\n ThmIDFileNameDct.Set(Clist.Get(20),IDList)\n end\n end\n end\n end\n end\n \n if (ThmIDFileNameDct.ReturnKeys.Count = 0) then\n Return Nil\n end\n \n'---------------------------------------------------------------------------------------------\n' Get the ThemeID values\n' if the value of the new Theme is greater then one, allow the user to\n' choose which ThemeID to edit.\n \n'--------------------------------------------------------------------------------------\n\n Men1 = Nil\n Men2 = nil\n Men3 = nil\n \n NeedtoRebuild = false\n \n For each aDBFFile in ThmIDFileNameDct.ReturnKeys\n \n theVtab = nil\n \n if (aDBFFile.AsString.Contains(\"themeinv.dbf\")) then\n if (Av.Run(\"AGI/TMT (MassGIS) CheckPassword\",\"\").Not) then\n \n ' Code was adde d to allow the User to Copy a restricted ThemeID to\n ' another Inventory Table.\n \n if (Msgbox.YesNo(\"User, Please note, the source database for this ThemeID is restricted to you.\"+\n \" So you must choose another inventory file to store the duplicate.\",\"\",true).not) then\n Continue\n end\n \n VtabList = Av.run(\"AGI/LIB (MassGIS) GetVtabList\",{\"inv_\",true})\n VtabList.Add(\" Create a new Inventory File....\")\n \n Str1 = \"Choose another Inventory File...\"\n Str2 = \"\"\n theVtab = Msgbox.ListAsString(VtabList,Str1,Str2)\n \n if (theVtab = nil) then\n Continue\n end\n \n if (theVtab.is(String)) then\n \n theVtab = Av.Run(\"AGI/TMT (MassGIS) DBF.Create2DThemeDBF\",Nil)\n \n if (theVtab.is(Vtab).N ot) then\n Continue\n end\n end\n \n end\n end\n\n if (theVtab.is(Vtab).Not) then\n theVtab = VTab.Make(aDBFFile.AsString.AsFileName,true,false)\n end\n \n IDList = ThmIDFileNameDct.Get(aDBFFile)\n\n For each AnID in IDList\n \n NeedToRebuild = true\n Clist = ThmIDDct.Get(anID)\n Clist2 = Clist.DeepClone\n Men1 = Clist.Get(1)\n M en2 = Clist.Get(2)\n\n if (Men2.is(List)) then\n Men3 = Men2.Get(1)\n Men2 = Men2.Get(0)\n end\n \n Men3 = (Av.Run(\"AGI/TMT (MassGIS) ThemeID.GetUniqueName\",{Men123Dct,Men1,Men2,Men3})).Clone\n \n NewThemeID = Av.Run(\"AGI/TMT (MassGIS) ThemeID.GetUniqueID\",{ThmidDct,AnID})\n \n Clist2.Set(2,{men2,men3})\n\n ThemeLegendFile = Clist.Get(14)\n\n if (ThemeLegendFile.AsString.Count > 3) then \n if (File.Exists(ThemeLegendFile.AsString.AsFileName)) then\n NewLegendFileName = Av.Run(\"AGI/TMT (MassGIS) ThemeID.Generate Legend FileName\",{theVtab}) \n File.Copy (Clist.Get(14).AsString.AsFileName, NewLegendFileName) \n Clist2.Set(14,NewLegendFileName.AsString)\n else\n Clist2.Set(14,\"\")\n end\n else\n Clist2.Set(14,\"\")\n end \n\n Clist2.Set(20,the Vtab.GetBaseTableFileName.AsString)\n \n ThmIDDct.Add(NewThemeID,Clist2)\n theVtab.SetEditable(true)\n NewRec = theVtab.AddRecord\n \n if (theVtab.FindField(\"ThemeID\") <> nil) then\n theVtab.SetValue (theVtab.FindField(\"ThemeID\"),NewRec,NewThemeID.AsString)\n end\n \n if (theVtab.FindField(\"Men1\") <> nil) then\n theVtab.SetValue (theVtab.FindField(\"Men1\"),NewRec,Men1)\n end\n\n if (theV tab.FindField(\"Men2\") <> nil) then\n theVtab.SetValue (theVtab.FindField(\"Men2\"),NewRec,Men2)\n end\n\n if (theVtab.FindField(\"Men3\") <> nil) then\n theVtab.SetValue (theVtab.FindField(\"Men3\"),NewRec,Men3)\n end\n \n if (theVtab.FindField(\"menleg\") <> nil) then\n theVtab.SetValue (theVtab.FindField(\"menleg\"),NewRec,Clist.Get(3))\n end\n \n if (theVtab.FindField(\"Thmlbl\") <> nil) then\n theVtab.SetValue (theVtab.FindField(\"Thmlbl\"),NewRec,Clist.Get(4))\n end\n \n if (theVtab.FindField(\"Ftrtyp\") <> nil) then\n theVtab.SetValue (theVtab.FindField(\"Ftrtyp\"),NewRec,Clist.Get(5))\n end\n \n if (theVtab.FindField(\"Defleg\") <> nil) then\n theVtab.SetValue (theVtab.FindField(\"Defleg\"),NewRec,Clist.Get(6))\n end\n \n if (theVtab.FindField(\"Active\") <> nil) then\n theVtab.SetValue (theVtab.FindField(\"Active\"),NewRec,Clist.Get(7))\n end\n \n if (theVtab.FindField(\"SrcFile\") <> nil) then\n theVtab.SetValue (theVtab.FindField(\"SrcFile\"),NewRec,Clist.Get(8))\n end\n \n if (theVtab.FindField(\"Qry\") <> nil) then\n theVtab.SetValue (theVtab.FindField(\"Qry\"),NewRec,Clist.Get(9))\n end\n\n if (theVtab.FindField(\"LuFld\") <> nil) then\n theVtab.SetValue (theVtab.Fi ndField(\"LuFld\"),NewRec,Clist.Get(10))\n end \n \n if (theVtab.FindField(\"LuFile\") <> nil) then\n theVtab.SetValue (theVtab.FindField(\"LuFile\"),NewRec,Clist.Get(11))\n end \n\n if (theVtab.FindField(\"SymOP\") <> nil) then\n theVtab.SetValue (theVtab.FindField(\"SymOP\"),NewRec,Clist.Get(12))\n end\n\n if (theVtab.FindField(\"LegFld\") <> nil) then\n theVtab.SetValue (theVtab.FindField(\"LegFld\"),NewRec,Cli st.Get(13))\n end\n\n if (theVtab.FindField(\"LegFile\") <> nil) then\n theVtab.SetValue (theVtab.FindField(\"LegFile\"),NewRec,Clist.Get(14))\n end\n\n if (theVtab.FindField(\"ScaleMin\") <> nil) then\n theVtab.SetValue (theVtab.FindField(\"ScaleMin\"),NewRec,Clist.Get(15))\n end\n\n if (theVtab.FindField(\"ScaleMax\") <> nil) then\n theVtab.SetValue (theVtab.FindField(\"ScaleMax\"),NewRec,Clist.Get(16))\n end\n\n if (theVtab.FindField(\"Comments\") <> nil) then\n theVtab.SetValue (theVtab.FindField(\"Comments\"),NewRec,Clist.Get(17))\n end \n \n end\n \n theVtab.SetEditable(False)\n Av.Run(\"AGI/LIB (MassGIS) MG.UpdateDictionary\",ThmIDDct)\n\n end \n \n Av.Run(\"AGI/TMT (MassGIS) Theme.ReEstablishSelection\",{Self.GetDialog,Men1,Men2,Men3,false})\n \n Self.GetDialog.FindbyName(\"PrimaryListBox\").BroadCastUpdate" ) (Script.110 Name: "AGI/TMT (MassGIS) Theme.CopyButton.Update" SourceCode: "' Name:AGI/TMT (MassGIS) Theme.CopyButton.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Jul 30 09:07:56 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Jul 30 09:07:56 1999\n'------------------------------------------------------------------------\n\n MoreOptionsButton = Self.GetDialog.FindbyName(\"MoreOptionsButton\")\n\n if (MoreOptionsButton.GetObjecttag.is(Boolean).Not) then\n MoreOptionsButton.SetObjecttag(false)\n end\n\n Self.SetVisible(MoreOptionsButton.GetObjecttag)\n Self.SetEnabled(Av.Run(\"AGI/TMT (MassGIS) Theme.ValidateSelection\",{Self.GetDialog,\"one\"}))\n \n'---------------------------------------------------------------------------\n\n Self.SetHelp(\"Duplicate Selected ThemeID(s)//This option allows you to make duplicate themeID\"+\n \" upon the selected ThemeID's parameters.\")\n \n if (Self.IsEnabled) then\n \n Men1 = nil\n Men2 = nil\n Men3 = nil\n \n if (Self.GetDialog.FindbyName(\" PrimaryListBox\").GetSelection.Count = 1) then\n Men1 = Self.GetDialog.FindbyName(\"PrimaryListBox\").GetSelection.Get(0)\n end\n\n if (Self.GetDialog.FindbyName(\"SecondaryListBox\").GetSelection.Count = 1) then\n Men2 = Self.GetDialog.FindbyName(\"SecondaryListBox\").GetSelection.Get(0)\n end\n\n if (Self.GetDialog.FindbyName(\"ThirdListBox\").GetSelection.Count = 1) then\n Men3 = Self.GetDialog.FindbyName(\"ThirdListBox\").GetSelection.Get(0)\n end\n \n if ((Men1 = nil) or (Men2 = nil) or (Men3 = nil)) then\n Return nil\n end\n \n ThmIDDct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"ThmIDDct\",false})\n Men123Dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"Men123Dct\",false})\n \n if (Men123Dct.is(Dictionary)) then\n \n if (Men123Dct.Get(Men1+Men2+Men3).is(List)) then\n \n if (Men123Dct.Get(Men1+Men2+Men3).Count = 1) then\n theID = Men123Dct.Get(Men1+Men2+Men3).Get(0)\n ThemeIDList = ThmIDDct.Get(theID)\n \n if (THemeIDList.is(List)) then\n theVtab = ThemeIDList.Get(20)\n \n if (theVtab.AsString.Contains(\"themeinv.dbf\")) then\n if (Av.Run(\"AGI/TMT (MassGIS) CheckPassword\",\"\").Not) then\n \n ' This code as commented out so that the Use can have \n ' Copy access to theme ID values even if they do not\n ' have edit access.\n 'Self.SetEnabled(false)\n 'Self.SetHelp(\"Duplicate (Admin Access Only)//\")\n \n end\n end\n end\n \n end\n end\n \n end\n end\n" ) (Script.111 Name: "AGI/TMT (MassGIS) Theme.DeleteButton.Click" SourceCode: "' Name: AGI/TMT (MassGIS) Theme.DeleteButton.Click\n' Headline:\n' Called By: Dialog Control, DeleteButton.Click\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Sun Mar 09 15:53:24 1997\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This is the Click script for the DeleteButton. The DeleteButton\n' is a labelbutton on the Advanced Portion of the Theme Dialog. This\n' Button allows the user to delete themes from the current DBF File.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Sun Mar 09 15: 53:24 1997\n'----------------------------------------------------------------------------------\n\n PrimaryListBox = Self.GetDialog.FindbyName(\"PrimaryListBox\")\n SecondaryListBox = Self.GetDialog.FindbyName(\"SecondaryListBox\")\n ThirdListBox = Self.GetDialog.FindbyName(\"ThirdListBox\")\n \n Men1 = nil\n Men2 = nil\n Men3List = nil\n \n if (PrimaryListBox.GetSelection.Count = 1) then\n Men1 = PrimaryListBox.GetSelection.Get(0)\n else\n Men1 = PrimaryListBox.GetCurrentValue\n end\n \n if (SecondaryListBox.GetSelection.Count = 1) then\n Men2 = SecondaryListBox.GetSelection.Get(0)\n else\n Men2 = SecondaryListBox.GetCurrentValue\n end\n \n if (ThirdListBox.GetSelection.Count > 0) then\n Men3List = ThirdListBox.GetSelection\n else\n Men3Liat = {ThirdListBox.GetCurrentValue}\n end\n \n if ((Men1 = nil ) or (Men2 = nil) or (Men3List = nil)) then\n Return Nil\n end\n \n'-------------------------------------------------------------------------------\n' Get the File Name Dictionary from the Objecttag Dictionary\n\n ThmIDDct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"ThmIDDct\",true})\n Men123Dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"Men123Dct\",true})\n \n if ((ThmIDDct = nil) or (Men123Dct = nil)) then\n Av.Run(\"AGI/TMT (MassGIS) Extent.DisableAll\",Self)\n Return nil\n end\n\n'-------------------------------------------------------------------------------\n' Get a list of the Theme ID numbers to delete\n\n ThmIDFileNameDct = Dictiona ry.Make(10)\n ReverseIDDct = Dictionary.Make(10)\n GlobalStatus = false\n \n For each Men3 in Men3List\n \n ThmList = Men123Dct.Get(Men1+Men2+Men3)\n \n if (ThmList.is(List)) then\n For each anID in ThmList\n \n Clist = ThmIDDct.Get(anID)\n DBFFile = Clist.Get(20)\n \n if (DBFFile.AsString.Contains(\"themeinv.dbf\")) then\n if (_AdminEditPassword.AsString.Trim <> \"administrator\") then\n \n Str1 = \"This theme ID is stored in the ThemeInv.dbf and you \"+\n \"do not access to delete it.\"\n Str2 = \"Deleting...\"\n \n Msgbox.Warning(Str1,Str2)\n Continue\n end\n end\n \n if (GlobalStatus.Not) then\n Str1 = \"Do you want to delete this theme ID?\"\n Str2 = Clist.Get(1).AsString+\" ID: \"+anID.A sString\n \n if (Men3List.Count = 1) then\n theStatus = Msgbox.YesNo(Str1,Str2,true)\n else\n theStatus = Msgbox.AllYesNo(Str1,Str2,true)\n end\n \n if (theStatus = nil) then\n theStatus = true\n GlobalStatus = true\n end\n end\n \n if (theStatus.Not) then\n Continue\n end\n \n if (Clist.Get(0).is(List)) then \n ReverseIDDct.Add(anID,Clist.Get(0).Get(1))\n anID = Clist.Get(0).Get(1)\n else\n ReverseIDDct.Add(anID,anID)\n end\n \n if (Clist.is(List)) then\n if (ThmIDFileNameDct.Get(Clist.Get(20)).is(List).Not) then\n ThmIDFileNameDct.Set(Clist.Get(20),{a nID})\n else\n IDList = ThmIDFileNameDct.Get(Clist.Get(20))\n IDList.Add(AnID.Clone)\n ThmIDFileNameDct.Set(Clist.Get(20),IDList)\n end\n end\n end\n end\n end\n \n if (ThmIDFileNameDct.ReturnKeys.Count = 0) then\n Return Nil\n end\n \n'--------------------------------------------------------------------------------------\n\n aPrjName = Av.GetProject.GetFileName\n i f (aPrjName <> nil) then\n aPrjName = aPrjName.Clone\n aPrjName.StripFile\n end\n\n'--------------------------------------------------------------------------------------\n\n NeedtoRebuild = false\n \n For each aDBFFile in ThmIDFileNameDct.ReturnKeys\n \n if (aDBFFile.AsString.Contains(\"themeinv.dbf\")) then\n if (_AdminEditPassword.AsString.Trim <> \"administrator\") then\n Continue\n end\n end\n\n if (File.Exists(aDBFFile.AsString.AsFileName).Not ) then\n if (aPrjName <> nil) then\n \n aFile = FileName.Merge(aPrjName.AsString,aDBFFile.AsString)\n \n if (File.Exists(aFile).Not) then\n Msgbox.Warning(\"Unable to delete this theme ID because the source \"+\n aDBFFile.AsString+\" can not be found in the current directory!\",\n \"Continuing...\")\n Continue\n else\n aDBFFile = aFile.Clone\n end\n else\n Msgbox.Warning(\"Unable to delete this theme ID because the source \"+aDBFFile.AsString+\".\",\"Continuing...\")\n Continue\n end\n end\n \n theVtab = VTab.Make(aDBFFile.AsString.AsFileName,true,false)\n \n IDList = ThmIDFileNameDct.Get(aDBFFile)\n\n aQry = \"\"\n For each AnID in IDList\n aQry = aQry + \" or ( [ThemeID] = \"+AnID.Quote+\")\"\n end\n \n aQry = aQry.AsString.Trim\n aQry = aQry.Right(aQry.Count - 2)\n \n theBitmap = theVTab.GetSelection \n theVTab.Query(aQry, theBitmap , #VTAB_SELTYPE_NEW) \n theVTab.UpdateSelection\n \n if (theVtab.GetNumSelRecords > 0) then\n theVtab.SetEditable(true)\n theVtab.RemoveRecords(theVtab.GetSelection)\n NeedtoRebuild = true\n theVtab.SetEditable(false)\n\n For each anID in IDList\n theID = ReverseIDDct.Get(AnID)\n ThmIDDct.Remove(theID)\n end\n \n end\n\n end\n \n'------------------------------------------------------------------------------------------\n \n if (NeedToRebuild) then\n Av.Run(\"AGI/LIB (MassGIS) MG.UpdateDictionary\",ThmIDDct)\n end\n \n Av.Run(\"AGI/TMT (MassGIS) Theme.ReEstablishSelection\",{Self.GetDialog,Men1,Men2,\"\",false})\n \n Self.GetDialog.FindbyName(\"PrimaryListBox\").BroadCastUpdate\n" ) (Script.112 Name: "AGI/TMT (MassGIS) Theme.DeleteButton.Update" SourceCode: "' Name:AGI/TMT (MassGIS) Theme.DeleteButton.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Jul 30 09:08:14 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Jul 30 09:08:14 1999\n'------------------------------------------------------------------------\n\n MoreOptionsButton = Self.GetDialog.FindbyName(\"MoreOptionsButton\")\n \n Self.SetVisible(MoreOptionsButton.GetObjecttag)\n \n if (Self.IsVisible.Not) then\n Return ni l\n end\n\n Self.SetEnabled(Av.Run(\"AGI/TMT (MassGIS) Theme.ValidateSelection\",{Self.GetDialog,\"All\"})) \n \n'--------------------------------------------------------------------------------------\n\n Self.SetHelp(\"Delete Selected ThemeID(s)//This option allows you to Delete themeID\"+\n \" the selected ThemeID(s).\")\n\n if (Self.IsEnabled) then\n \n Men1 = nil\n Men2 = nil\n Men3 = nil\n \n if (Self.GetDialog.FindbyName(\"PrimaryListBox\").GetSelection.Count = 1) then\n Men1 = S elf.GetDialog.FindbyName(\"PrimaryListBox\").GetSelection.Get(0)\n end\n\n if (Self.GetDialog.FindbyName(\"SecondaryListBox\").GetSelection.Count = 1) then\n Men2 = Self.GetDialog.FindbyName(\"SecondaryListBox\").GetSelection.Get(0)\n end\n\n if (Self.GetDialog.FindbyName(\"ThirdListBox\").GetSelection.Count = 1) then\n Men3 = Self.GetDialog.FindbyName(\"ThirdListBox\").GetSelection.Get(0)\n end\n \n if ((Men1 = nil) or (Men2 = nil) or (Men3 = nil)) then\n Return n il\n end\n \n ThmIDDct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"ThmIDDct\",false})\n Men123Dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"Men123Dct\",false})\n \n if (Men123Dct.is(Dictionary)) then\n \n if (Men123Dct.Get(Men1+Men2+Men3).is(List)) then\n \n if (Men123Dct.Get(Men1+Men2+Men3).Count = 1) then\n theID = Men123Dct.Get(Men1+Men2+Men3).Get(0)\n ThemeIDList = ThmIDDct.Get(theID)\n \n if (THemeIDList.is(List)) then\n theVtab = ThemeIDList.Get(20)\n \n if (theVtab.AsString.Contains(\"themeinv.dbf\")) then\n if (Av.Run(\"AGI/TMT (MassGIS) CheckPassword\",\"\").Not) then\n Self.SetEnabled(false)\n Self.SetHelp(\"Delete (Admin Access Only)//\")\n end\n end\n end\n \n end\n end\n \n end\n end\n \n " ) (Script.113 Name: "AGI/TMT (MassGIS) Theme.DialogOpen" SourceCode: "' Name: AGI/TMT (MassGIS) Theme.DialogOpen\n' Headline:\n' Called By: Extension during Install\n' Calls To: \n'\n' Author: Stephan Smith\n' Date: Wed Mar 05 16:45:57 1997\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This is the open script attached to the Theme\n' Dialog Menu. It is run when the Dialog\n' file is sent the Dialog.Open command. It sets the\n' Update, Click, and Select, and control parameters for\n' all objects in the Dialog. By setting everything from\n' this script, the Dialog file is independent from\n' the Scripts, (Which are stored in the Extension, not\n' the Dialog File) and the developer can see\n' all the relationships at a glance. The Listeners are\n' also set in this script.\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Mar 05 16:45:57 1997\n'------------------------------------------------------------------------------\n \n if (Av.GetProject.Getobjecttag.is(Dictionary).Not) then\n Av.GetProjec t.SetObjecttag(Dictionary.Make(100))\n end\n \n Men1Dct = Av.GetProject.GetObjecttag.Get(\"Men1Dct\") \n Men12Dct = Av.GetProject.GetObjecttag.Get(\"Men12Dct\") \n Men123Dct = Av.GetProject.GetObjecttag.Get(\"Men123Dct\") \n Thmiddct = Av.GetProject.GetObjecttag.Get(\"Thmiddct\") \n \n GoodDcts = (Men1Dct = nil) or (Men12Dct = nil) or (Men123Dct = nil) or (ThmidDct = nil)\n \n if (GoodDcts) then \n Av.Run(\"AGI/LIB (MassGIS) MG.Dict Rebuild\",\"Inv_\")\n end\n\n if (Av.GetProject.GetObjecttag.Get(\"Inq uiryIDDct\").is(Dictionary).Not) then\n Av.Run(\"AGI/LIB (MassGIS) MG.Dict Rebuild\",\"als_\")\n end\n\n if (Av.GetProject.GetObjecttag.Get(\"JoinLinkDct\").is(Dictionary).Not) then\n Av.Run(\"AGI/LIB (MassGIS) MG.Dict Rebuild\",\"lnk_\")\n end\n \n'----------------------------------------------------------------------------------------------\n\n Self.FindbyName(\"PrimaryListBox\").SetObjecttag(Av.GetProject.GetObjecttag.Get(\"ThemeTool Primary Key\"))\n Self.FindbyName(\"SecondaryListBox\").SetObjecttag(Av.Get Project.GetObjecttag.Get(\"ThemeTool Secondary Key\")) \n Self.FindbyName(\"ThirdListBox\").SetObjecttag(Av.GetProject.GetObjecttag.Get(\"ThemeTool Third Key\"))\n\n Self.FindbyName(\"PrimaryListBox\").Update\n Self.FindbyName(\"MoreOptionsButton\").Update\n\n if (Self.FindbyName(\"HelpButton\") <> nil) then\n Self.FindbyName(\"HelpButton\").Update\n end" ) (Script.114 Name: "AGI/TMT (MassGIS) Theme.DialogUpdate" SourceCode: "' Name:AGI/TMT (MassGIS) Theme.DialogUpdate\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Mar 03 14:59:30 1999\n'\n' Requires:\n'\n' Returns: None\n'\n' Comments: This is the Update script for the Theme Dialog. It is attached\n' to the TMT3-1 Button on the View GUI. It forces updates when\n' the Dialog is open and changes occur to the active doc.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Mar 03 14:59:30 1999\n'------------------------------------------ ------------------------------\n\n theDialog = Av.GetProject.FindDialog(\"Theme(MassGIS) Menu\")\n \n if (theDialog <> nil) then\n \n if (theDialog.isOpen) then\n TheDialog.GetControlPanel.BroadCastUpdate\n \n theLBX = theDialog.FindbyName(\"ThirdListBox\")\n theList = theLBX.GetList\n \n end\n \n end\n \n if (Self.GetIcon.AsString <> \"2DTheme.bmp\") then\n\n n = Av.Run(\"AGI/LIB (MassGIS) Icon Dictionary\",\"\")\n \n if (n.Get(\"2DTheme.bmp\" ).is(Icon)) then\n Self.SetIcon(n.Get(\"2DTheme.bmp\"))\n else \n theExtension = Extension.GetExtensions.Get(\"AGI 2D Theme Tool (v.2)\") \n \n if (theExtension.Is(Extension)) then\n if (theExtension.Get(0).is(Icon)) then\n if (theExtension.Get(0).AsString = \"2dTheme.bmp\") then\n Self.SetIcon(theExtension.Get(0))\n end\n end\n end\n end\n \n end\n \n ThemeDial og = Av.GetProject.FindDialog(\"ThemeHelp Menu\")\n \n if (ThemeDialog.is(Dialog)) then\n if (ThemeDialog.isOpen) then\n ThemeDialog.Update\n end\n end " ) (Script.115 Name: "AGI/TMT (MassGIS) Theme.DisableAll" SourceCode: "' Name:AGI/TMT (MassGIS) Theme.DisableAll\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Jul 30 09:06:59 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This script disables menu controls when a problem is found\n' with theme ID dictionaries.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Jul 30 09:06:59 1999\n'------------------------------------------------------------------------\n\n Self.GetDialog.FindbyName(\"AddButton\").SetEnabled (false)\n Self.GetDi alog.FindbyName(\"DeleteButton\").SetEnabled (false)\n Self.GetDialog.FindbyName(\"EditButton\").SetEnabled (false)\n Self.GetDialog.FindbyName(\"CopyButton\").SetEnabled (false)\n Self.GetDialog.Findbyname(\"ApplyButton\").Update" ) (Script.116 Name: "AGI/TMT (MassGIS) Theme.EditButton.Click" SourceCode: "' Name:AGI/TMT (MassGIS) Theme.EditButton.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Fri Dec 18 11:45:20 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Fri Dec 18 11:45:20 1998\n'------------------------------------------------------------------------\n\n Av.PurgeObjects\n Av.GetProject.Update\n\n' Check the Validity of the Project Dictionaries\n\n Men123Dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"men123dct\",true})\n \n if (Men123Dct = nil) then\n Av.Run(\"AGI/TMT (MassGIS) Theme.DisableAll\",Self)\n Return nil\n end\n \n thmiddct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"thmiddct\",true})\n \n if (thmiddct = nil) then\n Av.Run(\"AGI/TMT (MassGIS) Theme.DisableAll\",Self)\n Return nil\n end\n \n'--------------------------------------------------------------------------------------------------\n' Get the Men1 and Men2 Values \n \n PrimaryListBox = Self.GetDialog.Findby Name(\"PrimaryListBox\")\n SecondaryListBox = Self.GetDialog.FindbyName(\"SecondaryListBox\")\n ThirdListBox = Self.GetDialog.FindbyName(\"ThirdListBox\")\n \n Men1 = nil\n Men2 = nil\n Men3 = nil\n \n if (PrimaryListBox.GetSelection.Count = 1) then\n Men1 = PrimaryListBox.GetSelection.Get(0)\n else \n Men1 = PrimaryListBox.GetCurrentValue\n end\n \n if (SecondaryListBox.GetSelection.Count = 1) then\n Men2 = SecondaryListBox.GetSelection.Get(0)\n else \n Men2 = SecondaryListBox.GetCurre ntValue\n end\n\n if (ThirdListBox.GetSelection.Count = 1) then\n Men3 = ThirdListBox.GetSelection.Get(0)\n else \n Men3 = ThirdListBox.GetCurrentValue\n end\n\n if ((Men1 = nil) or (Men2 = Nil) or (Men3 = nil)) then\n Self.SetEnabled(False)\n Return Nil \n end\n \n theEditThemes = Men123Dct.get(Men1+Men2+Men3)\n \n'--------------------------------------------------------------------------------------------------\n' If there are more then one themeID associated with a g iven\n' Men1+Men2 occurence, allow the user to select the ID Value\n' they want to edit.\n\n if (theEditThemes.is(List).not) then\n Msgbox.Warning(\"There is an error in the theme ID list assigned \"+\n \"to this ID event.\",\"Developer Level Error...\")\n Return nil\n end\n \n if (theEditThemes.Count = 0) then\n Msgbox.Warning(\"There are not theme ID values in the theme ID list assigned \"+\n \"to this ID event.\",\"Developer Level Error...\")\n Return nil\n end\n \n if (theEditThemes.Count = 1) then\n \n EditID = theEditThemes.get(0)\n\n else\n\n Str1 = \"There are more than one theme ID associated with this \"+\n \" Selection. Choose the ID you want to edit.\" \n \n EditID = Msgbox.ChoiceAsString(theEditThemes,Str1,\"Edit Theme ID\")\n \n if (EditID = Nil) then \n ' the User has not selected a ThemeID value\n ' so exit the script.\n Return nil \n end\n \n end\n \n'--- -------------------------------------------------------------------------------------\n\n theMenList = Av.Run(\"AGI/TMT (MassGIS) ThemeID.EditID\",{EditID,Thmiddct})\n \n if (theMenList.is(List)) then \n \n Men1 = theMenlist.Get(0)\n Men2 = theMenlist.Get(1)\n Men3 = theMenlist.Get(2)\n \n Av.Run(\"AGI/TMT (MassGIS) Theme.ReEstablishSelection\",{Self.GetDialog,Men1,Men2,Men3,false})\n end\n\nAv.PurgeObjects\n\n" ) (Script.117 Name: "AGI/TMT (MassGIS) Theme.EditButton.Update" SourceCode: "' Name:AGI/TMT (MassGIS) Theme.EditButton.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 09:28:46 1999\n'\n' Requires:\n'\n' Returns:\n' \n' Comments: This is the update script for the EDIT parameters button.\n' This control is only enabled when a single men1, men2 andm\n' men3 value is selected. \n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 09:28:46 1999\n'------------------------------------------------------------------------\n\n More OptionsButton = Self.GetDialog.FindbyName(\"MoreOptionsButton\")\n \n if (MoreOptionsButton.GetObjecttag.is(Boolean).Not) then\n MoreOptionsButton.SetObjecttag(false)\n end\n \n Self.SetVisible(MoreOptionsButton.GetObjecttag)\n \n if (Self.IsVisible.Not) then\n Return nil\n end\n\n' Update the status of the button based upon the selection status\n' the three menu buttons.\n \n Self.SetEnabled(Av.Run(\"AGI/TMT (MassGIS) Theme.ValidateSelection\",{Self.GetDialog,\"One\"}))\n\n'------------------- ---------------------------------------------------------------------------\n \n Self.SetHelp(\"Edit Selected ThemeID(s)//This option allows you to Edit themeID\"+\n \" the selected ThemeID(s).\")\n\n if (Self.IsEnabled) then\n \n Men1 = nil\n Men2 = nil\n Men3 = nil\n \n if (Self.GetDialog.FindbyName(\"PrimaryListBox\").GetSelection.Count = 1) then\n Men1 = Self.GetDialog.FindbyName(\"PrimaryListBox\").GetSelection.Get(0)\n end\n\n if (Self.GetDialog.FindbyName(\"SecondaryLis tBox\").GetSelection.Count = 1) then\n Men2 = Self.GetDialog.FindbyName(\"SecondaryListBox\").GetSelection.Get(0)\n end\n\n if (Self.GetDialog.FindbyName(\"ThirdListBox\").GetSelection.Count = 1) then\n Men3 = Self.GetDialog.FindbyName(\"ThirdListBox\").GetSelection.Get(0)\n end\n \n if ((Men1 = nil) or (Men2 = nil) or (Men3 = nil)) then\n Return nil\n end\n \n ThmIDDct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"ThmIDDct\",false})\n Men123Dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"Men123Dct\",false})\n \n if (Men123Dct.is(Dictionary)) then\n \n if (Men123Dct.Get(Men1+Men2+Men3).is(List)) then\n \n if (Men123Dct.Get(Men1+Men2+Men3).Count = 1) then\n theID = Men123Dct.Get(Men1+Men2+Men3).Get(0)\n ThemeIDList = ThmIDDct.Get(theID)\n \n if (THemeIDList.is(List)) then\n theVtab = ThemeIDList.Get(20)\n \n if (theVtab.AsString.Contains(\"themeinv.dbf\")) then\n if (Av.Run(\"AGI/TMT (MassGIS) CheckPassword\",\"\").Not) then\n Self.SetHelp(\"Edit (Admin Access Only)//This ThemeID can only be edited\"+\n \" when you have Administrator access. If is stored in the ThemeInv.Dbf Database.\")\n end\n end\n end\n \n end\n end\n \n end\n end\n \n " ) (Script.118 Name: "AGI/TMT (MassGIS) Theme.EditStatusLabelButton.Update" SourceCode: "' Name:AGI/TMT (MassGIS) Theme.EditStatusLabelButton.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Thu Aug 05 11:32:44 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Thu Aug 05 11:32:44 1999\n'------------------------------------------------------------------------\n\n MoreOptionsButton = Self.GetDialog.FindbyName(\"MoreOptionsButton\")\n \n if (MoreOptionsButton.GetObjecttag.is(Boolean).Not) then\n MoreOptionsButton.SetObje cttag(false)\n end\n \n Self.SetVisible(MoreOptionsButton.GetObjecttag)\n \n theStatus = Av.Run(\"AGI/TMT (MassGIS) CheckPassword\",\"\")\n \n if (theStatus) then\n Self.SetLabel(\"You have ADMIN Access\"+nl+\n \"to Add/Delete/Edit.\")\n else\n Self.SetLabel(\"You have General Access\"+nl+\n \"to Add/Delete/Edit.\")\n end" ) (Script.119 Name: "AGI/TMT (MassGIS) Theme.MoreButton.Click" SourceCode: "' Name:AGI/TMT (MassGIS) Theme.MoreButton.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Mar 03 14:58:41 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Mar 03 14:58:41 1999\n'------------------------------------------------------------------------\n\n TheDialog = Dialog.MakeSized(true,true,true,true,Rect.MakeXY(0,0,360,120))\n \n TheDialog.SetName (\"Theme(MassGIS) Settings Menu\")\n TheDialog.SetClose (\"AGI/LIB (MassGIS) Dialog.DialogClose\")\n TheDialog.SetResizable (false)\n TheDialog.SetTitle (\"Theme (MassGIS) Settings\")\n TheDialog.SetModal (true)\n \n Av.GetProject.RemoveDialog(theDialog.AsString)\n Av.Getproject.Adddialog(TheDialog)\n\n theDialog.SetObjecttag(Self.GetDialog)\n \n thePrjDct = Av.GetProject.GetObjecttag\n \n if (thePrjDct.is(Dictionary).not) then\n Return nil\n end\n \n'----------------------------- ------------------------------------------------\n\n c = ComboBox.Make\n c.SetName (\"OptionsComboBox\")\n c.SetLabel (\"Options\")\n c.SetSelect (\"AGI/TMT (MassGIS) ThemeSettings.OptionsComboBox.Select\")\n\n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(30,60,330,350))\n \n Clist = {\"Unlock/Lock Edit Tools\",\n \"Reset All...\",\n \"Reset Theme Inventory...\",\n \"Reset Alias Inventory...\",\n \"Reset Join/Link Inventory...\",\n \"\",\n \"Create a new Theme DataBase (inv_*.dbf)...\",\n \"Create a new Alias DataBase (alx_*.dbf)...\",\n \"Create a new Join/Link Database (lnk_*.dbf)...\"}\n \n c.DefineFromList(Clist)\n\n'-----------------------------------------------------------------------------\n \n c = Labelbutton.Make\n c.SetLabel (\"Help\")\n c.SetName (\"HelpButton\")\n c.SetClick (\"AGI/LIB (MassGIS) HTMLDocumentation.OpenPage\")\n c.SetUpdate (\"AGI/LIB (MassGIS) HTMLDocumentation.Update\")\n c.SetTag (\"TMT2\\Settin gs.htm\")\n c.SetHelp (\"Open Online Help//Access Online Help for the theme Settings.\")\n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(160,260,250,280))\n \n c.SetVisible(false)\n c.Update\n \n'-----------------------------------------------------------------------------\n\n c = LabelButton.Make\n c.SetName (\"CloseLabelButton\")\n c.SetLabel (\"Ok\")\n c.SetClick (\"AGI/LIB (MassGIS) Dialog.CloseLabelButton\")\n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(260,90,330,110))\n \n'---- ---------------------------------------------------------------------------\n \n Av.Run(\"AGI/LIB (MassGIS) Dialog.MovetoCenterOfScreen\",theDialog)\n \n theDialog.Open\n System.RefreshWindows\n Av.PurgeObjects\n \n Av.GetProject.RemoveDialog(theDialog.AsString)" ) (Script.120 Name: "AGI/TMT (MassGIS) Theme.MoreButton.Update" SourceCode: "' Name:AGI/TMT (MassGIS) Theme.MoreButton.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 09:31:01 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This is the update script for the open options menu button.\n' This script, checks the status of the av.project.getobjecttag\n' dictionaries.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 09:31:01 1999\n'------------------------------------------------------------------------\n \n if (Av.Ge tProject.GetObjecttag.is(Dictionary).Not) then\n Av.GetProject.SetObjecttag(Dictionary.Make(100))\n end\n \n Men1Dct = Av.GetProject.GetObjecttag.Get(\"Men1Dct\") \n Men12Dct = Av.GetProject.GetObjecttag.Get(\"Men12Dct\") \n Men123Dct = Av.GetProject.GetObjecttag.Get(\"Men123Dct\") \n Thmiddct = Av.GetProject.GetObjecttag.Get(\"Thmiddct\") \n \n GoodDcts = (Men1Dct = nil) or (Men12Dct = nil) or (Men123Dct = nil) or (ThmidDct = nil)\n \n if (GoodDcts) then \n Self.SetObjecttag(false)\n end\n\n if (Self.GetObjecttag.is(Boolean).Not) then\n Self.SetObjecttag(false)\n end" ) (Script.121 Name: "AGI/TMT (MassGIS) Theme.Open" SourceCode: "' Name: AGI/TMT (MassGIS) Theme.CreateDialog\n' Headline:\n' Called By: Extension during Install\n' Calls To: \n'\n' Author: Stephan Smith and Andrew Kvaal\n' Date: Wed Mar 05 16:45:57 1997\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This script creates the Theme Dialog and addes the needed\n' Controls. It sets all controls parameters and then adds\n' the Dialog Object to the project.\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Mar 05 16:45:57 1997\n'-------------------------------------- ----------------------------------------\n\n theDoc = Av.GetProject.FindDialog(\"Theme(MassGIS) Menu\")\n \n if (theDoc.is(Dialog)) then\n if (theDoc.isOpen) then\n Av.Run(\"AGI/LIB (MassGIS) Dialog.MovetoCenterOfScreen\",theDoc)\n theDoc.FindbyName(\"PrimaryListBox\").Update\n theDoc.GetControlPanel.BroadCastUpdate\n Return (theDoc)\n else\n theDoc.Close\n Av.GetProject.RemoveDialog(\"Theme(MassGIS) Menu\")\n end\n end\n \n'--------------------- ---------------------------------------------------------\n\n if (Av.GetProject.GetObjecttag.Is(Dictionary).not) then\n Av.GetProject.SetObjecttag(Dictionary.Make(10))\n end\n \n'-----------------------------------------------------------------------------\n\n n = Av.Run(\"AGI/LIB (MassGIS) Icon Dictionary\",\"\")\n\n IconList = {}\n IconList.Add(n.get(\"AddTheme\"))\n IconList.Add(n.get(\"AddTheme\"))\n \n if (n.Get(\"3dTheme.bmp\") <> nil) then\n IconList.Set(1,n.Get(\"3dTheme.bmp\"))\n end\n \n'------ -----------------------------------------------------------------------\n' Dialog Parameters (Standard Dialog Design)\n \n TheDialog = Dialog.MakeSized(true,true,true,true,Rect.MakeXY(0,0,640,225))\n \n TheDialog.SetName (\"Theme(MassGIS) Menu\")\n TheDialog.SetActivate (\"AGI/TMT (MassGIS) Theme.Activate\")\n TheDialog.UsetitleBar (true)\n TheDialog.Setmodal (false)\n TheDialog.SetOpen (\"AGI/TMT (MassGIS) Theme.DialogOpen\")\n TheDi alog.SetClose (\"AGI/LIB (MassGIS) Dialog.DialogClose\")\n TheDialog.SetResizable (true)\n TheDialog.SetTitle (\"MassGIS Theme Viewer\")\n\n Av.GetProject.RemoveDialog(theDialog.AsString)\n Av.Getproject.Adddialog(TheDialog)\n ListenList = {}\n \n'-----------------------------------------------------------------------------\n\n c = ListBox.Make\n c.SetName (\"PrimaryListBox\")\n c.SetFastener (#CONTROL_FASTENER_BOTTOM, false)\n c.SetFastener (#CONTROL_FASTENER_TOP, true)\n c.SetFastener (#CONTROL_FASTENER_LEFT, true)\n c.SetFastener (#CONTROL_FASTENER_RIGHT, false)\n c.SetFastener (#CONTROL_FASTENER_WIDTH, false)\n c.SetFastener (#CONTROL_FASTENER_HEIGHT, false)\n\n c.SetFieldNamesVisible (false)\n c.SetHorizontalScroll (true)\n c.SetApply (\"AGI/TMT (MassGIS) Theme.PrimaryListBox.Apply\")\n c.SetSelect (\"AGI/TMT (MassGIS) Theme.PrimaryListBox.Select\")\n c.SetUpdate (\"AGI/TM T (MassGIS) Theme.PrimaryListBox.Update\")\n c.SetSelectionStyle (#LISTBOX_SELECTION_SINGLECELL)\n c.SetVerticalScroll (true)\n\n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(10,40,215,215))\n \n'---------------------------------------------------------------------------\n\n c = ListBox.Make\n c.SetName (\"SecondaryListBox\")\n c.SetFastener (#CONTROL_FASTENER_BOTTOM, true)\n c.SetFastener (#CONTROL_FASTENER_TOP, true)\n c.SetFastener (#CONTROL_FASTENER_LEFT, f alse)\n c.SetFastener (#CONTROL_FASTENER_RIGHT, false)\n c.SetFastener (#CONTROL_FASTENER_WIDTH, false)\n c.SetFastener (#CONTROL_FASTENER_HEIGHT, false)\n \n c.SetApply (\"AGI/TMT (MassGIS) Theme.SecondaryListBox.Apply\")\n c.SetFieldNamesVisible (false)\n c.SetHorizontalScroll (true)\n c.SetSelect (\"AGI/TMT (MassGIS) Theme.SecondaryListBox.Select\")\n c.SetUpdate (\"AGI/TMT (MassGIS) Theme.SecondaryListBox.Update\")\n c.SetSelectionStyle (#LIS TBOX_SELECTION_SINGLECELL)\n c.SetVerticalScroll (true)\n\n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(220,40,425,215))\n \n'--------------------------------------------------------------------------\n \n c = ListBox.Make\n c.SetName (\"ThirdListBox\")\n c.SetFastener (#CONTROL_FASTENER_BOTTOM, true)\n c.SetFastener (#CONTROL_FASTENER_TOP, true)\n c.SetFastener (#CONTROL_FASTENER_LEFT, false)\n c.SetFastener (#CONTROL_FASTENER _RIGHT, false)\n c.SetFastener (#CONTROL_FASTENER_WIDTH, false)\n c.SetFastener (#CONTROL_FASTENER_HEIGHT, false)\n \n c.SetFieldNamesVisible (false)\n c.SetHelp (\"List of the available Map Extents.\")\n c.SetHorizontalScroll (true)\n c.SetApply (\"AGI/TMT (MassGIS) Theme.ThirdListBox.Apply\")\n c.SetSelect (\"AGI/TMT (MassGIS) Theme.ThirdListBox.Select\")\n c.SetSelectionStyle (#LISTBOX_SELECTION_MULTIRANGE)\n c.SetVerticalScroll (true)\n c. SetUpdate (\"AGI/TMT (MassGIS) Theme.ThirdListBox.Update\")\n \n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(430,40,630,215))\n\n'---------------------------------------------------------------------------\n \n if (n.Get(\"Help\") = nil) then\n c = Labelbutton.Make\n c.SetLabel (\"H\")\n else\n c = Button.Make\n c.SetIcon (n.Get(\"Help\"))\n c.SetObjecttag(IconList)\n end\n \n c.SetName (\"HelpButton\")\n c.SetClick (\"AGI/LIB (MassGIS) HTMLDocumentatio n.OpenPage\")\n c.SetUpdate (\"AGI/LIB (MassGIS) HTMLDocumentation.Update\")\n c.SetTag (\"TMT2\\Default.htm\")\n c.SetHelp (\"Open Online Help//Access Online Help for the 2D Theme Tool (v.2)\")\n \n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(465,5,495,30))\n c.SetVisible(false)\n ListenList.Add(c)\n \n'---------------------------------------------------------------------------\n\n if (n.Get(\"Open\") = nil) then\n c = labelbutton.Make\n c.SetLabel (\"O\")\n else\n c = Button.Make\n c.SetIcon (n.Get(\"Open\"))\n end\n \n c.SetName (\"MoreOptionsButton\")\n c.SetClick (\"AGI/TMT (MassGIS) Theme.MoreButton.Click\")\n c.SetUpdate (\"AGI/TMT (MassGIS) Theme.MoreButton.Update\")\n\n if (Av.GetProject.GetObjecttag.Get(\"Theme Edit Tools Status\").is(Boolean).Not) then\n Av.GetProject.GetObjecttag.Set(\"Theme Edit Tools Status\",false)\n end\n \n c.SetObjecttag (Av.GetProject.GetObjecttag.Get(\"Theme Edit Tools Status\"))\n \n TheDialog.GetControlPanel.Add(c,Rect.MakeXY( 10,5,35,30)) \n ListenList.Add(c)\n \n'--------------------------------------------------------------------------------------\n \n if (n.Get(\"AddTheme\") = nil) then\n c = labelbutton.Make\n c.SetLabel (\"+\")\n else\n c = Button.Make\n c.SetIcon (n.Get(\"AddTheme\"))\n c.SetObjecttag(IconList)\n end\n \n c.SetName (\"AddButton\")\n c.SetClick (\"AGI/TMT (MassGIS) Theme.AddButton.Click\")\n c.SetUpdate (\"AGI/TMT (MassGIS) Theme.AddButton.Update\")\n c.SetHelp (\"Add Themes to Inventory//This options allows the user to add the \"+\n \"active theme in the active view the Theme Inventory.\")\n \n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(305,5,355,30)) \n c.SetVisible(false)\n ListenList.Add(c)\n \n'-----------------------------------------------------------------------------------\n \n if (n.Get(\"Cut\") = nil) then\n c = labelbutton.Make\n c.SetLabel (\"C\")\n else\n c = Button.Make\n c.SetIcon (n.Get(\"Cut\"))\n end\n \n c.SetName (\"DeleteButton\")\n c.SetClick (\"AGI/TMT (MassGIS) Theme.DeleteButton.Click\")\n c.SetHelp (\"Delete Theme ID(s)//This options allows the user to Delete the \"+\n \"current Theme ID from the Theme Inventory.\")\n c.SetUpdate (\"AGI/TMT (MassGIS) Theme.DeleteButton.Update\")\n \n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(395,5,425,30))\n c.SetVisible(false)\n ListenList.Add(c)\n \n'------------------------------------------------------------------ ----------------\n \n theIcon = n.Get(\"Examine\")\n if (theIcon = nil) then\n c = labelbutton.Make\n c.SetLabel (\"E\")\n else\n c = Button.Make\n c.SetIcon (theIcon)\n end\n\n c.SetName (\"EditButton\")\n c.SetClick (\"AGI/TMT (MassGIS) Theme.EditButton.Click\")\n c.SetUpdate (\"AGI/TMT (MassGIS) Theme.EditButton.Update\")\n c.SetHelp (\"Edit Current ID Properties//This options allows \"+\n \"the user to edit the current Theme ID Properties.\")\n\n TheDialog .GetControlPanel.Add(c,Rect.MakeXY(360,5,390,30))\n c.SetVisible(false)\n ListenList.Add(c)\n \n'-----------------------------------------------------------------------------------\n \n theIcon = n.Get(\"Copy\")\n if (theIcon = nil) then\n c = labelbutton.Make\n c.SetLabel (\"C\")\n else\n c = Button.Make\n c.SetIcon (theIcon)\n end\n\n c.SetName (\"CopyButton\")\n c.SetClick (\"AGI/TMT (MassGIS) Theme.CopyButton.Click\")\n c.SetHelp (\"Duplicate Selected Theme ID(s) //Use this option to duplicate \"+\n \"the selected ThemeIDs in the Theme Inventory Database.\")\n c.SetUpdate (\"AGI/TMT (MassGIS) Theme.CopyButton.Update\")\n \n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(430,5,460,30))\n c.SetVisible(false)\n ListenList.Add(c)\n\n'-----------------------------------------------------------------------------------\n \n c = TextLabel.Make\n c.SetLabel (\"EditStatus\")\n c.SetName (\"EditStatusLabelButton\")\n c.SetUpdate (\"AGI/TMT (Ma ssGIS) Theme.EditStatusLabelButton.Update\")\n \n TheDialog.GetControlPanel.Add(c,Rect.MakeXY(470,5,660,60))\n c.SetVisible(false)\n ListenList.Add(c)\n \n'-------------------------------------------------------------------------\n\n c = Labelbutton.Make\n c.SetName (\"ApplyButton\")\n c.SetClick (\"AGI/TMT (MassGIS) Theme.ApplyButton.Click\")\n c.SetLabel (\"Add Themes(s)\")\n c.SetUpdate (\"AGI/TMT (MassGIS) Theme.ApplyButton.Update\")\n \n theDialog.GetControlPanel.Add(c,Rect.MakeXY( 40,5,300,30))\n ListenList.Add(c)\n \n'-------------------------------------------------------------------------\n\n TheDialog.FindbyName(\"PrimaryListBox\").SetListeners(ListenList)\n TheDialog.FindbyName(\"SecondaryListBox\").SetListeners(ListenList)\n TheDialog.FindbyName(\"ThirdListBox\").SetListeners(ListenList)\n TheDialog.GetControlPanel.SetListeners(ListenList)\n\n Av.Run(\"AGI/LIB (MassGIS) Dialog.MovetoCenterOfScreen\",theDialog)\n\nReturn(theDialog)" ) (Script.122 Name: "AGI/TMT (MassGIS) Theme.PrimaryListBox.Apply" SourceCode: "' Name:AGI/TMT (MassGIS) Theme.PrimaryListBox.Apply\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 09 11:26:27 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 09 11:26:27 1999\n'------------------------------------------------------------------------\n\n Self.Select\n Self.BroadCastUpdate\n \n Av.GetProject.GetObjecttag.Set(\"ThemeTool Primary Key\",Self.GetCurrentValue.AsString) \n SecondaryListBox = Self.GetDialog.Find byName(\"SecondaryListBox\")\n \n if (SecondaryListBox.GetList.Count = 1) then\n Self.GetDialog.FindbyName(\"ApplyButton\").Click\n end" ) (Script.123 Name: "AGI/TMT (MassGIS) Theme.PrimaryListBox.Select" SourceCode: "' Name:AGI/TMT (MassGIS) Theme.PrimaryListBox.Select\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith and Andrew Kvaal\n' Date: Wed Dec 16 14:23:41 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This is the Select Script forthe PrimaryListBox on the\n' Theme Dialog. It is set in the DialogOpen\n' Script. When the user selects a theme group from\n' the list, the secondary listbox is populated with\n' result of a dictioanry get from the Men1dct dictionary.\n ' Then the update button is called to syncronize\n' the Button with the status of the Listbox selects.\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Mar 05 16:45:57 1997\n'------------------------------------------------------------------------------\n \n Self.BroadCastUpdate\n Self.GetDialog.FindbyName(\"SecondaryListBox\").Update\n Av.GetProject.GetObjecttag.Set(\"ThemeTool Primary Key\",Self.GetCurrentValue.AsString) " ) (Script.124 Name: "AGI/TMT (MassGIS) Theme.PrimaryListBox.Update" SourceCode: "' Name:AGI/TMT (MassGIS) Theme.PrimaryListBox.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:29:45 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:29:45 1999\n'------------------------------------------------------------------------\n\n Men1Dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"Men1Dct\",true})\n\n if (Men1Dct = nil) then\n Self.Empty\n Av.Run(\"AGI/TMT (MassGIS) Theme.DisableAll \",Self)\n Return nil\n end\n \n ' Get the SecondaryListBox Control, Get the ZmenDict Key Value,\n ' Sort this list so that it is alphabetic, then set the Listbox\n ' to display this list.\n \n theList = Men1Dct.ReturnKeys\n\n if (theList = nil) then\n Self.Empty\n Self.GetDialog.FindbyName(\"ThirdListBox\").Update\n Return Nil\n else\n theList.Sort(true)\n \n if (theList.Count = 0) then\n Self.Empty\n Self.GetDialog.FindbyName(\"Second aryListBox\").Update\n Self.GetDialog.FindbyName(\"ThirdListBox\").Update\n Return Nil \n end\n \n Self.DefineFromList(theList)\n end\n \n'---------------------------------------------------------------------------------\n\n if (theList.is(List)) then\n \n if (theList.Count = 0) then\n Return Nil\n end\n \n if (Self.GetObjecttag.is(String)) then\n SelectValue = Self.GetObjecttag.AsS tring.Trim\n Self.SetObjecttag(nil)\n else\n if (theList.Count > 0) then\n SelectValue = theList.Get(0).AsString.Trim\n else\n Selectvalue = \"\"\n end\n end\n \n theIndex = theList.FindbyValue(SelectValue)\n \n if (theIndex = -1) then\n if (theList.Count > 0) then\n theIndex = 0\n end\n end\n\n if (theIndex > -1) then\n Self.SetSele ction (Rect.Makexy(0,theIndex + 1,1,theIndex ),false)\n Self.Select\n Self.SelectCurrent (false)\n Self.Showcurrent\n \n if (Self.GetSelection.Count > 0) then\n Self.GoFirstSelected \n end\n end\n end\n " ) (Script.125 Name: "AGI/TMT (MassGIS) Theme.ReEstablishSelection" SourceCode: "' Name:AGI/TMT (MassGIS) Theme.ReEstablishSelection\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Tue Dec 15 17:28:37 1998\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This script resets the Theme Diationaries and then updates the \n' data in the Primary and Secondary ListBoxes. If the user has included\n' Preferred Primary and Secondary Values then this script makes sure that \n' the selected row returnes to the correct values. If not preferred row is\n' included inthe the SELF list then the first item in the Primary and Secondary\n' lists are selected and updates in the Dialog.\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Mar 05 16:45:57 1997\n'------------------------------------------------------------------------------\n\n Av.PurgeObjects\n\n if (SELF = nil) then \n Return nil \n end\n\n ' Get the Incoming Data Values\n \n TheDialog = Self.Get(0)\n Men1 = Self.Get(1)\n Men2 = Self.Get(2)\n Men3 = Self.Get(3)\n ForceADictionaryRebuild = Self.Get(4)\n \n'---------------------------------------------------------------- \n' Get project dictionaries and make sure the needed men1 and\n' men12dct dictionaries exists.\n\n Men1Dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"Men1Dct\",false}) \n Men12Dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"Men12Dct\",false}) \n \n ' Reset the Dialog ListBoxes\n \n if (ForceADictionaryRebuild or ((Men1Dct = nil))) then\n \n TheDialog.Settitle(\"Theme (MassGIS) Rebuild Inventories...\")\n\n theDialog.FindbyName(\"PrimaryListBox\").Empty\n theDialog.FindbyName(\"SecondaryListBox\").Empty\n theDialog.FindbyName(\"ThirdListBox\").Empty\n theDialog.GetControlPanel.BroadCastUpdate\n\n Av.Run(\"AGI/LIB (MassGIS) MG.Dict Rebuild\",\"inv_\")\n \n Men1Dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"Men1Dct\",false}) \n Men12Dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"Men 12Dct\",false})\n \n TheDialog.Settitle(\"MassGIS Theme Viewer\")\n \n if ((Men1dct = nil) or (Men12dct = nil)) then\n Return nil\n else\n theDialog.FindbyName(\"PrimaryListBox\").Update\n theDialog.FindbyName(\"PrimaryListBox\").BroadCastUpdate\n end\n end\n \n'---------------------------------------------------------------------- \n' Get the Primary and SecondaryList Box Controls\n\n PrimaryListBox = TheDialog.FindbyName(\" PrimarylistBox\")\n SecondaryListBox = TheDialog.FindbyName(\"SecondaryListBox\")\n ThirdListBox = TheDialog.FindbyName(\"ThirdListBox\")\n \n PrimaryListBox.SetObjecttag (Men1)\n SecondaryListBox.SetObjecttag (Men2)\n ThirdListBox.SetObjecttag (Men3)\n \n PrimaryListBox.Update\n \n theDialog.FindByName(\"AddButton\").Update\n theDialog.FindByName(\"EditButton\").Update\n theDialog.FindByName(\"DeleteButton\").Update\n theDialog.Findbyname(\"ApplyButton\").update\n \n'----------------------------------------- ---------------------------------\n\n TheDialog.FindbyName(\"ApplyButton\").update\n Av.PurgeObjects\n \n'--------------------------------------------------------------------------\n\n IsInModalMode = theDialog.FindbyName(\"ApplyButton\")\n\n If (IsInModalMode.is(Boolean).not) then\n IsInModalMode = false\n end\n \n if (IsInModalMode) then\n theDialog.SetTitle(\"Choose the Theme(s) you want to use...\")\n end\n \nReturn Nil\n\n" ) (Script.126 Name: "AGI/TMT (MassGIS) Theme.SecondaryListBox.Apply" SourceCode: "' Name:AGI/TMT (MassGIS) Theme.SecondaryListBox.Apply\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 09 11:24:52 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 09 11:24:52 1999\n'------------------------------------------------------------------------\n\n Self.Select\n Self.BroadCastUpdate\n Av.GetProject.GetObjecttag.Set(\"ThemeTool Secondary Key\",Self.GetCurrentValue.AsString)\n \n' Check the DefineFromList for the Thi rdListBox.\n\n if (Self.GetDialog.FindbyName(\"ThirdListBox\").GetList.Count = 1) then\n Self.GetDialog.FindbyName(\"ApplyButton\").Click\n end" ) (Script.127 Name: "AGI/TMT (MassGIS) Theme.SecondaryListBox.Select" SourceCode: "' Name: AGI/TMT (MassGIS) Theme.SecondaryListBox.Select\n' Headline:\n' Called By: Dialog Controls, SecondaryListBox.Select\n' Calls To: Update other Dialog Controls\n'\n' Author: Stephan Smith and Andrew Kvaal\n' Date: Wed Mar 05 16:45:57 1997\n'\n' Requires: Valid selection in the Primary and Secondary ListBoxes\n'\n' Returns: None\n'\n' Comments: This is the Select Script for the Theme Dialog,\n' SecondaryListBox. When the user selects a row from the \n' listbox, this script is run. This scr ipt uses the Primary\n' and secondary ListBoxes to determine the current theme\n' and updates the Dialog Title and the DescriptionLabelText\n' to show the current Legend and Source values.\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Mar 05 16:45:57 1997\n'------------------------------------------------------------------------------\n \n Self.BroadCastUpdate\n Self.GetDialog.FindbyName(\"ThirdListBox\").Update\n Av.GetProject.GetObjecttag.Set(\"ThemeTool Secondary Key\",Se lf.GetCurrentValue.AsString)" ) (Script.128 Name: "AGI/TMT (MassGIS) Theme.SecondaryListBox.Update" SourceCode: "' Name:AGI/TMT (MassGIS) Theme.SecondaryListBox.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:30:03 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:30:03 1999\n'------------------------------------------------------------------------\n\n Men1Dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"Men1Dct\",true})\n \n if (Men1Dct = nil) then\n Self.Empty\n Av.Run(\"AGI/TMT (MassGIS) Theme.DisableAll\", Self)\n Return nil\n end\n \n ' Get the SecondaryListBox Control, Get the ZmenDict Key Value,\n ' Sort this list so that it is alphabetic, then set the Listbox\n ' to display this list.\n \n PrimaryListBox = Self.GetDialog.FindByName(\"PrimaryListBox\")\n \n if (PrimaryListBox.GetSelection.Count = 1) then\n Men1 = PrimaryListBox.GetSelection.Get(0)\n else \n Men1 = PrimaryListBox.GetCurrentValue\n end\n \n theList = Men1Dct.get(Men1)\n\n if (theList = nil) then\n Self.empty\n else\n theList.Sort(true)\n \n if (theList.Count = 0) then\n Self.Empty\n Self.GetDialog.FindbyName(\"ThirdListBox\").Update\n Return Nil \n end\n \n Self.DefineFromList(theList)\n end\n \n'---------------------------------------------------------------------------------\n\n Self.BroadCastUpdate\n\n if (theList.is(List)) then\n \n if (theList.Count = 0) then\n Return Nil\n end\n \n if (Self.GetObjecttag.is(Stri ng)) then\n SelectValue = Self.GetObjecttag.AsString.Trim\n Self.SetObjecttag(nil)\n else\n SelectValue = theList.Get(0).AsString.Trim\n end\n \n theIndex = theList.FindbyValue(SelectValue)\n \n if (theIndex = -1) then\n if (theList.Count > 0) then\n theIndex = 0\n end\n end\n \n if (theIndex > -1) then\n Self.SetSelection (Rect.Makexy(0,theIndex + 1,1,theIndex ),false)\n Self.Select\n Self.SelectCurrent (false)\n Self.Showcurrent\n \n if (Self.GetSelection.Count > 0) then\n Self.GoFirstSelected \n end\n end\n end\n " ) (Script.129 Name: "AGI/TMT (MassGIS) Theme.ThirdListBox.Apply" SourceCode: "' Name:AGI/TMT (MassGIS) Theme.ThirdListBox.Apply\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 16:31:10 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 16:31:10 1999\n'------------------------------------------------------------------------\n\n Self.BroadCastUpdate\n Av.GetProject.GetObjecttag.Set(\"ThemeTool Third Key\",Self.GetCurrentValue.AsString)\n \n PrimaryListBox = Self.GetDialog.FindbyName(\"PrimaryListB ox\")\n SecondaryListBox = Self.GetDialog.FindbyName(\"SecondaryListBox\")\n ThirdListBox = Self.GetDialog.FindbyName(\"ThirdListBox\")\n \n Men1 = nil\n Men2 = nil\n Men3List = nil\n \n if (PrimaryListBox.GetSelection.Count = 1) then\n Men1 = PrimaryListBox.GetSelection.Get(0)\n else \n Men1 = PrimaryListBox.GetCurrentValue\n end\n \n if (SecondaryListBox.GetSelection.Count = 1) then\n Men2 = SecondaryListBox.GetSelection.Get(0)\n else \n Men2 = SecondaryListBox.GetCurrentValue\n end\n\n if (ThirdListBox.GetSelection.Count > 0) then\n Men3List = ThirdListBox.GetSelection\n end\n \n SelectionStatus = Av.Run(\"AGI/TMT (MassGIS) Theme.ValidateSelection\",{Self.GetDialog,\"All\"})\n \n if (SelectionStatus.Not) then\n Return nil\n end\n \n'------------------------------------------------------------------------\n\n Self.GetDialog.SetTitle(\"MassGIS Theme Viewer\")\n \n if ((Men1 = nil) or (Men2 = nil) or (Men3List.is(List).Not)) then\n Return Nil\n end\n \n Men 123Dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"men123dct\",false})\n ThmIDDct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"ThmIDDct\",false})\n \n if (Men123Dct.Is(Dictionary).Not) then\n Return Nil\n end\n \n if (Men3List.Count = 1) then\n Men3 = Men3List.Get(0)\n\n ThemeIDList = Men123Dct.Get(Men1+Men2+Men3)\n \n if (ThemeIDList.is(list).Not) then\n Return Nil\n end\n \n ThemeIDStr = \"ID(s) \"\n For each AnID in ThemeIDList\n Them eIDStr = ThemeIDStr+AnID.AsString+\", \"\n end\n \n ThemeIDStr = ThemeIDStr.AsString.Trim\n if (ThemeIDStr.Right(1).AsString.Trim = \",\") then\n ThemeIDStr = ThemeIDStr.AsString.Trim.Left(ThemeIDStr.AsString.Trim.Count - 1)\n end\n \n Self.GetDialog.SetTitle(\"Theme Tool (\"+ThemeIDStr+\")\") \n \n if ((ThemeIDList.Count = 1) and (ThmIDDct.is(Dictionary))) then\n\n IDString = ThemeIDList.Get(0)\n \n Clist = ThmIDDct.Get(IDString)\n \n if (Clist.is(List).Not) then\n Return nil\n end\n \n if (Clist.get(13).asstring.count < 3) then\n LegField = \"\"\n else\n Legfield = \"(\"+Clist.get(13)+\")\"\n end\n \n theThemeSrc = Clist.Get(8)\n \n if (theThemeSrc.is(List)) then\n \n if (TheThemeSrc.Count > 1) then\n \n theSDEFlag = theThemeSrc.Get(1)\n if (theSDEFlag.i s(Boolean).not) then\n theSDEFlag = false\n end \n \n if (theSDEFlag.Not) then\n theThemeSrc = theThemeSrc.Get(0).AsString\n else\n theThemeSrc = \"SDE Data from \"+theThemeSrc.Get(2).AsString+\" \"+theThemeSrc.Get(3).AsString\n end\n end\n else\n theThemeSrc = theThemeSrc.AsString\n end\n \n Self.SetHelp(Self.GetSelection.Get(0).AsString+\"//\"+\"Legend: \"+Clist.Get(14).AsString++LegField++\"Data: \"+theThemeSrc.AsString)\n \n IDString = \"\"\n \n For each anID in ThemeIDList\n Clist = Thmiddct.get(anID.AsString)\n IDString = IDString+\" \"+anID.asstring+\" \"\n end\n \n DialogTitle = \"MassGIS Theme Viewer (\"+Clist.get(5).Proper+\" Data [Id# \"+((IDString.Trim).substitute(\" \",\", \"))+\"] )\"\n Self. GetDialog.SetTitle(DialogTitle.AsString)\n end\n end\n \n'-----------------------------------------------------------------------------\n\n if (Men3List.Count > 0) then\n Self.GetDialog.FindbyName(\"ApplyButton\").Click\n end" ) (Script.130 Name: "AGI/TMT (MassGIS) Theme.ThirdListBox.Select" SourceCode: "' Name:AGI/TMT (MassGIS) Theme.ThirdListBox.Select\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 09:53:27 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 09:53:27 1999\n'------------------------------------------------------------------------\n\n Self.BroadCastUpdate\n Av.GetProject.GetObjecttag.Set(\"ThemeTool Third Key\",Self.GetCurrentValue.AsString)\n \n PrimaryListBox = Self.GetDialog.FindbyName(\"PrimaryList Box\")\n SecondaryListBox = Self.GetDialog.FindbyName(\"SecondaryListBox\")\n ThirdListBox = Self.GetDialog.FindbyName(\"ThirdListBox\")\n \n Men1 = nil\n Men2 = nil\n Men3List = nil\n \n if (PrimaryListBox.GetSelection.Count = 1) then\n Men1 = PrimaryListBox.GetSelection.Get(0)\n else \n Men1 = PrimaryListBox.GetCurrentValue\n end\n \n if (SecondaryListBox.GetSelection.Count = 1) then\n Men2 = SecondaryListBox.GetSelection.Get(0)\n else \n Men2 = SecondaryListBox.GetCurrentValue\n end\n\n if (ThirdListBox.GetSelection.Count > 0) then\n Men3List = ThirdListBox.GetSelection\n end\n \n SelectionStatus = Av.Run(\"AGI/TMT (MassGIS) Theme.ValidateSelection\",{Self.GetDialog,\"All\"})\n \n if (SelectionStatus.Not) then\n Return nil\n end\n \n'------------------------------------------------------------------------\n\n Self.GetDialog.SetTitle(\"Theme Tool (MassGIS)\")\n \n if ((Men1 = nil) or (Men2 = nil) or (Men3List.is(List).Not)) then\n Return Nil\n end\n \n Men123Dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"men123dct\",false})\n ThmIDDct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"ThmIDDct\",false})\n \n if (Men123Dct.Is(Dictionary).Not) then\n Return Nil\n end\n \n if (Men3List.Count = 1) then\n Men3 = Men3List.Get(0)\n\n ThemeIDList = Men123Dct.Get(Men1+Men2+Men3)\n \n if (ThemeIDList.is(list).Not) then\n Return Nil\n end\n \n ThemeIDStr = \"ID(s) \"\n For each AnID in ThemeIDList\n T hemeIDStr = ThemeIDStr+AnID.AsString+\", \"\n end\n \n ThemeIDStr = ThemeIDStr.AsString.Trim\n if (ThemeIDStr.Right(1).AsString.Trim = \",\") then\n ThemeIDStr = ThemeIDStr.AsString.Trim.Left(ThemeIDStr.AsString.Trim.Count - 1)\n end\n \n Self.GetDialog.SetTitle(\"MassGIS Theme Viewer (\"+ThemeIDStr+\")\") \n \n if ((ThemeIDList.Count = 1) and (ThmIDDct.is(Dictionary))) then\n\n IDString = ThemeIDList.Get(0)\n \n Clist = ThmIDDct.Get(IDStrin g)\n \n if (Clist.is(List).Not) then\n Return nil\n end\n \n if (Clist.get(13).asstring.count < 3) then\n LegField = \"\"\n else\n Legfield = \"(Legend Field \"+Clist.get(13)+\")\"\n end\n \n\n theThemeSrc = Clist.Get(8).AsString\n \n Self.SetHelp(Self.GetSelection.Get(0).AsString+\"//\"+Men3.AsString+\" Legend AVL File: \"+Clist.Get(14).AsString+\" \"+\n LegFiel d++\" Theme Source: \"+theThemeSrc.AsString++\" Stored in \"+Clist.Get(20).AsString)\n \n IDString = \"\"\n \n For each anID in ThemeIDList\n Clist = Thmiddct.get(anID.AsString)\n IDString = IDString+\" \"+anID.asstring+\" \"\n end\n \n DialogTitle = \"MassGIS Theme Viewer (\"+Clist.get(5).Proper+\" Data [Id# \"+((IDString.Trim).substitute(\" \",\", \"))+\"] )\"\n Self.GetDialog.SetTitle(DialogTitle.AsString)\n end\n end" ) (Script.131 Name: "AGI/TMT (MassGIS) Theme.ThirdListBox.Update" SourceCode: "' Name:AGI/TMT (MassGIS) Theme.ThirdListBox.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 09:52:49 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 09:52:49 1999\n'------------------------------------------------------------------------\n\n PrimaryListBox = Self.GetDialog.FindbyName(\"PrimaryListBox\")\n SecondaryListBox = Self.GetDialog.FindbyName(\"SecondaryListBox\")\n ThirdListBox = Self.GetDialog.Fin dbyName(\"ThirdListBox\")\n \n Men1 = \"\"\n Men2 = \"\"\n \n if (PrimaryListBox.GetSelection.Count = 1) then\n Men1 = PrimaryListBox.GetSelection.Get(0)\n else \n Men1 = PrimaryListBox.GetCurrentValue\n end\n \n if (SecondaryListBox.GetSelection.Count = 1) then\n Men2 = SecondaryListBox.GetSelection.Get(0)\n else \n Men2 = SecondaryListBox.GetCurrentValue\n end\n \n \n Men1Men2 = Men1.AsString+Men2.AsString\n \n'--------------------------------------------------------- ---------------------\n\n Men1Dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"Men1Dct\",true})\n \n if (Men1Dct = nil) then\n Av.Run(\"AGI/TMT (MassGIS) Theme.DisableAll\",Self)\n Return nil\n end\n \n Men12Dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"Men12Dct\",true})\n \n if (Men12Dct = nil) then\n Av.Run(\"AGI/TMT (MassGIS) Theme.DisableAll\",Self)\n Return nil\n end\n \n theList = Men12Dct.get(Men1.AsString+Men2.AsString.Trim)\n \n if (theList = nil) then\n Self.empty\n Return Nil\n else\n theList.Sort(true)\n \n if (theList.Count = 0) then\n Self.Empty\n Return Nil \n end\n \n Self.DefineFromList(theList)\n end \n \n'---------------------------------------------------------------------------------\n \n if (theList.is(List)) then\n \n if (theList.Count = 0) then\n Return Nil\n end\n \n if (Self.GetObjecttag.is(String)) then\n SelectValue = Self.GetObjecttag.AsString.Trim\n Self.SetObjecttag(nil)\n else\n SelectValue = theList.Get(0).AsString.Trim\n end\n \n theIndex = theList.FindbyValue(SelectValue)\n \n if (theIndex > -1) then\n Self.SetSelection (Rect.Makexy(0,theIndex,1,theIndex + 1 ),false)\n Self.Select\n Self.Showcurrent\n end\n end" ) (Script.132 Name: "AGI/TMT (MassGIS) Theme.ValidateSelection" SourceCode: "' Name:AGI/TMT (MassGIS) Theme.ValidateSelection\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Thu Jul 29 14:15:20 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This script is called by several update scripts to determine\n' the status of the men1, men2, men3 selections.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Thu Jul 29 14:15:20 1999\n'------------------------------------------------------------------------\n\n theDialog = Self.Get(0)\n theType = Self.Get(1)\n \n'------------------------------------------------------------------------\n' Check the status of the Theme dictionaries. If they are not valid,\n' then the script will stop.\n\n MoreOptionsButton = theDialog.FindbyName(\"MoreOptionsButton\")\n DisplayStatus = MoreOptionsButton.GetObjecttag\n \n if (MoreOptionsButton.GetObjecttag.is(Boolean).not) then\n MoreOptionsButton.GetObjecttag(false)\n end\n \n Men1Dct = Av.GetProject.GetObjecttag.Get(\"Men1Dct\") \n Men12Dct = Av.GetProject.GetObjecttag.G et(\"Men12Dct\") \n Men123Dct = Av.GetProject.GetObjecttag.Get(\"Men123Dct\") \n Thmiddct = Av.GetProject.GetObjecttag.Get(\"Thmiddct\") \n \n GoodDcts = (Men1Dct = nil) or (Men12Dct = nil) or (Men123Dct = nil) or (ThmidDct = nil)\n \n if (GoodDcts) then \n 'MoreOptionsButton.SetObjecttag(false)\n Return (false)\n end\n\n'-----------------------------------------------------------------------\n\n PrimaryListBox = theDialog.FindbyName(\"PrimaryListBox\")\n SecondaryListBox = theDialog.FindbyName(\"Second aryListBox\")\n ThirdListBox = theDialog.FindbyName(\"ThirdListBox\")\n \n if (PrimaryListBox.GetSelection.Count = 1) then\n Men1 = PrimaryListBox.GetSelection.Get(0)\n else \n Men1 = nil\n end\n \n if (SecondaryListBox.GetSelection.Count = 1) then\n Men2 = SecondaryListBox.GetSelection.Get(0)\n else \n Men2 = nil\n end\n\n if (theType = \"One\") then\n SelectionValue = (ThirdListBox.GetSelection.Count <> 1)\n else\n SelectionValue = (ThirdListBox.GetSelection.Count < 1)\n end\n \n'-------------------------------------------------------------------------\n\n MultiMen2Selection = (SecondaryListBox.GetSelection.Count > 1)\n\n'-------------------------------------------------------------------------\n \n if ((Men1 = nil) or (Men2 = nil) or (SelectionValue) or (MultiMen2Selection)) then\n Return (false)\n else\n Return (true)\n end\n \n" ) (Script.133 Name: "AGI/TMT (MassGIS) ThemeID.AddThemeID" SourceCode: "' Name:AGI/TMT (MassGIS) ThemeID.AddThemeID\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Jul 28 11:29:44 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Jul 28 11:29:44 1999\n'------------------------------------------------------------------------\n \n if (Av.GetProject.GetFileName = nil) then\n Msgbox.Warning(\"The project needs to be saved before you can add a \"+\n \"theme to a theme inventory! S ave the project \"+\n \"before you can continue...\",\"Stopping...\")\n Return Nil\n end\n\n if (Self.is(List).not) then\n Return nil\n end\n \n theView = Self.Get(0)\n Men1 = Self.Get(1)\n Men2 = Self.Get(2)\n Men3 = Self.Get(3)\n\n theThemes = theView.GetActiveThemes\n \n if (theView.GetActiveThemes.Count <> 1) then \n Msgbox.Warning(\"There is not an active theme in the \"+theView.AsString+\" view.\",\"\")\n Return nil \n end\n \n theTheme = th eThemes.get(0).Clone\n \n'---------------------------------------------------------------------------------\n\n ThmIDDct = Av.GetProject.GetObjecttag.get(\"ThmIDDCt\") \n Men123Dct = Av.GetProject.GetObjecttag.get(\"Men123dct\")\n \n if (Men1.AsString.Lcase.Contains(\"No Themes Available\")) then\n Men1 = TheTheme.GetName.AsString\n end\n\n Men3 = theTheme.AsString\n Men3 = Av.Run(\"AGI/TMT (MassGIS) ThemeID.GetUniqueName\",{Men123Dct,Men1,Men2,Men3})\n\n if (TheView.is(View).not) then\n Return nil\n end\n \n'---------------------------------------------------------------------------------\n' 3) Determine weither or not to add all themes or only Active or selected themes\n' in the Source View\n \n isSTheme = theTheme.GetCLAss.GetClassName = \"STheme\"\n isITheme = theTheme.GetCLAss.GetClassName = \"ITheme\"\n isFTheme = theTheme.GetCLAss.GetClassName = \"FTheme\"\n isDBTheme = theTheme.GetClass.GetClassName = \"DBTheme\"\n \n if ((isITheme.not) and (isFTheme.not) and (isSTheme.not) and (isDBTheme .Not)) then\n Msgbox.Warning(\"This theme does not appear to be either a Ftheme or and ITheme.\",\"Unable to Add...\")\n Return nil\n end\n \n if (IsDBTheme) then\n Msgbox.Info(\"DBase Themes are not supported by this tool at this time...\",\"\")\n Return Nil\n end\n \n'---------------------------------------------------------------------------------\n\n theVtabList = Av.Run(\"AGI/LIB (MassGIS) GetVtabList\",{\"inv_\",true})\n \n TheNextThemeID = \"1000\"\n \n theVtab = nil\n \n if (theVtabList.Count > 0) then\n theVtab = theVtabList.Get(0)\n TheNextThemeID = Av.Run(\"AGI/TMT (MassGIS) ThemeID.FindMaxThemeID\",{theVtab,1})\n end\n \n'--------------------------------------------------------------------------------------------\n' 8) Get the General Data Values\n\n TheThemeName = TheTheme.GetName.Clone\n TheThemeMenLeg = TheThemeName.Clone\n TheThemeLabel = TheThemeName.Clone\n TheThemeLegFile = \"\"\n TheThemeMin = TheTheme.GetThreshold.GetMinimum\n TheThemeMa x = TheTheme.GetThreshold.GetMaximum\n TheThemeComments = TheTheme.GetComments\n TheThemeSrc = TheTheme.GetSrcName.GetDataSource\n \n if (theTheme.Is(ITheme)) then \n 'added by ak 2/4/98\n \n theSource = theTheme.GetSrcName.GetFileName\n theThemeType = nil\n \n if (theSource.is(FileName)) then\n if (INFODir.FileExists (theSource)) then\n theThemeType = \"imagecat\"\n end\n \n if (theThemeType = nil) then\n theSourceName = theSource.GetBaseName\n \n if (theSourceName.AsString.Contains(\".dbf\")) then\n theThemeType = \"imagecat\"\n end\n end \n\n if (theThemeType = nil) then\n theSourceName = theSource.GetBaseName\n \n if (theSourceName.AsString.Contains(\".tif\")) then\n theThemeType = \"image\"\n end \n end\n \n if (theThemeType = nil) then\n theSourceName = theSource.GetBaseName\n \n if (theSourceName.AsString.Contains(\".jpg\")) then\n theThemeType = \"image\"\n end\n end \n end\n \n if (theThemeType = nil) then\n Str1 = \"Is this an Image Catalog?\"\n if (Msgbox.MiniYesNo(Str1,false)) then\n theThemeType = \"imagecat\"\n else\n theThemeType = \"image\"\n end\n end\n else\n if (IsDBTheme) then\n TheThemeType = TheTheme.GetShapeClass.GetClassName\n else\n TheThemeType = TheTheme.GetFtab.GetShapeClass.GetClassName\n TheThemeType = TheTheme.GetFtab.GetSrcname.GetSubName\n \n if (TheTheme.GetClass.GetClassName = \"GTheme\") then\n theThemeType = \"GTheme\"\n en d\n \n if (TheTheme.GetClass.GetClassName = \"STheme\") then\n theThemeType = \"STheme\"\n end\n \n if (theTheme.GetSrcName.GetFileName = nil) then\n if (theThemeType = \"PolyLine\") then\n theThemeType = \"Arcs\"\n end\n end\n \n if (theThemeType = \"PolyLine\") then\n theThemeTYpe = \"Arcs\"\n end\n end\n end\n \n'----------------------------------------------------------------------------------------------\n' 9) Get or set legend file name\n\n theThemeLegFile = Av.Run(\"AGI/TMT (MassGIS) ThemeID.Generate Legend FileName\",{theVtab})\n \n'----------------------------------------------------------------------------------------------\n' 10) Get the Legend Field Names\n \n if (theTheme.Is(ITheme).Not) then\n TheThemeLegendField = TheTheme.GetLegend.GetFieldNames\n else\n theThe meLegendField = {}\n end\n \n if (TheThemeLegendField.count = 0) then\n TheThemeLegendField = \"simple\"\n else\n TheThemeLegendField = TheThemeLegendField.Get(0).AsString\n end\n \n'----------------------------------------------------------------------------------------------\n' 11) Get and Set the Theme Query String \n \n if (theTheme.Is(ITheme).Not) then\n if (theTheme.is(FTheme)) then\n TheThemeQuery = TheTheme.GetFtab.GetDefinition.AsString\n else\n TheThemeQuery = \"\"\n end\n else\n theThemeQuery = \"\"\n end\n \n'-----------------------------------------------------------------------------------------------\n' 12) Allow the user to proof the new data\n \n DataList = {Men1,Men2,Men3,TheThemeName,\n TheThemeSrc.AsString+\" (\"+theThemeType.AsString.UCase+\")\",\n TheThemeLegFile.AsString,\n TheThemeLegendField.AsString,\n TheThemeType.AsString}\n \n theAddDialog = Av.Run(\"AGI/TMT (MassGIS) AddDataToInventoryDialog.Open\",{DataList,TheNextThemeID,theTheme.Clone,theVTabList})\n theAddDialog.Update\n theAddDialog.Open\n \n ContinueToNextStep = true\n if (theAddDialog.GetObjecttag.is(Boolean)) then\n if (theAddDialog.GetObjecttag.Not) then \n Return nil \n end \n else\n ContinueToNextStep = false\n end \n\n Men1 = theAddDialog.FindbyName(\"1TextLine\").GetText.AsString\n Men2 = theAddDialog.FindbyName(\"2TextLine\").getText.A sString\n Men3 = theAddDialog.FindbyName(\"3TextLine\").getText.AsString\n TheThemeTitle = theAddDialog.FindbyName(\"ThemeTitleTextLine\").GetText.AsString\n TheNextThemeID = theAddDialog.FindbyName(\"ThemeIDTextLabel\").GetText\n theThemeSrc = theAddDialog.FindbyName(\"SourcePathTextLine\").getText\n TheThemeLegFile = theAddDialog.FindbyName(\"LegendPathTextLine\").getText\n theVtab = theAddDialog.FindbyName(\"DestinationComboBox\").GetSelection\n \n if (theVtab.is(Vtab).Not) then\n Msgbo x.INfo(\"Unable to save this ThemeID to the selected Vtab. It is not a Vtab!\",\"\")\n Av.PurgeObjects\n Return Nil\n end\n \n if (File.CanDelete(theVtab.GetBaseTableFileName).not) then\n \n Msgbox.Warning(\"This file is Read Only. If you want to add a Theme ID \"+\n \"to this file, then change the write protection.\",\n theVtab.GetBaseTableFileName.AsString+\"...\")\n \n Return nil\n end\n \n'------------------------------------- --------------------------------------------------------\n' 13) Reset the Legend File name\n \n if (theThemeLegFile.isNull.not) then\n if ((theTheme.is(ITheme).not) and (TheThemeType.AsString.Lcase.Contains(\"image\").not)) then\n TheTheme.GetLegend.Save(theThemeLegFile.AsFileName) \n else\n TheThemeLegFile = \"\"\n end\n end\n \n'------------------------------------------------------------------------------\n' 16) Add theme data to vtab now\n\n Av.Run(\"A GI/TMT (MassGIS) ThemeID.BackupFile\",theVtab.GetBaseTableFileName.AsString)\n \n if (theVtab.CanEdit) then\n theVtab.SetEditable(true)\n end\n\n if (theVtab.IsEditable) then\n newRec = theVtab.AddRecord\n\n theVtab.SetValue( theVtab.FindField(\"men1\") , newRec, Men1 )\n theVtab.SetValue( theVtab.FindField(\"men2\") , newRec, Men2 )\n \n if (theVtab.FindField(\"Men3\").is(Field)) then\n theVtab.SetValue( theVtab.FindField(\"men3\"), newRec, Men3)\n end\n \n theVtab.SetValue( theVtab.FindField(\"Themeid\"), newRec, TheNextThemeID )\n theVtab.SetValue( theVtab.FindField(\"menleg\") , newRec, TheThemeTitle)\n theVtab.SetValue( theVtab.FindField(\"legfile\"), newRec, TheThemeLegFile.AsString)\n theVtab.SetValue( theVtab.FindField(\"legfld\") , newRec, TheThemeLegendField) \n theVtab.SetValue( theVtab.FindField(\"srcfile\"), newRec, TheThemeSrc )\n theVtab.SetValue( theVtab.FindField(\"Thmlbl\") , newRec, TheThemeTitle)\n theVtab .SetValue( theVtab.FindField(\"lufld\"), newRec, \"\")\n theVtab.SetValue( theVtab.FindField(\"lufile\") , newRec, \"\")\n theVtab.SetValue( theVtab.FindField(\"ScaleMin\"), newRec, TheThemeMin)\n theVtab.SetValue( theVtab.FindField(\"scaleMax\"), newRec, TheThemeMax)\n theVtab.SetValue( theVtab.FindField(\"comments\"), newRec, TheThemeComments)\n theVtab.SetValue( theVtab.FindField(\"DefLeg\") , newRec, \"Y\")\n theVtab.SetValue( theVtab.FindField(\"Active\"), newRec, \"Y\")\n theVtab.S etValue( theVtab.FindField(\"Ftrtyp\"), newRec, TheThemeType )\n theVtab.SetValue( theVtab.FindField(\"Qry\"), newRec, TheThemeQuery ) \n theVtab.SetEditable(false)\n\n theBitMap = theVtab.GetSelection\n theBitMap.ClearAll\n theBitMap.Set (newRec)\n\n Av.Run(\"AGI/LIB (MassGIS) MG.Dict_ThmidDct\",theVtab)\n end\n \nReturn({TheNextThemeID,Men1,Men2,Men3,ContinueToNextStep}) " ) (Script.134 Name: "AGI/TMT (MassGIS) ThemeID.BackupFile" SourceCode: "' Name:AGI/TMT (MassGIS) ThemeID.BackupFile\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Jul 28 11:29:53 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Jul 28 11:29:53 1999\n'------------------------------------------------------------------------\n\n TheFileName = (Self).AsString\n \n ' Make a Backup of the current File.\n \n BackupFile = theFileName.AsString.Substitute(\".dbf\",\".bck\")\n \n if (File.Exists(Ba ckupFile.AsFileName)) then\n \n if (File.Candelete(BackupFile.AsFileName)) then\n File.Delete(BackupFile.AsFileName)\n end\n \n end\n \n if (File.Exists(BackupFile.AsFileName).not) then\n File.Copy(theFilename.AsString.AsFileName,BackupFile.AsFileName)\n end\n" ) (Script.135 Name: "AGI/TMT (MassGIS) ThemeID.ChangeMenuValues.CheckKeys" SourceCode: "' Name:AGI/TMT (MassGIS) ThemeID.ChangeMenuValues.CheckKeys\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 11:32:07 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 11:32:07 1999\n'------------------------------------------------------------------------\n\n Men1Dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"men1Dct\",false}) \n Men12Dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"men12Dct\",false})\n Me n123Dct = Av.Run(\"AGI/LIB (MassGIS) MG.GetDictionary\",{\"men123Dct\",false})\n \n if ((Men1Dct = nil) or (Men12Dct = nil) or (Men123Dct = nil)) then\n Return nil\n end\n\n' Get The Men1 and Men2 Keys String From the Dialog\n\n Men1 = Self.GetDialog.FindbyName(\"Men1TextLine\").GetText\n Men2 = Self.GetDialog.FindbyName(\"Men2TextLine\").GetText\n Men3 = Self.GetDialog.FindbyName(\"Men3TextLine\").GetText\n Men3Tag = Self.GetDialog.FindbyName(\"Men3TextLine\").GetTag\n Men3Hold = Men3\n \n if (Men3 Tag = Men3) then\n Return Nil\n end\n \n Men3 = (Av.Run(\"AGI/TMT (MassGIS) ThemeID.GetUniqueName\",{Men123Dct,Men1,Men2,Men3})).AsString.Trim\n \n if (Men3Hold.AsString.LCase.Trim <> Men3.AsString.LCase.Trim) then\n System.Beep\n System.Beep\n \n Str1 = \"The Menu Titles were altered to make the titles you entered unique! Do you want to use the unique value?\"\n Str2 = \"\"\n if (Msgbox.YesNo(Str1,Str2,true)) then\n Self.GetDialog.FindbyName(\"Men3TextLine\").SetText(M en3.AsString.Trim)\n end\n end\n \n" ) (Script.136 Name: "AGI/TMT (MassGIS) ThemeID.CreateDialog" SourceCode: "' Name:AGI/TMT (MassGIS) ThemeID.CreateDialog\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Jul 28 11:30:09 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Jul 28 11:30:09 1999\n'------------------------------------------------------------------------\n\n Clist = Self.Get(0)\n \n TheDoc = Av.GetProject.FindDialog(\"ThemeID Menu\")\n \n if (TheDoc <> nil) then\n TheDoc.Close \n TheDoc.SetObjecttag(Clist)\n theDoc.Cl ose\n \n Av.GetProject.RemoveDialog(theDoc.AsString)\n Return (theDoc)\n end\n\n'-------------------------------------------------------------------------\n\n TheDialog = Dialog.MakeSized(true,true,true,true,Rect.MakeXY(0,0,530,340))\n TheDialog.SetName (\"ThemeID(MassGIS) Menu\")\n TheDialog.SetAlwaysOnTop (true)\n TheDialog.SetCloseable (true)\n TheDialog.SetEscapeEnabled (true)\n TheDialog.UsetitleBar (true)\n TheDialog.Setmodal (true)\n TheDialog.SetResizable (false)\n TheDialog.SetUpdate (\"AGI/TMT (MassGIS) ThemeID.UpdateDialog\")\n TheDialog.SetTitle (\"ThemeID Menu\")\n TheDialog.SetOpen (\"AGI/TMT (MassGIS) ThemeID.OpenDialog\")\n TheDialog.SetObjecttag(Clist.Clone)\n Av.Getproject.AddDialog(TheDialog) \n \n n = Av.Run(\"AGI/LIB (MassGIS) Icon Dictionary\",\"\")\n \n'---------------------------------------------------------------------------------\n \n Gener alPropertiesRadioButton = LabelButton.Make\n GeneralPropertiesRadioButton.SetName (\"GeneralPropertiesRadioButton\")\n GeneralPropertiesRadioButton.SetClick (\"AGI/TMT (MassGIS) ThemeID.RadioButton.Click\")\n GeneralPropertiesRadioButton.SetLabel (\"General\")\n GeneralPropertiesRadioButton.SetHelp (\"General Properties//Display General\"+\n \" Properties for this theme ID.\") \n \n Thedialog.GetControlPan el.add(GeneralPropertiesRadioButton,Rect.Makexy(10,10,90,135))\n\n'---------------------------------------------------------------------------------\n\n LegendRadioButton = LabelButton.Make\n LegendRadioButton.SetName (\"LegendRadioButton\")\n LegendRadioButton.SetClick (\"AGI/TMT (MassGIS) ThemeID.RadioButton.Click\")\n LegendRadioButton.SetLabel (\"Legend\")\n LegendRadioButton.SetHelp (\"Legend Parameters//Set Legend Parameters.\") \n Thedialog.GetControlPanel.add(LegendRadioButton,Rect.Makexy(80,10, 170,135))\n \n'---------------------------------------------------------------------------------\n\n SourceRadioButton = LabelButton.Make\n SourceRadioButton.SetName (\"SourceRadioButton\")\n SourceRadioButton.SetClick (\"AGI/TMT (MassGIS) ThemeID.RadioButton.Click\")\n SourceRadioButton.SetLabel (\"Source\")\n SourceRadioButton.SetHelp (\"Data Source Parameters//Set data source parameters.\") \n Thedialog.GetControlPanel.add(SourceRadioButton,Rect.Makexy(150,10,250,135))\n\n'---------------------------- -----------------------------------------------------\n\n LuRadioButton = LabelButton.Make\n LuRadioButton.SetName (\"LuRadioButton\")\n LuRadioButton.SetClick (\"AGI/TMT (MassGIS) ThemeID.RadioButton.Click\")\n LuRadioButton.SetLabel (\"Database\")\n LuRadioButton.SetHelp (\"Join Options//Set Join item parameters.\") \n LuRadioButton.SetTag (\"3\")\n Thedialog.GetControlPanel.add(LuRadioButton,Rect.Makexy(220,10,280,135))\n \n'------------------------------------------------- --------------------------------\n\n JoinLinkButton = LabelButton.Make\n JoinLinkButton.SetName (\"Join/LinkRadioButton\")\n JoinLinkButton.SetClick (\"AGI/TMT (MassGIS) ThemeID.RadioButton.Click\")\n JoinLinkButton.SetHelp (\"Join Options//Set Join item parameters.\") \n JoinLinkButton.SetLabel (\"Join/Links\")\n TheDialog.GetControlPanel.add(JoinLinkButton,Rect.Makexy(290,10,370,35))\n\n'---------------------------------------------------------------------------------\n\n QueryRadioButto n = LabelButton.Make\n QueryRadioButton.SetName (\"QueryRadioButton\")\n QueryRadioButton.SetClick (\"AGI/TMT (MassGIS) ThemeID.RadioButton.Click\")\n QueryRadioButton.SetHelp (\"Join Options//Set Join item parameters.\") \n QueryRadioButton.SetLabel (\"Fields\")\n TheDialog.GetControlPanel.add(QueryRadioButton,Rect.Makexy(370,10,440,35))\n\n'---------------------------------------------------------------------------------\n \n CommentsRadioButton = LabelButton.Make\n CommentsRadioButton.SetName (\"CommentsRadioButton\")\n CommentsRadioButton.SetClick (\"AGI/TMT (MassGIS) ThemeID.RadioButton.Click\")\n CommentsRadioButton.SetLabel (\"Comments\")\n CommentsRadioButton.SetHelp (\"Comments and Scales//Set Comments and Scale Minimums and Maximums.\")\n Thedialog.GetControlPanel.add(CommentsRadioButton,Rect.Makexy(440,10,500,135))\n \n'---------------------------------------------------------------------------------\n\n HelpButton = LabelButton.Make\n HelpButton.setName (\"HelpButton\")\n HelpButto n.SetClick (\"AGI/TMT (MassGIS) ThemeID.HelpButton.Click\")\n HelpButton.SetUpdate (\"AGI/LIB (MassGIS) HTMLDocumentation.Update\")\n HelpButton.SetObjecttag (true)\n HelpButton.SetLabel (\"Help\") \n TheDialog.getcontrolpanel.add(HelpButton,Rect.Makexy(280,305,335,330))\n \n'---------------------------------------------------------------------------------\n\n OKLabelButton = LabelButton.Make\n OKLabelButton.setName (\"OKLabelButton\")\n OKLabelButton.SetClick (\"AG I/TMT (MassGIS) ThemeID.OKLabelButton.Click\")\n OKLabelButton.SetEnabled (false)\n OKLabelButton.SetObjecttag (true)\n OKLabelButton.SetLabel (\"OK\") \n TheDialog.getcontrolpanel.add(OKLabelButton,Rect.Makexy(340,305,420,330))\n\n'---------------------------------------------------------------------------------\n\n CancelLabelButton = LabelButton.Make\n CancelLabelButton.SetName (\"CancelLabelButton\")\n CancelLabelButton.SetClick (\"AGI/LIB (MassGIS) Dialog.CloseLabelButton\")\n CancelLabe lButton.SetLabel (\"Close\") \n TheDialog.getcontrolpanel.add(CancelLabelButton,Rect.Makexy(425,305,520,330))\n \n'---------------------------------------------------------------------------------\n\n LuControlPanel = ControlPanel.Make\n LuControlPanel.SetName (\"LUControlPanel\")\n LuControlPanel.SetLabel (\"DataBase and LU Properties\")\n LuControlPanel.SetVisibleBorder (true) \n TheDialog.getcontrolpanel.add(LuControlPanel,Rect.Makexy(10,60,520,300))\n \n'------------------ ---------------------------------------------------------------\n\n LegendControlPanel = ControlPanel.Make\n LegendControlPanel.SetName (\"LegendControlPanel\")\n LegendControlPanel.SetLabel (\"Legend Properties\")\n LegendControlPanel.SetVisibleBorder (true) \n TheDialog.getcontrolpanel.add(LegendControlPanel,Rect.Makexy(10,60,520,300))\n \n'---------------------------------------------------------------------------------\n\n SourceControlPanel = ControlPanel.Make\n SourceControlPanel.SetName (\"SourceControlPanel\")\n SourceControlPanel.SetLabel (\"Theme Source\")\n SourceControlPanel.SetVisibleBorder (true) \n TheDialog.getcontrolpanel.add(SourceControlPanel,Rect.Makexy(10,60,520,300))\n\n'---------------------------------------------------------------------------------\n\n CommentsControlPanel = ControlPanel.Make\n CommentsControlPanel.SetName (\"CommentsControlPanel\")\n CommentsControlPanel.SetVisible (false)\n CommentsControlPanel.SetLabel (\"T heme Scales and Comments\")\n CommentsControlPanel.SetVisibleBorder (true) \n TheDialog.getcontrolpanel.add(CommentsControlPanel,Rect.Makexy(10,60,520,300))\n \n'---------------------------------------------------------------------------------\n\n JoinControlPanel = ControlPanel.Make\n JoinControlPanel.SetName (\"JoinControlPanel\")\n JoinControlPanel.SetVisible (false)\n JoinControlPanel.SetLabel (\"Join/Link Options\")\n JoinControlPanel.SetVisibleBorder (true) \n TheDialog. getcontrolpanel.add(JoinControlPanel,Rect.Makexy(10,60,520,300))\n\n'---------------------------------------------------------------------------------\n\n c = TextLabel.Make\n c.SetName (\"TextLabel\")\n c.SetLabel (\"This control panel provides access to parameters that allows you\"+nl+\n \"to add/delete or edit join/link events between the source of this \"+nl+\n \"ThemeID and other database files and sources.\")\n JoinControlPanel.add(c,Rect.Makex y(30,50,420,250))\n\n'---------------------------------------------------------------------------------\n\n c = LabelButton.Make\n c.SetName (\"JoinLabelButton\")\n c.SetLabel (\"Open Join/Link Edit Menu...\")\n c.SetClick (\"AGI/TMT (MassGIS) ThemeID.LabelButton.Click\")\n JoinControlPanel.add(c,Rect.Makexy(30,140,420,165))\n \n'---------------------------------------------------------------------------------\n\n AliasControlPanel = ControlPanel.Make\n AliasControlPanel.SetName (\"AliasControlPanel\")\n AliasControlPanel.SetVisible (false)\n AliasControlPanel.SetLabel (\"Data Field Parameters\")\n AliasControlPanel.SetVisibleBorder (true) \n TheDialog.getcontrolpanel.add(AliasControlPanel,Rect.Makexy(10,60,520,300))\n \n'---------------------------------------------------------------------------------\n\n c = Textlabel.Make\n c.SetName (\"TextLabel\")\n c.SetLabel (\"This control panel provides access to parameters that allow you\"+nl+\n \"add/delete or edit join/link events between the source of this\"+nl+\n \"ThemeID and other database files and sources.\")\n AliasControlPanel.add(c,Rect.Makexy(30,50,520,350))\n \n'---------------------------------------------------------------------------------\n\n c = LabelButton.Make\n c.SetName (\"AliasLabelButton\")\n c.SetLabel (\"Open Fields Parameter Menu...\")\n c.SetClick (\"AGI/TMT (MassGIS) ThemeID.LabelButton.Click\")\n Ali asControlPanel.add(c,Rect.Makexy(30,140,420,165))\n \n'----------------------------------------------------------------------------------\n\n LUFieldsTextLine = TextLine.Make\n LUFieldsTextLine.SetName (\"LUFieldsTextLine\")\n LUFieldsTextLine.SetLabel (\"Lu Fields\") \n LUFieldsTextLine.SetChanged (\"AGI/TMT (MassGIS) ThemeID.UpdateApplyButton\") \n LuControlPanel.Add(LUFieldsTextLine,Rect.Makexy(50,40,400,70))\n \n'---------------------------------------------------------------------------------\n\n c = Button.Make\n c.SetName (\"SetLUFieldsButton\")\n c.SetClick (\"AGI/TMT (MassGIS) ThemeID.LabelButton.Click\")\n c.SetUpdate (\"AGI/TMT (MassGIS) ThemeID.LUButtons.Update\") \n \n LuControlPanel.Add(c,Rect.Makexy(405,38,435,62))\n SetLUFieldsButton = c\n \n if (n.Get(\"Link\").is(Icon)) then\n c.SetIcon (n.Get(\"Link\"))\n else\n c.Set\n end\n\n'---------------------------------------------------------------------------------\n\n SysmopTextLine = TextLine.Make\n SysmopTextL ine.SetName (\"SysmopTextLine\") \n SysmopTextLine.SetLabel (\"SysMOP\")\n SysmopTextLine.SetChanged (\"AGI/TMT (MassGIS) ThemeID.UpdateApplyButton\") \n LuControlPanel.Add(SysmopTextLine,Rect.Makexy(50,70,400,100))\n\n'---------------------------------------------------------------------------------\n\n LuFileTextLine = TextLine.Make\n LuFileTextLine.SetName (\"LuFileTextLine\")\n LuFileTextLine.SetChanged (\"AGI/TMT (MassGIS) ThemeID.UpdateApplyButton\") \n LuF ileTextLine.SetLabel (\" Lu File\")\n LuControlPanel.Add(LuFileTextLine,Rect.Makexy(50,100,400,130))\n \n'---------------------------------------------------------------------------------\n\n LUFieldsTextLine.SetNextControl(SysmopTextLine)\n SysmopTextLine.SetNextControl(LuFileTextLine)\n LuFileTextLine.SetNextControl(GeneralPropertiesRadioButton)\n\n'---------------------------------------------------------------------------------\n\n c = LabelButton.Make\n c.SetName (\"LuFileLabe lButton\")\n c.SetClick (\"AGI/TMT (MassGIS) ThemeID.LabelButton.Click\")\n c.SetLabel (\"...\") \n LuControlPanel.Add(c,Rect.Makexy(405,100,435,120))\n\n'---------------------------------------------------------------------------------\n\n OpenLuFileButton = Button.Make\n OpenLuFileButton.SetName (\"OpenLuFileButton\")\n OpenLuFileButton.SetClick (\"AGI/TMT (MassGIS) ThemeID.LabelButton.Click\")\n OpenLuFileButton.SetUpdate (\"AGI/TMT (MassGIS) ThemeID.LUB uttons.Update\") \n \n LuControlPanel.Add(OpenLuFileButton,Rect.Makexy(440,100,470,120))\n OpenLuFileButton.SetIcon (n.Get(\"Open\"))\n \n LuFileTextLine.SetListeners({OpenLuFileButton,SetLUFieldsButton})\n\n'---------------------------------------------------------------------------------\n \n c = Button.Make\n c.SetName (\"LuHelpTextLabel\")\n c.SetClick (\"AGI/TMT (MassGIS) ThemeID.HelpLabelButton\")\n LUControlPanel.Add(c,Rect.Makexy(445,15,470,40))\n \n if (n.Get (\"Help\").is(icon)) then\n c.SetIcon(N.Get(\"Help\"))\n else\n c.SetVisible(false)\n end\n \n'---------------------------------------------------------------------------------\n\n LuFileTextLabel = TextLabel.Make\n LuFileTextLabel.SetName (\"LuFileTextLabel\")\n LuFileTextLabel.SetUpdate (\"AGI/TMT (MassGIS) ThemeID.FileStatus.Update\")\n LUControlPanel.Add(LuFileTextLabel,Rect.Makexy(10,200,390,240))\n LuFileTextLine.SetListeners(LuFileTextLine.GetListeners.Add(LuFileTe xtLabel))\n \n'---------------------------------------------------------------------------------\n\n DefaultLegendCheckBox = CheckBox.Make\n DefaultLegendCheckBox.SetName (\"DefaultLegendCheckBox\")\n DefaultLegendCheckBox.SetLabel (\"This is a Default Legend.\") \n DefaultLegendCheckBox.SetClick (\"AGI/TMT (MassGIS) ThemeID.UpdateApplyButton\")\n LegendControlPanel.Add(DefaultLegendCheckBox,Rect.Makexy(100,150,400,190))\n\n'--------------------------------------------------------- ------------------------\n\n LegendFieldTextLine = TextLine.Make\n LegendFieldTextLine.SetName (\"LegendFieldTextLine\")\n LegendFieldTextLine.SetChanged (\"AGI/TMT (MassGIS) ThemeID.UpdateApplyButton\")\n LegendFieldTextLine.SetLabel (\"Legend Field\") \n LegendControlPanel.Add(LegendFieldTextLine,Rect.Makexy(30,50,250,80))\n \n'---------------------------------------------------------------------------------\n \n LegendFileTextLine = TextLine.Make\n LegendFileTextLine.Set Name (\"LegendFileTextLine\")\n LegendFileTextLine.SetChanged (\"AGI/TMT (MassGIS) ThemeID.UpdateApplyButton\")\n LegendFileTextLine.SetLabel (\"Legend File\") \n LegendControlPanel.Add(LegendFileTextLine,Rect.Makexy(30,100,400,120))\n \n'---------------------------------------------------------------------------------\n\n LegendFileTextLabel = TextLabel.Make\n LegendFileTextLabel.SetName (\"LegendFileTextLabel\")\n LegendFileTextLabel.SetUpdate (\"AG I/TMT (MassGIS) ThemeID.FileStatus.Update\")\n LegendControlPanel.Add(LegendFileTextLabel,Rect.Makexy(10,200,500,240))\n LegendFileTextLine.SetListeners({LegendFileTextLabel})\n\n'---------------------------------------------------------------------------------\n\n LegendFileLabelButton = LabelButton.Make\n LegendFileLabelButton.SetName (\"LegendFileLabelButton\")\n LegendFileLabelButton.SetClick (\"AGI/TMT (MassGIS) ThemeID.LabelButton.Click\")\n LegendFileLabelButton.SetLabel (\"B rowse...\") \n LegendControlPanel.Add(LegendFileLabelButton,Rect.Makexy(410,100,470,120))\n \n'--------------------------------------------------------------------------------\n \n LegendFileTextLine.SetNextControl (LegendFieldTextLine)\n LegendFieldTextLine.SetNextControl (GeneralPropertiesRadioButton)\n \n'---------------------------------------------------------------------------------\n\n LegendFieldLabelButton = LabelButton.Make\n LegendFieldLabelButton.setName (\"LegendFi eldLabelButton\")\n LegendFieldLabelButton.SetClick (\"AGI/TMT (MassGIS) ThemeID.LabelButton.Click\")\n LegendFieldLabelButton.SetLabel (\"Set Field...\") \n LegendControlPanel.Add(LegendFieldLabelButton,Rect.Makexy(260,50,350,70))\n \n'--------------------------------------------------------------------------------\n\n SourceTextLine = TextLine.Make\n SourceTextLine.SetName (\"SourceTextLine\")\n SourceTextLine.SetChanged (\"AGI/TMT (MassGIS) ThemeID.UpdateApplyButton\" )\n SourceTextLine.SetLabel (\"Data Source\") \n SourceControlPanel.add(SourceTextLine,Rect.Makexy(10,70,400,100))\n SourceTextLine.SetNextControl(GeneralPropertiesRadioButton)\n\n'--------------------------------------------------------------------------------\n\n SourceLabelButton = LabelButton.Make\n SourceLabelButton.SetName (\"SourceLabelButton\")\n SourceLabelButton.SetClick (\"AGI/TMT (MassGIS) ThemeID.LabelButton.Click\")\n SourceLabelButton.SetLabel (\"Browse...\") \n SourceContr olPanel.add(SourceLabelButton,Rect.Makexy(410,70,470,90))\n SourceTextLine.SetListeners({SourceLabelButton})\n \n'---------------------------------------------------------------------------------\n \n SourceTextLabel = TextLabel.Make\n SourceTextLabel.SetName (\"SourceTextLabel\")\n SourceTextLabel.SetUpdate (\"AGI/TMT (MassGIS) ThemeID.FileStatus.Update\")\n SourceControlPanel.Add(SourceTextLabel,Rect.Makexy(10,200,500,240))\n \n'--------------------------------------------------------- -----------------------\n\n CommentsTextBox = TextBox.Make\n CommentsTextBox.SetName (\"CommentsTextBox\")\n CommentsTextBox.SetChanged (\"AGI/TMT (MassGIS) ThemeID.UpdateApplyButton\")\n CommentsTextBox.SetLabel (\"Comments\") \n CommentsControlPanel.add(CommentsTextBox,Rect.Makexy(30,30,440,150))\n \n'---------------------------------------------------------------------------------\n\n ScaleMinTextLine = TextLine.Make\n ScaleMinTextLine.SetName (\"ScaleMinTextLine\")\n ScaleMinTextLine.SetLabel (\"Min Scale\") \n ScaleMinTextLine.SetTextType (#TEXTLINE_TYPE_REAL) \n ScaleMinTextLine.SetChanged (\"AGI/TMT (MassGIS) ThemeID.UpdateApplyButton\") \n CommentsControlPanel.add(ScaleMinTextLine,Rect.Makexy(50,165,200,185))\n\n'---------------------------------------------------------------------------------\n\n ScaleMaxTextLine = TextLine.Make\n ScaleMaxTextLine.SetName (\"ScaleMaxTextLine\")\n ScaleMaxTextLine.SetLabel (\"Max Scale\") \n ScaleMaxTextLine.SetTextType (#TEXTLINE_TYPE_REAL) \n ScaleMaxTextLine.SetChanged (\"AGI/TMT (MassGIS) ThemeID.UpdateApplyButton\") \n CommentsControlPanel.add(ScaleMaxTextLine,Rect.Makexy(250,165,400,185))\n \n'---------------------------------------------------------------------------------\n\n GeneralControlPanel = ControlPanel.Make\n GeneralControlPanel.SetName (\"GeneralControlPanel\")\n GeneralControlPanel.SetLabel (\"General Properties\")\n GeneralControlPanel.SetVis ibleBorder (true)\n TheDialog.getcontrolpanel.add(GeneralControlPanel,Rect.Makexy(10,60,520,300))\n\n'---------------------------------------------------------------------------------\n \n ActiveThemeCheckBox = CheckBox.Make\n ActiveThemeCheckBox.SetName (\"ActiveThemeCheckBox\")\n ActiveThemeCheckBox.SetLabel (\"ID is active in database.\")\n ActiveThemeCheckBox.SetClick (\"AGI/TMT (MassGIS) ThemeID.UpdateApplyButton\")\n GeneralControlPanel.Add(ActiveThemeCheckBox,Rect.Makexy(270,140,500,160 ))\n\n'---------------------------------------------------------------------------------\n\n FeatureComboBox = LabelButton.Make\n FeatureComboBox.SetName (\"FeatureComboBox\")\n FeatureComboBox.SetLabel (\">>\")\n FeatureComboBox.SetClick (\"AGI/TMT (MassGIS) ThemeID.FeatureLabelButton.Click\")\n GeneralControlPanel.Add(FeatureComboBox,Rect.Makexy(225,140,250,160))\n \n'---------------------------------------------------------------------------------\n\n ThemeQueryTextBox = TextB ox.Make\n ThemeQueryTextBox.SetName (\"ThemeQueryTextBox\")\n ThemeQueryTextBox.SetLabel (\"Query\") \n ThemeQueryTextBox.SetChanged (\"AGI/TMT (MassGIS) ThemeID.UpdateApplyButton\") \n GeneralControlPanel.add(ThemeQueryTextBox,Rect.Makexy(50,160,420,220))\n\n'---------------------------------------------------------------------------------\n \n FeatureTextLine = TextLine.Make\n FeatureTextLine.SetName (\"FeatureTextLine\")\n FeatureTextLine.SetLabel (\"Feature\") \n FeatureTextLine.SetChanged (\"AGI/TMT (MassGIS) ThemeID.UpdateApplyButton\")\n FeatureTextLine.SetNextControl (ThemeQueryTextBox)\n GeneralControlPanel.Add(FeatureTextLine,Rect.Makexy(50,140,220,160))\n \n'---------------------------------------------------------------------------------\n\n ThemeTitleTextLine = TextLine.Make\n ThemeTitleTextLine.SetName (\"ThemeTitleTextLine\")\n ThemeTitleTextLine.SetLabel (\"Theme Title\") \n ThemeTitleTextLine.SetChanged (\"AGI/TMT (Mas sGIS) ThemeID.UpdateApplyButton\")\n ThemeTitleTextLine.SetNextControl (FeatureTextLine)\n GeneralControlPanel.Add(ThemeTitleTextLine,Rect.Makexy(50,110,420,130))\n\n'---------------------------------------------------------------------------------\n\n Men3TextLine = TextLine.Make\n Men3TextLine.SetName (\"Men3TextLine\")\n Men3TextLine.SetLabel (\"Menu 3 Title\")\n Men3TextLine.SetApply (\"AGI/TMT (MassGIS) ThemeID.ChangeMenuValues.CheckKeys\")\n Men3TextLine.SetFocusLost (\"AGI/TMT (MassGIS) ThemeID.ChangeMenuValues.CheckKeys\")\n Men3TextLine.SetChanged (\"AGI/TMT (MassGIS) ThemeID.UpdateApplyButton\") \n Men3TextLine.SetNextControl (ThemeTitleTextLine) \n GeneralControlPanel.add(Men3TextLine,Rect.Makexy(50,80,420,100))\n\n'---------------------------------------------------------------------------------\n\n Men2TextLine = TextLine.Make\n Men2TextLine.SetName (\"Men2TextLine\")\n Men2TextLine.SetLabel (\"Menu 2 Title\") \n Men2 TextLine.SetApply (\"AGI/TMT (MassGIS) ThemeID.ChangeMenuValues.CheckKeys\")\n Men2TextLine.SetFocusLost (\"AGI/TMT (MassGIS) ThemeID.ChangeMenuValues.CheckKeys\") \n Men2TextLine.SetChanged (\"AGI/TMT (MassGIS) ThemeID.UpdateApplyButton\")\n Men2TextLine.SetNextControl (Men3TextLine)\n GeneralControlPanel.add(Men2TextLine,Rect.Makexy(50,55,420,75))\n\n'---------------------------------------------------------------------------------\n \n Men1TextLine = TextLine.Make\n Men1TextLine.SetName (\"Men1TextLine\")\n Men1TextLine.SetLabel (\"Menu 1 Title\") \n Men1TextLine.SetApply (\"AGI/TMT (MassGIS) ThemeID.ChangeMenuValues.CheckKeys\")\n Men1TextLine.SetFocusLost (\"AGI/TMT (MassGIS) ThemeID.ChangeMenuValues.CheckKeys\")\n Men1TextLine.SetChanged (\"AGI/TMT (MassGIS) ThemeID.UpdateApplyButton\") \n Men1TextLine.SetNextControl (Men2TextLine) \n GeneralControlPanel.add(Men1TextLine,Rect.Makexy(50,30,420,50))\n\n'------ --------------------------------------------------------------------------\n \n ThemeQueryTextBox.SetNextControl (GeneralPropertiesRadioButton)\n CommentsTextBox.SetNextControl (ScaleMinTextLine)\n ScaleMinTextLine.SetNextControl (ScaleMaxTextLine)\n ScaleMaxTextLine.SetNextControl (GeneralPropertiesRadioButton)\n \n'---------------------------------------------------------------------------------\n\n DBFTextLabel = TextLabel.Make\n DBFTextLabel.SetName (\"DBFTextLabel\")\n DBFTextLabel.SetL abel (\"3D Properties\")\n Thedialog.GetControlPanel.add(DBFTextLabel,Rect.Makexy(10,310,330,330))\n\n'---------------------------------------------------------------------------------\n \n TheDialog.SetDefaultButton (TheDialog.FindbyName(\"OKLabelButton\"))\n \nReturn (theDialog)" ) (Script.137 Name: "AGI/TMT (MassGIS) ThemeID.EditID" SourceCode: "' Name:AGI/TMT (MassGIS) ThemeID.EditID\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Jul 28 11:30:27 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Jul 28 11:30:27 1999\n'------------------------------------------------------------------------\n\n OffSetBuffer = \"\"\n InitIDString = \"\"\n \n if (Self.Is(List)) then\n InitIDString = Self.Get(0).AsString\n \n if (Self.Count = 4) then\n OffSetBufferDistance = Self.Get(3)\n \n if (OffSetBufferDistance.is(Number).Not) then\n OffSetBufferDistance = 0\n end\n \n if (OffSetBufferDistance > 0) then\n OffSetBuffer = String.MakeBuffer(OffSetBufferDistance)\n else\n OffSetBuffer = \"\"\n end\n else\n OffSetBuffer = \"\"\n end\n end\n \n if (Self.is(List).not) then\n Str1 = \"This script is a component of the AGI Code Library \"+\n \" and is designed to Edit a theme ID within the \"+\n \"Inventory DBF database files using \"+\"\"+nl+\"\"+nl+\n \"This scripts expects to receive a List containing; \"+nl+\n \" ThemeIDList = Self\"+\"\"+nl+\"\"+nl+\n \"Output:\"+\" true or false, or nil.\"\n \n Str2 = \"Help for \"+Script.The.GetName.AsString\n Msgbox.Report(Str1,Str2)\n \n Return nil\n end\n\n if (System.GetOS.AsString.Contains(\"UNIX\")) then\n isUNIX = true\n else\n isUNIX = fa lse\n end\n\n'--------------------------------------------------------------------------------------\n\n ThemeID = Self.Get(0)\n Thmiddct = Self.Get(1)\n theEvent = Nil\n \n if (Self.Count > 2) then\n theEvent = Self.Get(2)\n end\n \n if (thmiddct.is(Dictionary).Not) then\n Msgbox.info(\"thmiddct = nil\",\"advancedlabelbutton.click\") \n Return nil\n end\n \n'-------------------------------------------------------------- \n\n TheThemeList = Thmiddct.Get(ThemeID)\n\n TheThemeDBF = TheThemeList.Get(20).AsString\n\n if (theThemeList.is(List).not) then\n Return nil\n end\n \n'----------------------------------------------------------------------------\n\n isEditable = true\n \n if (File.Exists(TheThemeDBF.AsFileName)) then\n \n else\n Msgbox.info(\"Unable to find the DBF File\",\"\")\n Return nil\n end\n \n'-------------------------------------------------------------------------------------------\n' The following code calls a script to create a Dialog Object\n' This scripts builds the dialog, adds it to the project and\n' configures all the controls with the theme values sent as\n' an arguement. The Dialog Objecttag is always set to false.\n' if the User wants to make a change, then the OKbutton will\n' alter the Dialogs objecttag to be equal to true. \n'\n' The Dialog is designed to run in Modal mode. So that this script\n' is halted until the User closes the dialog and Arcview Returns \n' control.\n\n theLis tThemeID = TheThemeList.Get(0)\n \n if (theListThemeID.is(List)) then\n theListThemeID = theListThemeID.Get(1)\n end\n \n theRecNumber = TheThemeList.Get(22)\n \n TheDialog = Av.Run(\"AGI/TMT (MassGIS) ThemeID.CreateDialog\",{TheThemeList.Clone,theEvent})\n \n if (theDialog = nil) then \n Msgbox.info(\"Unable to open the Edit Menu.\",\"\")\n Return nil \n end\n\n'-------------------------------------------------------------------------------------------\n\n TheDialog.GetControlPanel.SetObject tag(true)\n \n if (theEvent = nil) then\n if (Av.GetProject.GetObjecttag.Get(\"Edit ThemeID Default Event\").is(Number)) then\n theEvent = Av.GetProject.GetObjecttag.Get(\"Edit ThemeID Default Event\")\n end\n end\n \n Enable3DOptions = false\n \n if (theEvent = 6 and Enable3DOptions.Not) then\n theEvent = 5\n end\n \n TheDialog.GetControlPanel.SetTag(theEvent.AsString)\n \n TheDialog.Open \n\n'------------------------------------------------------------------------------ -------------\n\n ' Now the Dialog is close, get the Dialogs Objecttag\n TheDialogOpenTag = TheDialog.GetControlPanel.GetObjecttag\n \n ' Check to see what the object tag of the EditDialog. If it is false\n ' then the User did not want to make changes to the ThemeID Value. so \n ' return a list of values, the first value is men1, the second value is\n ' men2, and the third value is boolean that tells the calling program\n ' that the thmiddct either or not it needs to reset itself.\n \n if (theDialogOpenTag .not) then\n\n Av.GetProject.RemoveDialog(theDialog.AsString)\n\n if (isUNIX) then\n Msgbox.Info(\"No Changes made to this Theme ID.\",\"Canceled...\")\n end\n \n Men1 = TheDialog.FindbyName (\"Men1TextLine\").GetText\n Men2 = TheDialog.FindbyName (\"Men2TextLine\").GetText\n Men3 = TheDialog.FindbyName (\"Men3TextLine\").GetText\n \n Av.ShowMsg(\"No Changes made the Theme ID parameters...\")\n\n System.RefreshWindows\n Return ({Men1,Men2,Men3,fals e})\n end\n \n if (isUNIX) then\n Msgbox.Info(\"Saving now...\",\"Saving Changes...\")\n end\n \n if (File.CanDelete(theThemeDBF.AsFileName).not) then\n \n Msgbox.Warning(\"This file is Read-Only. So you changes will not be saved.\",\"\")\n \n Av.GetProject.RemoveDialog(theDialog.AsString)\n \n Men1 = TheDialog.FindbyName (\"Men1TextLine\").GetText\n Men2 = TheDialog.FindbyName (\"Men2TextLine\").GetText\n Men3 = TheDialog.FindbyName (\"Men3TextLine\").GetText\n \n Av.ShowMsg(\"Inventory is Write Protected, No Changes saved...\")\n \n System.RefreshWindows\n \n Return ({Men1,Men2,Men3,false})\n end\n \n'---------------------------------------------------------------------------------\n' Backup the Current DBF file before it is edited. This segment of code\n' makes a copy ofthe current DbF file with the suffix of .bck. This is not\n' a great solution to the problem but can help to undo an unwanted edit to\n' the DBase file.\n\n ' Create the Backup Fil es name by changing the file type\n ' using the substitute command.\n \n Av.Run(\"AGI/TMT (MassGIS) ThemeID.BackupFile\",theThemeDBF.AsString)\n Av.ShowMsg(\"Backing Up Inventory DataBase...\")\n \n'----------------------------------------------------------------------------------------\n\n theMen1 = TheDialog.FindbyName (\"Men1TextLine\").GetText\n theMen2 = TheDialog.FindbyName (\"Men2TextLine\").GetText\n theMen3 = TheDialog.FindbyName (\"Men3TextLine\").GetText\n theTitle = TheDialog.FindbyName ( \"ThemeTitleTextLine\").GetText\n LegendFile = TheDialog.FindbyName (\"LegendFileTextLine\").GetText\n LegendField = TheDialog.FindbyName (\"LegendFieldTextLine\").GetText\n SrcFile = TheDialog.FindbyName (\"SourceTextLine\").GetText\n Feature = TheDialog.FindbyName (\"FeatureTextLine\").GetText\n LuFields = TheDialog.FindbyName (\"LUFieldsTextLine\").GetText\n LUFile = TheDialog.FindbyName (\"LuFileTextLine\").GetText\n Comments = TheDialog.FindbyName (\"CommentsTextBox\").GetText\n MinScale = TheDialog.FindbyName (\"ScaleMinTextLine\").GetText\n MaxScale = TheDialog.FindbyName (\"ScaleMaxTextLine\").GetText\n ThemeQuery = TheDialog.FindbyName (\"ThemeQueryTextBox\").GetText\n SysMOP = TheDialog.FindbyName (\"SYSMOPTextLine\").GetText\n ThemeActive = TheDialog.FindbyName (\"ActiveThemeCheckBox\").IsSelected\n DefLegend = TheDialog.FindbyName (\"DefaultLegendCheckBox\").isSelected\n \n if (MinScale.isNull) then\n MinScale = \"0\"\n end\n\n if (MaxScale.isNull) then\n MaxScale = \"0\" \n end\n \n SourceList = SrcFile \n System.RefreshWindows\n \n if (ThemeActive) then\n ThemeActive = \"Y\"\n else\n ThemeActive = \"N\"\n end\n \n if (DefLegend) then\n DefLegend = \"Y\"\n else\n DefLegend = \"N\"\n end\n \n Av.ShowMsg(\"Processing Parameters...\")\n \n Myvtab = VTab.Make(theThemeDBF.AsString.AsFileName,true,false)\n FindThemeID = myvtab.FindField(\"themeid\")\n \n NeedstoReBuildDictionary = false\n \n if (TheThemeList.Get(1).AsString <> theMen1) then\n Needs toRebuildDictionary = true\n end\n \n if (TheThemeList.Get(2).AsString <> theMen2) then\n NeedstoRebuildDictionary = true\n end\n\n TheThemeList.Set(1,theMen1)\n TheThemeList.Set(2,{theMen2,theMen3})\n TheThemeList.Set(4,theTitle)\n TheThemeList.Set(5,Feature)\n TheThemeList.Set(6,DefLegend)\n TheThemeList.Set(7,ThemeActive)\n TheThemeList.Set(8,SourceList)\n TheThemeList.Set(9,ThemeQuery)\n TheThemeList.Set(10,LuFields)\n TheThemeList.Set(11,LuFile.AsString.Trim)\n TheThemeList.Set(12,SysMOP )\n TheThemeList.Set(13,LegendField)\n TheThemeList.Set(14,LegendFile)\n TheThemeList.Set(15,MinScale.AsString.AsNumber)\n TheThemeList.Set(16,MaxScale.AsString.AsNumber)\n TheThemeList.Set(17,Comments.AsString.Trim)\n \n'---------------------------------------------------------------------------------------------------\n\n Fthem = Myvtab.ReturnValue(FindThemeID,theRecNumber.AsString.AsNumber).AsString.Lcase\n \n if (Fthem = theListThemeID.AsString) then\n \n EditRecordNumber = theRecNumb er.AsString.AsNumber\n Av.ShowMsg(\"Fast Searching for ThemeID...\")\n \n else\n ' The edit theme ID value is not equal to the records theme ID \n ' Value. Now search for the needed Record for editting\n \n found = false\n EditRecordNumber = nil\n \n For each Rec in Myvtab\n Fthem = Myvtab.ReturnValue(FindThemeID,Rec).asstring.lcase\n \n if (Fthem.asString = theListThemeID.asSTring) then\n EditRecordNumber = Rec\n break\n end\n end\n Av.ShowMsg(\"Slow Searching for ThemeID...\")\n end\n \n'----------------------------------------------------------------------------------------------------\n' \n if (EditRecordNumber = nil) then\n Msgbox.Warning(\"Unable to find the ThemeID number for this value.\",\"Changes could not be saved...\")\n Return nil\n end\n \n if (myvtab.iseditable) then\n myvtab.Seteditable(true) \n myvtab.SetValue (myvtab.FindField(\"men1\") ,EditR ecordNumber, theMen1.Trim)\n myvtab.SetValue (myvtab.FindField(\"men2\") ,EditRecordNumber, theMen2.Trim)\n myvtab.SetValue (myvtab.FindField(\"men3\") ,EditRecordNumber, theMen3.Trim) \n myvtab.SetValue (myvtab.FindField(\"thmlbl\") ,EditRecordNumber, theTitle.Trim)\n myvtab.SetValue (myvtab.FindField(\"ftrtyp\") ,EditRecordNumber, Feature.Trim)\n myvtab.SetValue (myvtab.FindField(\"defleg\") ,EditRecordNumber, DefLegend.Trim)\n myvtab.SetValue (myvtab.FindField (\"active\") ,EditRecordNumber, ThemeActive.Trim)\n myvtab.SetValue (myvtab.FindField(\"srcfile\") ,EditRecordNumber, Srcfile.Trim)\n myvtab.SetValue (myvtab.FindField(\"qry\") ,EditRecordNumber, ThemeQuery.Trim)\n myvtab.SetValue (myvtab.FindField(\"lufld\") ,EditRecordNumber, LuFields.Trim)\n myvtab.SetValue (myvtab.FindField(\"lufile\") ,EditRecordNumber, LuFile.Trim)\n myvtab.SetValue (myvtab.FindField(\"symop\") ,EditRecordNumber, SysMOP.Trim)\n myvtab.SetValue ( myvtab.FindField(\"legfld\") ,EditRecordNumber, Legendfield.Trim)\n myvtab.SetValue (myvtab.FindField(\"legfile\") ,EditRecordNumber, LegendFile.Trim)\n myvtab.SetValue (myvtab.FindField(\"scalemin\"),EditRecordNumber, Minscale.Asstring.AsNumber)\n myvtab.SetValue (myvtab.FindField(\"scalemax\"),EditRecordNumber, Maxscale.Asstring.AsNumber)\n myvtab.SetValue (myvtab.FindField(\"comments\"),EditRecordNumber, Comments.Trim) \n MyVtab.SetEditable(false)\n end \n \n if (NeedstoRebuildDictionary) then\n Av.Run(\"AGI/LIB (MassGIS) MG.UpdateDictionary\",Thmiddct)\n end\n \nAv.PurgeObjects\nReturn ({theMen1,theMen2,theMen3,NeedstoRebuildDictionary})\n" ) (Script.138 Name: "AGI/TMT (MassGIS) ThemeID.FeatureLabelButton.Click" SourceCode: "' Name:AGI/TMT (MassGIS) ThemeID.FeatureLabelButton.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Jul 28 11:26:44 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Jul 28 11:26:44 1999\n'------------------------------------------------------------------------\n\n theList = {\"CAD\",\"Grid\",\"GraphicsODB\",\"Polygon\",\"Arcs\",\n \"Points\",\"ImageCat\",\"Image\",\"MrSID\",\"Indiv. Image Mr SID\",\n \"Point Event\",\"Linear Event\",\"STheme\",\"GTheme\",\"PolygonZ\",\n \"LineZ\",\"PointZ\",\"PolyLineZ\"}\n \n Str1 = \"This is a list of supported feature type. If you want to \"+\n \" change the feature type of this theme, choose...\"\n Str2 = \"Supported Feature Types...\"\n theFeatureType = Msgbox.ListAsString(theList,Str1,Str2)\n \n if (theFeatureType = nil) then\n Return nil\n end\n \n Self.GetDialog.FindbyName(\"FeatureTextLine\").SetText(theFeatureType)\n Av.Run(\"AGI/TMT (MassGIS) ThemeID.UpdateApplyB utton\",Self)\n\n" ) (Script.139 Name: "AGI/TMT (MassGIS) ThemeID.FileStatus.Update" SourceCode: "' Name:AGI/TMT (MassGIS) ThemeID.FileStatus.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Jul 28 11:30:36 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Jul 28 11:30:36 1999\n'------------------------------------------------------------------------\n \n if (Self.GetName = \"LegendFileTextLabel\") then\n \n theFile = Self.GetDialog.FindbyName(\"LegendFileTextLine\").GetText\n \n Self.SetLabel(\"\")\n theSt ring = \"\"\n if (File.Exists(theFile.AsString.Trim.AsFileName)) then\n theString = \"This is a valid ArcView legend file.\"\n Self.SetVisible(true)\n else\n theString = \"This ArcView AVL Legend file does not exist.\"\n Self.SetVisible(true)\n end\n \n if (theFile.AsString.Trim.IsNull) then\n theString = \"\"\n end\n \n if (theFile.AsString.Contains(\"$\")) then\n \n CurrentVarName = nil\n\n For each dog in 0..(theFile.AsString.Trim.Count-1)\n st = theFile.AsString.Trim.left(dog)\n \n if (st.contains(\"/\")) then \n st = St.Substitute(\"$\",\"\")\n CurrentVarName = st.substitute(\"/\",\"\")\n break\n end\n \n if (st.contains(\"\\\")) then \n st = St.Substitute(\"$\",\"\")\n CurrentVarName = st.substitute(\"\\\",\"\")\n break\n end\n end\n \n thePath = System.GetEnvVar(CurrentVarName.AsString)\n\n if (thePath = nil) then\n theString = theString+nl+\"Please note that $\"+CurrentVarName.AsString.UCase.Trim+\" has not been defined.\"\n else\n if (File.Exists(thePath.AsString.AsFileName).not) then\n theString = theString+nl+\"Please note that $\"+CurrentVarName.AsString.UCase.Trim+\" is not mapped to a valid drive directory.\"\n else\n theString = theString+nl+\"Please note that $\"+CurrentVarName.AsString.UCase.Trim+\" is mapped to \"+thePath.AsString.Trim+\".\"\n end\n end\n end \n \n if (theString.Contains(\"$\").not) then\n theString = \" \"+nl+theString\n end\n \n Self.SetLabel(theString)\n end\n \n'--------------------------------------------------------------------------------------------------\n\n if (Self.GetName = \"SourceTextLabel\") then\n \n SDE Flag = false\n \n if (SDEFlag) then\n \n if (Extension.GetScripts.Get(\"AGI/SDE SDE.CheckSDEParameters\") <> nil) then\n Av.Run(\"AGI/SDE SDE.CheckSDEParameters\",Self)\n else\n Self.SetLabel(\"This is a potential SDE Source. But the required SDE Extensions\"+nl+\n \"are not loaded, so the connection and database was not tested.\")\n end\n else \n theFile = Self.GetDialog.FindbyName(\"SourceTextLine\").GetTe xt\n \n if (theFile.AsString.Trim.isNull) then\n Self.SetLabel(\"No Source File set. This ThemeID will not generate a theme...\")\n Self.SetVisible(true)\n Return nil\n end\n \n theString = \"Unable to find this Source File.\"\n if (theFile.AsString.Trim.Contains(\".shp\")) then\n \n if (File.Exists(theFile.AsString.Trim.AsFileName)) then\n theString = \"This is a valid ArcView Shape fil e...\"\n Self.SetVisible(true)\n end\n \n else\n if (INFODir.FileExists(theFile.AsString.AsFilename)) then\n theString = \"This is a valid Arc/Info Info file...\"\n end\n \n if (Coverage.Exists(theFile.AsString)) then\n theString = \"This is a valid Arc/Info Coverage...\"\n end\n \n if (File.Exists(theFile.AsString.AsFileName)) then\n theString = \"Valid Source File...\"\n end \n end \n \n if (theString.Contains(\"Unable to find this Source File.\")) then\n \n if (theFile.Right(4).Contains(\".\")) then\n theString = \"Unable to find this Source file.\"\n else\n theString = \"This appears to be a library layer. (Advanced Library verification has not be implemented)\"\n end\n end\n \n if (theFile.AsString.Contains(\"$\")) then\n \n CurrentVarName = nil\n \n For each dog in 0..(theFile.AsString.Trim.Count-1)\n st = theFile.AsString.Trim.left(dog)\n \n if (st.contains(\"/\")) then \n st = St.Substitute(\"$\",\"\")\n CurrentVarName = st.substitute(\"/\",\"\")\n break\n end\n \n if (st.contains(\"\\\")) then \n st = St.Substitute(\"$\",\"\")\n CurrentVarName = st.substitute(\"\\\",\"\")\n break\n end\n end\n \n thePath = System.GetEnvVar(CurrentVarName.AsString)\n \n if (thePath = nil) then\n theString = TheString+nl+\"Please note that $\"+CurrentVarName.AsString.UCase.Trim+\" has not been defined.\"\n else\n if (File. Exists(thePath.AsString.AsFileName).not) then\n theString = theString+nl+\"Please note that $\"+CurrentVarName.AsString.UCase.Trim+\" is not mapped to a valid drive directory.\"\n else\n theString = theString+nl+\"Please note that $\"+CurrentVarName.AsString.UCase.Trim+\" is mapped to \"+thePath.AsString.Trim+\".\"\n end\n end\n end\n \n if (theString.Contains(\"$\").not) then\n theString = \" \"+nl+theString\n end\n \n Self.SetLabel(theString)\n end \n end\n \n'--------------------------------------------------------------------------------------------------\n\n if (Self.GetName = \"LuFileTextLabel\") then\n \n theFile = Self.GetDialog.FindbyName(\"LuFileTextLine\").GetText\n \n if (theFile.AsString.Trim.isNull) then\n Self.SetLabel(\" \"+nl+\"No External Database file set. This ThemeID will not attempt a table join...\")\n Self.SetVisible(true)\n Return nil\n end\n \n theString = \"Unable to find this external Database File...\"\n if (theFile.AsString.Trim.Contains(\".dbf\")) then\n \n if (File.Exists(theFile.AsString.Trim.AsFileName)) then\n theString = \"This is a valid external DBase file...\"\n Self.SetVisible(true)\n end\n \n else\n if (INFODir.FileExists(theFile.AsString.AsFilename)) then\n theString = \"This is a valid Arc/Info Info file...\"\n end\n end \n \n if (theFile.AsString.Contains(\"$\")) then\n \n CurrentVarName = nil\n\n For each dog in 0..(theFile.AsString.Trim.Count-1)\n st = theFile.AsString.Trim.left(dog)\n \n if (st.contains(\"/\")) then \n st = St.Substitute(\"$\",\"\")\n CurrentVarName = st.substitute(\"/\",\"\")\n break\n end\n \n if (st.contains(\"\\\")) then \n st = St.Substitute(\"$\",\"\")\n CurrentVarName = st.substitute(\"\\\",\"\")\n break\n end\n end\n \n thePath = System.GetEnvVar(CurrentVarName.AsString)\n\n if (thePath = nil) then\n theString = TheString+nl+\"Please note that $\"+CurrentVarName.AsString.UCase.Trim+\" has not been defined.\"\n else\n if (File.Exis ts(thePath.AsString.AsFileName).not) then\n theString = theString+nl+\"Please note that $\"+CurrentVarName.AsString.UCase.Trim+\" is not mapped to a valid drive directory.\"\n else\n theString = theString+nl+\"Please note that $\"+CurrentVarName.AsString.UCase.Trim+\" is mapped to \"+thePath.AsString.Trim+\".\"\n end\n end\n end\n \n if (theString.Contains(\"$\").not) then\n theString = \" \"+nl+theString\n end\n \n Self.SetLabel(theString) \n end" ) (Script.140 Name: "AGI/TMT (MassGIS) ThemeID.FindMaxThemeID" SourceCode: "' Name:AGI/TMT (MassGIS) ThemeID.FindMaxThemeID\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Jul 28 11:30:45 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Jul 28 11:30:45 1999\n'------------------------------------------------------------------------\n\n if (Self.is(List).not) then\n Return nil\n end\n \n if (Self.Count <> 2) then\n Return nil\n end\n \n TheDBFTable = Self.Get(0)\n TheThemeID = Self.Get( 1).AsString\n \n' Get and check the needed Project Dictionary\n\n theThmiddct = Av.Getproject.GetObjecttag.get(\"Thmiddct\")\n \n if (theThmiddct = nil) then \n Return nil\n end\n\n'--------------------------------------------------------------\n' Get the first available id available from the \n' existing ThemeID Dictionary, by getting a list of\n' all themeids, as a list of numbers\n\n TableIDs = {}\n For each ThemeID in theThmiddct.Returnkeys\n \n ThemeData = theThmiddct.Get(ThemeID)\n ThemeDB F = ThemeData.Get(20).AsString.LCase\n \n TheDBFFile = TheDBFTable.GetBaseTableFileName.AsString.Lcase\n \n if (ThemeDBF = TheDBFFile) then\n TableIDs.add(ThemeID.AsString.AsNumber)\n end\n end\n \n' if the TableIDs is greater then 0, sort and get the\n' first value, this should be the highest value, or greatest\n' themeID, then add to it by one to get the next avaialbel\n\n if (TableIDs.Count > 0) then\n TableIDs.Sort(False)\n TheThemeID = TableIDs.get(0) + 1\n end\n \n'--------------------------------------------------------------\n' Now check to make sure that this ID is not already in \n' use, it is is then increment to the next available, and check\n' until the themeid is not already in use.\n\n if (theThmiddct.is(Dictionary)) then\n \n ThemeIDList= theThmiddct.returnKeys\n \n if (ThemeIDList.count > 0) then\n\n ' Finds the index value of an id in the ThemeIDList\n IDExists = ThemeIDList.FindbyValue(TheThemeID)\n \n ' IF the V alue is equal to -1 then start a while loop \n ' to find the next available ID number\n \n While (IDExists <> -1)\n TheThemeID = TheThemeID.AsString.AsNumber + 1\n IDExists = ThemeIDList.FindbyValue(TheThemeID.AsString)\n end\n \n end\n end\n\nReturn(TheThemeID.AsString)\n\n\n \n\n" ) (Script.141 Name: "AGI/TMT (MassGIS) ThemeID.Generate Legend FileName" SourceCode: "' Name:AGI/LIB (MassGIS) MG.GenerateLegendFile\n' Headline:\n' Called By: Multi scripts\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Tue May 04 13:44:14 1999\n'\n' Requires: {Vtab,FileName}\n'\n' Returns: FileName\n'\n' Comments: This script is designed to generate a unique AVL file name\n' using the input parameters. \n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Tue May 04 13:44:14 1999\n'------------------------------------------------------------------------\n\n theVTab = nil\n Previo usFileName = nil\n \n if (Self.Count > 0) then\n theVTab = Self.Get(0)\n end\n \n if (Self.Count > 1) then\n PreviousFileName = Self.Get(1)\n end\n\n LegendDirPath = nil\n \n'------------------------------------------------------------------------\n\n if (PreviousFileName <> nil) then\n \n if (PreviousFileName.AsString.Trim.IsNull.Not) then\n \n PreviousFileName = PreviousFileName.AsfileName\n BaseFileName = PreviousFileName.GetBaseName\n \n if (Base FileName.AsString.Trim.Count < 13) then\n if (File.Exists(PreviousFileName)) then\n if (File.CanDelete(PreviousFileName)) then\n Str1 = \"This Theme ID already has a defined legend file, \"+\n \"do you want to use this legend file again?\"\n Str2 = \"Legend File...\"\n if (Msgbox.YesNo(Str1,Str2,true)) then\n Return (PreviousFileName)\n end\n end\n end\n end\n end\n end\n\n'------------------------------------------------------------------------\n\n if (System.GetEnvVar(\"USERLEGENDS\") <> nil) then\n \n LegendDirPath = System.GetEnvVar(\"USERLEGENDS\")\n \n if (File.Exists(LegendDirPath).Not) then\n LegendDirPath = nil\n end\n \n end\n \n'------------------------------------------------------------------------\n\n if (theVtab.is(Vtab)) then\n \n thePath = theVtab.GetBaseTableFileName.Clone\n thePath.StripFile\n\n LegendDirPath = FileName.Merge (thePath.AsString,\"legends\")\n \n if (File.Exists(LegendDirPath).Not) then\n LegendDirPath = nil\n end\n \n end\n \n'-------------------------------------------------------------------------\n\n if (LegendDirPath = nil) then\n \n PrjFileName = Av.GetProject.GetFileName\n \n if (PrjFileName <> nil) then\n \n PrjDirFileName = PrjFileName.Clone\n PrjDirFileName.StripFile\n \n LegendDirPath = FileName.Merge (PrjDirFileName.AsString,\"legends\")\n \n if (File.Exists(LegendDirPath).Not) then\n LegendDirPath = PrjDirFileName\n end\n \n end\n \n end\n \n'------------------------------------------------------------------------\n\n if (LegendDirPath = nil) then\n if (theVtab.is(Vtab)) then\n \n thePath = theVtab.GetBaseTableFileName.Clone\n thePath.StripFile\n \n LegendDirPath = thePath\n\n if (File.Exists(LegendDirPath).Not) then\n LegendDirPath = nil\n end\n \n end\n end\n\n if (LegendDirPath = nil) then\n LegendDirPath = FileName.GetCWD.Clone\n end\n \n ThemeLegendFile = LegendDirPath.MakeTmp(\"thm\", \"avl\" )\n \nReturn (ThemeLegendFile)\n\n\n \n\n" ) (Script.142 Name: "AGI/TMT (MassGIS) ThemeID.GetUniqueID" SourceCode: "' Name:AGI/TMT (MassGIS) ThemeID.GetUniqueID\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Jul 28 11:30:53 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments: This script finds the next available ThemeID. It checks the\n' the ThemeIDDct Dictionary and returns the first number that\n' does not appear in the dictionary Keys.\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Jul 28 11:30:53 1999\n'------------------------------------------------------------------- -----\n\n if (Self.Is(List).Not) then\n Return (99999)\n end\n \n Thmiddct = Self.Get(0)\n OldID = Self.Get(1)\n \n if (ThmiDDct.Is(Dictionary).Not) then\n Return (99999)\n end\n \n Inc = OldID.AsString.AsNumber\n \n While (Thmiddct.Get(Inc.AsString) <> nil) \n Inc = Inc + 1\n end\n \nReturn (Inc.AsString)" ) (Script.143 Name: "AGI/TMT (MassGIS) ThemeID.GetUniqueName" SourceCode: "' Name:AGI/TMT (MassGIS) ThemeID.GetUniqueName\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Jul 28 11:31:02 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Jul 28 11:31:02 1999\n'------------------------------------------------------------------------\n\n theDictionary = Self.Get(0)\n Men1 = Self.Get(1)\n Men2 = Self.Get(2)\n Men3 = Self.Get(3)\n \n if (theDictionary.Get(Men1+Men2+Men3) <> nil) then\n \n Inc = 1 \n KeyNum = \"\"\n \n For each aNum in 0..(Men3.Count - 1)\n if ((Men3.Middle(anum,1).isNumber) or (Men3.Middle(anum,1) = \".\")) then\n KeyNum = KeyNum + Men3.Middle(anum,1)\n end\n end\n \n if (KeyNum.isNumber) then\n if (KeyNum.AsNumber < 1) then\n Men3 = Men3.Substitute(KeyNum,\"\")\n KeyNum = KeyNum.Substitute(\".\",\"\")\n KeyNum = KeyNum.AsNumber + 1\n \n Men3 = Men3 + \".\"+KeyNum .AsString\n \n if (theDictionary.Get(Men1+Men2+Men3) = nil) then\n Return(Men3)\n end\n else\n Men3 = Men3.Substitute(KeyNum,\"\")\n end\n \n Inc = KeyNum.AsString.AsNumber\n Inc = Inc + 1\n end\n \n InitialMen3 = Men3.Clone\n Men3 = ((Men3.AsString).trim)+\".\"+Inc.SetFormat(\"d\").AsString\n \n While (theDictionary.Get(Men1+Men2+Men3) <> nil)\n Men3 = (InitialMen3.trim)+\".\"+Inc.SetFormat (\"d\").AsString\n Inc = Inc + 1\n end \n \n end\n \n \nReturn (Men3)" ) (Script.144 Name: "AGI/TMT (MassGIS) ThemeID.HelpButton.Click" SourceCode: "' Name:AGI/TMT (MassGIS) ThemeID.HelpButton.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Jul 28 11:31:11 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Jul 28 11:31:11 1999\n'------------------------------------------------------------------------\n\n theCurrentEventNumber = Av.GetProject.GetObjecttag.Get(\"Edit ThemeID Default Event\")\n \n HTMLPage = \"\"\n if (theCurrentEventNumber.is(Number).not) then\n HTMLPage = \"LIB\\ ThemeIDGeneralTab.htm\"\n end\n \n if (theCurrentEventNumber.is(Number)) then\n if (theCurrentEventNumber = 1) then\n if (Self.GetDialog.FindbyName(\"SDEDataCheckBox\").isSelected) then\n HTMLPage = \"LIB\\ThemeIDSDETab.htm\"\n else\n HTMLPage = \"LIB\\ThemeIDSourceTab.htm\"\n end\n end\n \n if (theCurrentEventNumber = 2) then\n HTMLPage = \"LIB\\ThemeIDLegendTab.htm\"\n end\n \n if (theCurrentEventNumber = 3) then\n HTMLPage = \"LIB\\ThemeIDLUTab.htm\"\n end\n \n if (theCurrentEventNumber = 4) then\n HTMLPage = \"LIB\\ThemeIDCommentsTab.htm\"\n end\n \n if (theCurrentEventNumber = 5) then\n HTMLPage = \"LIB\\ThemeIDGeneralTab.htm\"\n end\n\n if (theCurrentEventNumber = 6) then\n HTMLPage = \"LIB\\ThemeID3DTab.htm\"\n end\n end\n \n if (HTMLPage.AsString.Trim.isNull) then\n HTMLPage = \"LIB\\ThemeIDEditMenu.htm\"\n end\n \n Av.Run(\"AGI/LIB (MassGIS) HTMLDocumenta tion.OpenPage\",{HTMLPage,\"\"})" ) (Script.145 Name: "AGI/TMT (MassGIS) ThemeID.HelpLabelButton" SourceCode: "' Name:AGI/TMT (MassGIS) ThemeID.HelpLabelButton\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Jul 28 11:31:23 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Jul 28 11:31:23 1999\n'------------------------------------------------------------------------\n\n theString = \"\"\n theTitle = \"\"\n \n if (Self.GetName = \"LuHelpTextLabel\") then\n theTitle = \"Database Examples and Hints...\"\n theString = \"SQL Example: \"+nl+\n \"SQL; MyData; Smithsy/MyPassWord; TableName; c:\\safety-table.dbf\"+nl+\" \"+nl+\n \" #1 SQL: Flag String \"+nl+\n \" #2 Database Name: Name of the DataBase\"+nl+\n \" #3 Login (username/password)\"+nl+\n \" #4 Table name\"+Nl+\n \" #5 System file (as a backup when the SQL connection fails.)\"\n end\n \n \n if (theString.isNull) then\n Return nil\n end\n \n Msgbox.Report(theString,theTitle)" ) (Script.146 Name: "AGI/TMT (MassGIS) ThemeID.LabelButton.Click" SourceCode: "' Name:AGI/TMT (MassGIS) ThemeID.LabelButton.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Thu Jul 29 15:02:30 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Thu Jul 29 15:02:30 1999\n'------------------------------------------------------------------------\n \n Clist = Self.GetDialog.GetObjecttag\n ThemeID = Clist.Get(0)\n \n if (ThemeID.is(List)) then\n ThemeID = ThemeID.Get(1)\n end\n\n'-------------------------------------- ----------------------------------\n\n if (Self.Getname = \"AliasLabelButton\") then\n \n ResultsList = Av.Run(\"AGI/TMT (MassGIS) AliasEdit.Open\",{ThemeID.AsString,nil})\n \n theVtab = ResultsList.Get(0)\n \n if (theVtab.is(Vtab)) then\n Av.Run(\"AGI/LIB (MassGIS) MG.Inquery Dct\",theVtab)\n end\n\n Return nil\n end\n\n'-----------------------------------------------------------------------\n \n if (Self.Getname = \"JoinLabelButton\") then\n \n theVtab = Av.Run(\"AGI/ TMT (MassGIS) Join/LinkMenu.Open\",{ThemeID,nil})\n \n if (theVtab.is(Vtab)) then\n Av.Run(\"AGI/LIB (MassGIS) MG.Join/Link Dct\",theVtab)\n end\n \n Return nil\n end\n\n'------------------------------------------------------------------------\n \n if (Self.GetName = \"LegendFieldLabelButton\") then\n \n theSourceFile = Self.GetDialog.FindbyName(\"SourceTextLine\").GetText.AsString\n theFeature = Self.GetDialog.FindbyName(\"FeatureTextLine\").GetText\n \n if (theSou rceFile.AsString.Contains(\".shp\")) then\n theSrcName = SrcName.Make(theSourceFile.AsString)\n else\n theSrcName = SrcName.Make(theSourceFile.AsString++theFeature)\n end\n \n if (theSrcName = nil) then\n Msgbox.Warning(\"The Shape file can not be found.\",\"\")\n Return nil\n end\n \n NewFtab = FTab.Make (theSrcName)\n FieldList = NewFtab.GetFields\n \n Str1 = \"Choose the Field you want to use with this legend file.\"\n Str2 = \"Source Fi elds...\"\n theFieldname = Msgbox.ListAsString(FieldList,Str1,Str2)\n \n if (theFieldname = nil) then \n Return nil\n end\n \n Self.GetDialog.FindbyName(\"LegendFieldTextLine\").SetText(theFieldname.AsString)\n Av.Run(\"AGI/TMT (MassGIS) ThemeID.UpdateApplyButton\",Self)\n Return nil\n end \n\n'----------------------------------------------------------------------------------------\n\n if (Self.GetName = \"LegendFileLabelButton\") then\n theFile = FileDialog.Show (\"*.avl\", \"AV Legend file *.avl\",\"Find Legend File...\")\n \n if (theFile = nil) then \n Return nil\n end\n \n Self.GetDialog.FindbyName(\"LegendFileTextLine\").SetText(theFile.AsString)\n Self.GetDialog.FindbyName(\"LegendFileTextLine\").SetObjecttag(theFile.AsString)\n Self.GetDialog.FindbyName(\"LegendFileTextLine\").BroadCastUpdate\n Av.Run(\"AGI/TMT (MassGIS) ThemeID.UpdateApplyButton\",Self)\n Return nil\n end\n\n'-------------------------------------------------------------------- ---------------------\n\n if (Self.GetName = \"LuFileLabelButton\") then\n \n patterns = {\"*.dbf\", \"arcdr9\", \"*.txt\"}\n labels = {\"dBASE (*.dbf)\", \"INFO\", \"Delimited Text (*.txt)\"}\n files = FileDialog.ReturnFiles(patterns, labels, \"Add Table\", 0)\n\n if (files.Count = 0) then\n Return nil\n end\n \n theFile = Files.Get(0)\n \n if (theFile = NIL) then\n return nil\n end\n \n Self.GetDialog.FindbyName(\"LuFileTextLine\").SetText(theFile.AsString)\n Sel f.GetDialog.FindbyName(\"LuFileTextLine\").SetObjecttag(theFile.AsString)\n Self.GetDialog.FindbyName(\"LuFileTextLine\").BroadCastUpdate\n \n Av.Run(\"AGI/TMT (MassGIS) ThemeID.UpdateApplyButton\",Self)\n Return nil\n end\n \n'-----------------------------------------------------------------------------------------\n\n if (Self.GetName = \"OpenLuFileButton\") then\n \n theSourceFile = Self.GetDialog.FindbyName(\"LuFileTextLine\").GetText.AsString.Trim\n theFileName = theSourceFile.AsFileName\n \n if (File.Exists(theFileName)) then\n theVtab = Vtab.Make(theFileName,false,false)\n \n if (theVtab = nil) then\n Msgbox.Warning(\"Unable to import this Database table into an ArcView Table!\",\"\")\n Return nil\n end\n \n aTable = Table.Make(theVtab)\n aTable.SetName(theFileName.AsString)\n \n theShortName = theVtab.GetBaseTableFileName\n Msgbox.Info(\"The \"+theShortName.AsString.Proper+\" has been imported into an ArcView Table.\",\"\")\n else\n Msgbox.Warning(\"Unable to find this file.\",\"\")\n end\n \n Return nil\n end \n\n'--------------------------------------------------------------------------------------------\n\nif (Self.GetName = \"SourceLabelButton\") then\n\n theFileName = Self.GetDialog.FindbyName(\"SourceTextLine\").GetText\n \n if (theFileName.AsString.Count > 0) then\n theFileName = theFileName.AsFileName\n end\n \n theSourceFile = SourceDialog.Show(\"\")\n \n if (theSourceFile = nil) then \n Return nil \n end\n \n if (theSourceFile.Count = 0) then \n Return nil\n end\n \n \n theThemeData = theSourceFile.get(0)\n theFileName = theThemeData.GetFileName\n \n Self.GetDialog.FindbyName(\"SourceTextLine\").SetText(theFileName.AsString)\n Self.GetDialog.FindbyName(\"SourceTextLine\").SetObjecttag(theFileName.AsString)\n \n theFeatureType = Self.GetDialog.FindbyName(\"FeatureTextLine\").GetText\n \n theSubName = theThemeData.GetS ubName\n \n if (theSubName.Contains(theFeatureType).not) then\n Self.GetDialog.FindbyName(\"FeatureTextLine\").SetText(theSubName.AsString)\n end\n \n Self.GetDialog.FindbyName(\"LegendFileTextLine\").SetText(\"\")\n Self.GetDialog.FindbyName(\"LegendFieldTextLine\").SetText(\"\")\n Self.GetDialog.FindbyName(\"SourceTextLine\").BroadCastUpdate\n Av.Run(\"AGI/TMT (MassGIS) ThemeID.UpdateApplyButton\",Self)\n Return nil\n end\n \n \n'------------------------------------------------------- ------------------------\n\n\n if (Self.GetName = \"SetLUFieldsButton\") then\n \n theFile = Self.GetDialog.FindbyName(\"LuFileTextLine\").GetText.AsString.Trim\n \n if (theFile.isNull) then\n Return nil\n end\n \n aTable = Av.GetProject.FindDoc(theFile)\n \n if (aTable.is(Table)) then\n \n theFields = aTable.GetVtab.GetFields\n \n Str1 = \"Choose the field(s) that define the join.\"\n Str2 = \"Join Field(s)...\"\n theNewF ields = Msgbox.MultiListAsString(theFIelds,Str1,Str2)\n \n if (theNewFIelds = nil) then\n Return nil\n end\n \n theString = \"\"\n Inc = 0\n For each aField in theNewFields\n if (theString.isNull) then\n theString = aField.GetName.AsString\n else\n theString = theString+\"; \"+aField.GetName.AsString\n end\n \n Inc = Inc + 1\n if (Inc = 2) then\n if (theNewFields.Count > 2) then\n Msgbox.Warning(\"You can only have a maximum of two join \"+\n \"field. Only the first two field you selected \"+\n \"will be used.\",\"Join Field Limits...\")\n end\n break\n end\n end\n \n Self.GetDialog.FindbyName(\"LUFieldsTextLine\").SetText(theString)\n else\n Msgbox.Info(\"Unable to find this table in the project.\",\"\")\n Return nil\n end\n \n end" ) (Script.147 Name: "AGI/TMT (MassGIS) ThemeID.LUButtons.Update" SourceCode: "' Name:AGI/TMT (MassGIS) ThemeID.LUButtons.Update\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Jul 28 11:28:47 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Jul 28 11:28:47 1999\n'------------------------------------------------------------------------\n\n if (Self.GetName = \"OpenLuFileButton\") then\n Self.SetVisible(Self.GetDialog.FindbyName(\"LuFileTextLine\").GetText.AsString.Trim.isNull.Not)\n end\n \n if (Sel f.GetName = \"SetLUFieldsButton\") then\n \n theFile = Self.GetDialog.FindbyName(\"LuFileTextLine\").GetText.AsString.Trim\n \n if (theFile.isNull) then\n Self.SetEnabled(false)\n Return nil\n end\n \n aTable = Av.GetProject.FindDoc(theFIle.AsString)\n \n Self.SetVisible(aTable.is(Table))\n Self.SetEnabled(aTable.is(Table))\n end" ) (Script.148 Name: "AGI/TMT (MassGIS) ThemeID.OKLabelButton.Click" SourceCode: "' Name:AGI/TMT (MassGIS) ThemeID.OKLabelButton.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Jul 28 11:28:39 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Jul 28 11:28:39 1999\n'------------------------------------------------------------------------\n\n Self.GetDialog.GetControlPanel.SetObjecttag(true)\n Self.GetDialog.Close" ) (Script.149 Name: "AGI/TMT (MassGIS) ThemeID.OpenDialog" SourceCode: "' Name:AGI/TMT (MassGIS) ThemeID.OpenDialog\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Jul 28 11:28:29 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Jul 28 11:28:29 1999\n'------------------------------------------------------------------------\n\n Self.Update\n theThemeList = Self.GetObjecttag\n\n Enabled3DOptions = false\n if (theThemeList.Count > 25) then\n Enabled3DOptions = true\n end\n \n if (theThemeList.is(Lis t).not) then\n Return nil\n end\n \n theSrcFile = theThemeList.Get(8)\n \n'-----------------------------------------------------------------------------------------\n \n Self.FindbyName(\"SourceLabelButton\").SetVisible(true)\n Self.FindbyName(\"SourceTextLine\").SetVisible(true) \n\n Self.FindbyName(\"SourceTextLine\").SetText (theSrcFile.AsString.Trim)\n Self.FindbyName(\"SourceTextLine\").SetObjecttag (theSrcFile.AsString.Trim)\n \n if (theSrcFile.AsString.Trim.IsNull.not) then\n Self.FindbyName(\"SourceTextLine\").SetObjecttag(FileName.Make(theSrcFile.AsString).GetFullName.AsString)\n end\n\n Self.FindbyName(\"Men1TextLine\").SetText (theThemeList.Get(1).AsString.Trim)\n \n if (theThemeList.Get(2).is(List)) then\n Self.FindbyName(\"Men2TextLine\").SetText (theThemeList.Get(2).Get(0).AsString.Trim)\n Self.FindbyName(\"Men3TextLine\").SetText (theThemeList.Get(2).Get(1).AsString.Trim)\n Self.FindbyName(\"Men3TextLine\").SetTag (theThemeList.Get(2).Get(1).AsString.Trim) \n else\n Self.FindbyName(\"Men2TextLine\").SetText (theThemeList.Get(2).AsString.Trim)\n Self.FindbyName(\"Men3TextLine\").SetText (\"\")\n Self.FindbyName(\"Men3TextLine\").SetTag (\"\")\n end\n \n Self.FindbyName(\"ThemeTitleTextLine\").SetText (theThemeList.Get(4).AsString.Trim)\n Self.FindbyName(\"FeatureTextLine\").SetText (theThemeList.Get(5).AsString.Trim)\n Self.FindbyName(\"DefaultLegendCheckBox\") .SetSelected(theThemeLIst.Get(6).AsString.Contains(\"Y\"))\n Self.FindbyName(\"ActiveThemeCheckBox\").SetSelected (theThemeLIst.Get(7).AsString.Contains(\"Y\"))\n Self.FindbyName(\"ThemeQueryTextBox\").SetText (theThemeList.Get(9).AsString.Trim)\n \n Self.FindbyName(\"LUFieldsTextLine\").SetText (theThemeList.Get(10).AsString.Trim)\n Self.FindbyName(\"LuFileTextLine\").SetText (theThemeList.Get(11).AsString.Trim)\n Self.FindbyName(\"LuFileTextLine\").SetObjecttag (theThemeList.Get(11).A sString.Trim)\n \n if (theThemeList.Get(11).AsString.Trim.IsNull.not) then\n Self.FindbyName(\"LuFileTextLine\").SetObjecttag(FileName.Make(theThemeList.Get(11).AsString).GetFullName.AsString)\n end\n\n Self.FindbyName(\"SysmopTextLine\").SetText (theThemeList.Get(12).AsString.Trim)\n \n Self.FindbyName(\"LegendFieldTextLine\").SetText (theThemeList.Get(13).AsString.Trim)\n Self.FindbyName(\"LegendFieldTextLine\").SetObjecttag (theThemeList.Get(13).AsString.Trim)\n Self.FindbyName(\"L egendFieldLabelButton\").SetObjecttag (theThemeList.Get(14).AsString.Trim)\n Self.FindbyName(\"LegendFileLabelButton\").SetObjecttag (theThemeList.Get(14).AsString.Trim)\n Self.FindbyName(\"LegendFileTextLine\").SetText (theThemeList.Get(14).AsString.Trim)\n Self.FindbyName(\"LegendFileTextLine\").SetObjecttag (theThemeList.Get(14).AsString.Trim)\n\n if (theThemeList.Get(14).AsString.Trim.IsNull.not) then\n Self.FindbyName(\"LegendFileTextLine\").SetObjecttag(FileName.Make(theThemeList.Get(14).AsStr ing).GetFullName.AsString)\n end\n \n Self.FindbyName(\"ScaleMinTextLine\").SetText (theThemeList.Get(15).AsString.Trim) \n Self.FindbyName(\"ScaleMaxTextLine\").SetText (theThemeList.Get(16).AsString.Trim)\n Self.FindbyName(\"CommentsTextBox\").SetText (theThemeList.Get(17).AsString.Trim) \n \n'--------------------------------------------------------------------------------------------------- \n\n Self.FindbyName(\"FeatureComboBox\").Update\n \n'----------------------- -----------------------------------------------------------------------------\n\n OKLabelButton = Self.FindbyName(\"OKLabelButton\")\n OKLabelButton.SetEnabled (false)\n OKLabelButton.SetObjecttag (true)\n OKLabelButton.SetLabel (\"OK\") \n OKLabelButton.SetVisible (true)\n \n VtabFileName = theThemeList.Get(20)\n EditableStatus = true\n EditStatusString = \" [Read/Edit Access]\"\n \n if (VtabFileName.Count > 3) then\n if (File.CanDelete(VtabFileName.AsFileName).N ot) then\n OKLabelButton.SetEnabled (false)\n OKLabelButton.SetObjecttag (false)\n OKLabelButton.SetVisible (false)\n System.Beep\n EditableStatus = false\n theEditStatus = \"(Write Protected)\"\n EditStatusString = \" [Read Access Only]\"\n else\n EditableStatus = true\n theEditStatus = \"(Editable)\"\n end\n end\n \n if (VtabFileName.AsString.Contains(\"ThemeInv.dbf\")) then\n \n EditableStatus = Av.Run(\"AGI/TMT ( MassGIS) CheckPassword\",\"\")\n \n if (EditableStatus.Not) then\n OKLabelButton.SetEnabled (false)\n OKLabelButton.SetObjecttag (false)\n OKLabelButton.SetVisible (false)\n System.Beep\n \n if (EditableStatus) then\n theEditStatus = \"(Editable) but No Admin Access.\"\n EditStatusString = \" [Read Access Only]\"\n else\n theEditStatus = \"(Write Protected) No Admin Access.\"\n EditStatusString = \" [Read Access Only]\"\n end\n else\n if (EditableStatus) then\n theEditStatus = \"(Editable) Full Admin Access.\"\n EditStatusString = \" [Read/Edit Access]\"\n else\n theEditStatus = \"(Write Protected) Full Admin Access.\"\n EditStatusString = \" [Reac Access Only]\"\n end\n\n end\n \n end\n\n'----------------------------------------------------------------------------------\n \n CancelLabelButton = Self.Fin dbyName(\"CancelLabelButton\")\n CancelLabelButton.SetLabel (\"Close\") \n CancelLabelButton.SetObjecttag (true) \n\n DBFTextLabel = Self.FindbyName(\"DBFTextLabel\")\n \n theDBFString = theThemeList.Get(20).AsString.Trim\n \n if ((theDBFString+theEditStatus).Count > 40) then\n theTempFileName = theThemeList.Get(20).AsString.AsFileName.GetBaseName\n theLabelString = \"../\"+theTempFileName.Proper+\" \"+theEditStatus\n else\n theLabelString = theDBFString+\" \"+theEditStatus\n e nd\n \n DBFTextLabel.SetLabel (theLabelString)\n DBFTextLabel.SetHelp(\"//\"+theThemeList.Get(20).AsString.Trim+\" \"+TheEditStatus.AsString)\n \n \n'-----------------------------------------------------------------------------------------------\n\n if (theThemeList.Get(0).is(List)) then\n ThemeIDString = \"Psuedo ID: \"+theThemeList.Get(0).Get(0).AsString+\" (Permanent ID: \"+\n theThemeList.Get(0).Get(1).AsString+\")\"\n Self.FindbyName(\"QueryRadioButton\").SetTag(theThemeList.Get(0).Get(1).AsStr ing)\n Self.FindbyName(\"Join/LinkRadioButton\").SetTag(theThemeList.Get(0).Get(1).AsString)\n else\n ThemeIDString = theThemeList.Get(0).AsString\n Self.FindbyName(\"QueryRadioButton\").SetTag(theThemeList.Get(0).AsString)\n Self.FindbyName(\"Join/LinkRadioButton\").SetTag(theThemeList.Get(0).AsString)\n end\n \n Self.SetTitle(\"Editing ThemeID: \"+ThemeIDString.AsString++EditStatusString)\n\n'-----------------------------------------------------------------------------------------------\n\n t heEvent = Self.GetControlPanel.GetTag\n \n if (theEvent.isNumber) then\n theEvent = theEvent.AsString.AsNumber\n else\n theEvent = 1\n end\n \n if (theEvent = 1) then\n Self.FindbyName(\"SourceRadioButton\").Click\n end\n\n if (theEvent = 2) then\n Self.FindbyName(\"LegendRadioButton\").Click\n end\n\n if (theEvent = 3) then\n Self.FindbyName(\"LuRadioButton\").Click\n end\n\n if (theEvent = 4) then\n Self.FindbyName(\"CommentsRadioButton\").Click\n end\n \n if ((the Event = 5) or (theEvent = nil)) then\n Self.FindbyName(\"GeneralPropertiesRadioButton\").Click\n end\n\n if (theEvent = 7) then\n Self.FindbyName(\"QueryRadioButton\").Click\n end\n\n if (theEvent = 8) then\n Self.FindbyName(\"Join/LinkRadioButton\").Click\n end \n \n Self.FindbyName(\"LuFileTextLabel\").Update\n Self.FindbyName(\"SourceTextLabel\").Update\n Self.FindbyName(\"LegendFileTextLabel\").Update\n \n Av.Run(\"AGI/LIB (MassGIS) Dialog.MovetoCenterOfScreen\",Self)\n Self.GetControlPanel .SetObjecttag(false)\n Self.FindbyName(\"HelpButton\").Update\n \n'------------------------------------------------------------------------------\n' The Following code enables or disables the edit tools on the edit menu\n' depending upon weither or not the current User has edit access or the\n' the file is write protected.\n\n Self.FindbyName(\"LUFieldsTextLine\").SetReadOnly (EditableStatus.Not)\n Self.FindbyName(\"SYSMopTextLine\").SetReadOnly (EditableStatus.Not)\n Self.FindbyName(\"LUFIleTextLine\").SetRea dOnly (EditableStatus.Not)\n Self.FindbyName(\"LegendFieldTextLine\").SetReadOnly (EditableStatus.Not)\n Self.FindbyName(\"LegendFileTextLine\").SetReadOnly (EditableStatus.Not)\n Self.FindbyName(\"SourceTextLine\").SetReadOnly (EditableStatus.Not)\n Self.FindbyName(\"ScaleMinTextLine\").SetReadOnly (EditableStatus.Not)\n Self.FindbyName(\"ScaleMaxTextLine\").SetReadOnly (EditableStatus.Not)\n Self.FindbyName(\"FeatureTextLine\").SetReadOnly (EditableStatus.Not)\n Self.FindbyName(\"ThemeTitle TextLine\").SetReadOnly (EditableStatus.Not)\n Self.FindbyName(\"Men1TextLine\").SetReadOnly (EditableStatus.Not)\n Self.FindbyName(\"Men2TextLine\").SetReadOnly (EditableStatus.Not)\n Self.FindbyName(\"Men3TextLine\").SetReadOnly (EditableStatus.Not)\n \n Self.FindbyName(\"LegendFieldLabelButton\").SetVisible (EditableStatus)\n Self.FindbyName(\"LegendFileLabelButton\").SetVisible (EditableStatus)\n Self.FindbyName(\"SourceLabelButton\").SetVisible (EditableStatus)\n Self.FindbyName(\" LuFileLabelButton\").SetVisible (EditableStatus)\n Self.FindbyName(\"FeatureComboBox\").SetVisible (EditableStatus)\n Self.FindbyName(\"SetLUFieldsButton\").SetVisible (EditableStatus)\n Self.FindbyName(\"ActiveThemeCheckBox\").SetVisible (EditableStatus)\n Self.FindbyName(\"DefaultLegendCheckBox\").SetEnabled (EditableStatus)\n \n Self.FindbyName(\"CommentsTextBox\").SetReadOnly (EditableStatus.Not)\n Self.FindbyName(\"ThemeQueryTextBox\").SetReadOnly (EditableStatus.Not)" ) (Script.150 Name: "AGI/TMT (MassGIS) ThemeID.RadioButton.Click" SourceCode: "' Name:AGI/TMT (MassGIS) ThemeID.RadioButton.Click\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Jul 28 11:28:15 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Jul 28 11:28:15 1999\n'------------------------------------------------------------------------\n\n Self.GetDialog.FindbyName(\"LegendControlPanel\").SetVisible(false)\n Self.GetDialog.FindbyName(\"LuControlPanel\").SetVisible(false)\n Self.GetDialog.FindbyName(\"CommentsCo ntrolPanel\").SetVisible(false)\n Self.GetDialog.FindbyName(\"SourceControlPanel\").SetVisible(false)\n Self.GetDialog.FindbyName(\"GeneralControlPanel\").SetVisible(false)\n Self.GetDialog.FindbyName(\"JoinControlPanel\").SetVisible(false)\n Self.GetDialog.FindbyName(\"AliasControlPanel\").SetVisible(false)\n \n MakeVisible = true\n Self.GetDialog.FindbyName(\"LuRadioButton\").Resizeto(70,25)\n Self.GetDialog.FindbyName(\"LegendRadioButton\").Resizeto(70,25)\n Self.GetDialog.FindbyName(\"CommentsRadioButton\").Resizeto(8 0,25)\n Self.GetDialog.FindbyName(\"GeneralPropertiesRadioButton\").Resizeto(70,25)\n Self.GetDialog.FindbyName(\"SourceRadioButton\").Resizeto(70,25)\n Self.GetDialog.FindbyName(\"QueryRadioButton\").Resizeto(70,25)\n Self.GetDialog.FindbyName(\"Join/LinkRadioButton\").Resizeto(80,25)\n\n if (Self.GetName = \"QueryRadioButton\") then\n Self.ResizeTo(70,35)\n Self.GetDialog.FindbyName(\"AliasControlPanel\").SetVisible(true)\n Av.GetProject.GetObjecttag.Set(\"Edit ThemeID Default Event\",7)\n end\n \n if (Se lf.GetName = \"Join/LinkRadioButton\") then\n Self.ResizeTo(80,35)\n Self.GetDialog.FindbyName(\"JoinControlPanel\").SetVisible(true)\n Av.GetProject.GetObjecttag.Set(\"Edit ThemeID Default Event\",8)\n end\n \n if (Self.GetName = \"LuRadioButton\") then\n Self.ResizeTo(70,35)\n Self.GetDialog.FindbyName(\"LuControlPanel\").SetVisible(true)\n Self.GetDialog.FindbyName(\"LuControlPanel\").SetVisibleBorder(MakeVisible)\n Self.GetDialog.FindbyName(\"LuFileTextLabel\").Update\n Self.GetDial og.FindbyName(\"LUFieldsTextLine\").Focus\n Self.GetDialog.FindbyName(\"OpenLuFileButton\").Update\n Av.GetProject.GetObjecttag.Set(\"Edit ThemeID Default Event\",3)\n end\n \n if (Self.GetName = \"LegendRadioButton\") then\n Self.ResizeTo(70,35)\n Self.GetDialog.FindbyName(\"LegendControlPanel\").SetVisible(true)\n Self.GetDialog.FindbyName(\"LegendControlPanel\").SetVisibleBorder(MakeVisible)\n Self.GetDialog.FindbyName(\"LegendFileTextLine\").Focus\n Self.GetDialog.FindbyName(\"LegendFi leTextLine\").SetVisible(true)\n Self.GetDialog.FindbyName(\"LegendFileTextLabel\").Update\n Av.GetProject.GetObjecttag.Set(\"Edit ThemeID Default Event\",2)\n end\n \n if (Self.GetName = \"CommentsRadioButton\") then\n Self.ResizeTo(80,35)\n Self.GetDialog.FindbyName(\"CommentsControlPanel\").SetVisible(true)\n Self.GetDialog.FindbyName(\"CommentsControlPanel\").SetVisibleBorder(MakeVisible)\n Self.GetDialog.FindbyName(\"CommentsTextBox\").Focus\n Av.GetProject.GetObjecttag.Set(\"Edit ThemeID Default Event\",4)\n end\n \n if (Self.GetName = \"GeneralPropertiesRadioButton\") then\n Self.ResizeTo(70,35)\n Self.GetDialog.FindbyName(\"GeneralControlPanel\").SetVisible(true)\n Self.GetDialog.FindbyName(\"GeneralControlPanel\").SetVisibleBorder(MakeVisible)\n Self.GetDialog.FindbyName(\"Men2TextLine\").Focus\n Self.GetDialog.FindbyName(\"Men2TextLine\").SetVisible(true)\n Self.GetDialog.FindbyName(\"Men1TextLine\").Focus\n Self.GetDialog.FindbyName(\"Men1TextLine\").SetVi sible(true)\n Av.GetProject.GetObjecttag.Set(\"Edit ThemeID Default Event\",5)\n end\n \n if (Self.GetName = \"SourceRadioButton\") then\n Self.ResizeTo(70,35)\n Self.GetDialog.FindbyName(\"SourceControlPanel\").SetVisible(true)\n Self.GetDialog.FindbyName(\"SourceControlPanel\").SetVisibleBorder(MakeVisible)\n Self.GetDialog.FindbyName(\"SourceTextLabel\").Update\n Self.GetDialog.FindbyName(\"SourceTextLine\").Focus\n Av.GetProject.GetObjecttag.Set(\"Edit ThemeID Default Event\",1)\n end\n " ) (Script.151 Name: "AGI/TMT (MassGIS) ThemeID.UpdateApplyButton" SourceCode: "' Name:AGI/TMT (MassGIS) ThemeID.UpdateApplyButton\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Jul 28 11:26:21 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Wed Jul 28 11:26:21 1999\n'------------------------------------------------------------------------\n\n Self.BroadCastUpdate\n \n OKLabelButton = Self.GetDialog.FindbyName(\"OKLabelButton\")\n \n if (OKLabelButton.GetObjecttag) then\n Self.GetDialog.FindbyName(\"OKLabelBu tton\").SetVisible(true)\n Self.GetDialog.FindbyName(\"OKLabelButton\").SetEnabled(true)\n Self.GetDialog.FindbyName(\"CancelLabelButton\").SetLabel(\"Cancel\")\n end" ) (Script.152 Name: "AGI/TMT (MassGIS) ThemeID.UpdateDialog" SourceCode: "' Name:AGI/TMT (MassGIS) ThemeID.UpdateDialog\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Mon Aug 02 11:19:18 1999\n'\n' Requires:\n'\n' Returns:\n'\n' Comments:\n'\n'\n' Copyright© Applied Geographics Inc. Boston,MA. Mon Aug 02 11:19:18 1999\n'------------------------------------------------------------------------\n\n' Self.FindbyName(\"SDEDataBaseTypeComboBox\").SetVisible (false)\n' Self.FindbyName(\"SDESColumTextLine\").SetVisible (false)\n' Self.FindbyName(\"SDETableNameComboBox\") .SetVisible (false)\n' Self.FindbyName(\"SDEServerInstanceTextLine\").SetVisible (false)\n' Self.FindbyName(\"SDEDataBaseComboBox\").SetVisible (false)\n' Self.FindbyName(\"SDEUserNameTextLine\").SetVisible (false)\n' Self.FindbyName(\"SDEPasswordTextLine\").SetVisible (false)\n' Self.FindbyName(\"SDEDataCheckBox\").SetSelected (false)\n' Self.FindbyName(\"SDESelectionFieldsTextLine\").SetVisible(false)\n' Self.FindbyName(\"SDEConnectionLabelButton\").SetVisible (false)\n Self.FindbyName( \"SourceLabelButton\").SetVisible (false)\n Self.FindbyName(\"SourceTextLine\").SetVisible (false) \n\n' Self.FindbyName(\"SDEDataCheckBox\").SetSelected (false)\n \n Self.FindbyName(\"GeneralControlPanel\").SetVisible (false)\n Self.FindbyName(\"LUControlPanel\").SetVisible (false)\n Self.FindbyName(\"LegendControlPanel\").SetVisible (false)\n Self.FindbyName(\"SourceControlPanel\").SetVisible (false)\n Self.FindbyName(\"CommentsControlPanel\").SetVisible (fal se) \n\n" ) (Script.153 Name: "AGI/TMT (MassGIS) ThemeSettings.OptionsComboBox.Select" SourceCode: "' Name:AGI/TMT (MassGIS) ThemeSettings.OptionsComboBox.Select\n' Headline:\n' Called By:\n' Calls To:\n'\n' Author: Stephan Smith\n' Date: Wed Mar 03 14:57: