/3.1 (ODB.1 Dependencies: "$AVEXT/dlogcore.___\n" FirstRootClassName: "Project" Roots: 2 Version: 31 ) (Project.2 Name: "install.apr" CreationDate: "Monday, May 18, 1998 12:42:22" GUIName: "Project" Win: 3 CSMgr: 4 DocExts: 5 VisGUIWidth: 70 Doc: 6 Doc: 10 Doc: 14 Doc: 18 Doc: 22 Doc: 26 Doc: 30 Buttons: 34 Buttons: 35 Buttons: 36 Dependencies: 37 Scripts: 38 Prefs: 39 GUI: 53 GUI: 507 GUI: 808 WorkDir: 862 WinX: 27 WinY: 17 WinW: 510 WinH: 473 StartUp: "DefaultProject.install" SerialNumber: "752151130575" SelColor: 863 GUINames: 864 GUINames: 865 GUINames: 866 GUINames: 867 GUINames: 868 GUINames: 869 GUINames: 870 TocWidthScale: 1.00000000000000 ) (DocWin.3 Owner: 2 Open: 1 X: 3 Y: 1 W: 252 H: 344 ) (CSMgr.4 ) (DocAct.5 Doc: 2 ) (SEd.6 Name: "AVStart Extension" CreationDate: "Tuesday, February 02, 1999 11:05:51" GUIName: "Script" Win: 7 CSMgr: 8 DocExts: 9 Source: "/3.1\n(Extension.1\n Name: \"StartUp Wizard\"\n Dependencies: \"$AVBIN/avdlog.dll\\n\"\n FirstRootClassName: \"AVDLog\"\n Roots: 2\n Roots: 40\n Roots: 41\n Roots: 42\n Roots: 43\n Roots: 44\n Roots: 45\n Roots: 46\n Version: 31\n CanUnloadScript: 47\n UnloadScript: 48\n)\n\n(AVDLog.2\n Name: \"StartUp\"\n X: 433\n Y: 259\n W: 375\n H: 381\n ConstrainedControlNames: 3\n ConstrainedControlNames: 4\n Constraints: 5\n Constraints: 6\n Server: 7\n ControlPanel: 8\n Title: \"Welcome to ArcView GIS\"\n Modal: 1\n AlwaysOnTop: 1\n HasTitleBar: 1\n Closeable: 1\n Close: \"StartUp.Close\"\n Open: \"StartUp.Open\"\n DefaultButton: 39\n)\n\n(AVStr.3\n S: \"OK\"\n)\n\n(AVStr.4\n S: \"cancel\"\n)\n\n(Numb.5\n N: 85.00000000000000\n)\n\n(Numb.6\n N: 85.00000000000000\n)\n\n(Nil.7\n)\n\n(CPanel.8\n Child: 9\n Child: 27\n Child: 28\n Child: 29\n Child: 30\n Child: 32\n ResBox: 33\n ResBox: 34\n ResBox: 35\n ResBox: 36\n ResBox: 37\n ResBox: 38\n Listening: 1\n)\n\n(CPanel.9\n InternalName: \"aControlPanel\"\n Child: 10\n Child: 12\n Child: 13\n Child: 14\n Child: 15\n Child: 17\n Child: 19\n Constraints: 0x55\n ResBox: 20\n ResBo x: 21\n ResBox: 22\n ResBox: 23\n ResBox: 24\n ResBox: 25\n ResBox: 26\n Label: \"Create a new project\"\n VisibleBorder: 1\n Listening: 1\n)\n\n(AVIBox.10\n InternalName: \"aIconBox9\"\n Constraints: 0x55\n Icon: 11\n Listening: 1\n)\n\n(AVIcon.11\n Name: \"DefaultDocument\"\n Res: \"Icons.DefaultDocument\"\n\n)\n\n(RButn.12\n InternalName: \"View\"\n Constraints: 0x55\n Listening: 1\n Label: \"with a new View\"\n)\n\n(RButn.13\n InternalName: \"newapr\"\n Constraints: 0x55\n Listening: 1\n Label: \"as a blank project\"\n)\n\n(RButn.14\n InternalName: \"openapr \"\n Constraints: 0x55\n Listening: 1\n Label: \"Open an existing project\"\n)\n\n(AVIBox.15\n InternalName: \"aIconBox10\"\n Constraints: 0x55\n Icon: 16\n Listening: 1\n)\n\n(AVIcon.16\n Name: \"FileBrowser\"\n Res: \"Icons.FileBrowser\"\n\n)\n\n(AVIBox.17\n InternalName: \"aIconBox11\"\n Constraints: 0x55\n Icon: 18\n Listening: 1\n)\n\n(AVIcon.18\n Name: \"av2_color\"\n Res: \"Icons.av2_color\"\n\n)\n\n(CPanel.19\n InternalName: \"aControlPanel7\"\n Constraints: 0x55\n Label: \" or \"\n VisibleBorder: 1\n Listening: 1\n)\n\n(RectD.20\n Left: 14.00000000000000\n Top: 125.00000000000000\n Right: 74.00000000000000\n Bottom: 65.00000000000000\n)\n\n(RectD.21\n Left: 72.00000000000000\n Top: 61.00000000000000\n Right: 316.00000000000000\n Bottom: 31.00000000000000\n)\n\n(RectD.22\n Left: 72.00000000000000\n Top: 110.00000000000000\n Right: 316.00000000000000\n Bottom: 80.00000000000000\n)\n\n(RectD.23\n Left: 72.00000000000000\n Top: 167.00000000000000\n Right: 316.00000000000000\n Bottom: 137.00000000000000\n)\n\n(RectD.24\n Left: 14.00000000000000\n Top: 182.00000000000000\n Right: 74.0000000000 0000\n Bottom: 122.00000000000000\n)\n\n(RectD.25\n Left: 25.00000000000000\n Top: 64.00000000000000\n Right: 63.00000000000000\n Bottom: 25.00000000000000\n)\n\n(RectD.26\n Top: 127.00000000000000\n Right: 363.00000000000000\n Bottom: 110.00000000000000\n)\n\n(LButn.27\n InternalName: \"OK\"\n Label: \"OK\"\n Click: \"StartUp.Click Button\"\n)\n\n(LButn.28\n InternalName: \"cancel\"\n Label: \"Cancel\"\n Click: \"StartUp.Cancel\"\n)\n\n(AVCBox.29\n InternalName: \"show\"\n Listening: 1\n Selected: 1\n Label: \"Show this window when ArcView GIS starts\"\n Constraints: 0x55\n)\n\n(AVLBox.30\n InternalName: \"Recent Projects lbx\"\n NextControl: 7\n ContentKind: 4\n Constraints: 0x55\n Listening: 1\n VerticalScroll: 1\n SelectionStyle: 31\n Apply: \"Startup.ProjectOpen\"\n)\n\n(AVEnum.31\n Name: \"LISTBOX_SELECTION_SINGLECELL\"\n)\n\n(TextLabel.32\n InternalName: \"aTextLabel2\"\n Constraints: 0x55\n Label: \"Recently Opened Projects\"\n Listening: 1\n)\n\n(RectD.33\n Left: 8.00000000000000\n Top: 185.00000000000000\n Right: 371.00000000000000\n Bottom: 10.00000000000000\n)\n\n(RectD.34\n Left: 151.000 00000000000\n Top: 373.00000000000000\n Right: 253.00000000000000\n Bottom: 343.00000000000000\n)\n\n(RectD.35\n Left: 262.00000000000000\n Top: 372.00000000000000\n Right: 364.00000000000000\n Bottom: 342.00000000000000\n)\n\n(RectD.36\n Left: 7.00000000000000\n Top: 344.00000000000000\n Right: 397.00000000000000\n Bottom: 321.00000000000000\n)\n\n(RectD.37\n Left: 9.00000000000000\n Top: 322.00000000000000\n Right: 370.00000000000000\n Bottom: 207.00000000000000\n)\n\n(RectD.38\n Left: 10.00000000000000\n Top: 206.00000000000000\n Rig ht: 367.00000000000000\n Bottom: 190.00000000000000\n)\n\n(Nil.39\n)\n\n(Script.40\n Name: \"StartUp.Cancel\"\n SourceCode: \"self.getdialog.close\\n\"\n)\n\n(Script.41\n Name: \"StartUp.Click Button\"\n SourceCode: \"'StartUp.Click radio\\nthedialog=self.getdialog\\ntheRadio=thedialog.findbyname(\\\"AControlPanel\\\").getselected\\n\\nav.run(\\\"Startup.showAgain\\\",thedialog)\\n\\nif (theDialog.FindByName(\\\"Recent Projects lbx\\\").GetSelection.Count > 0) then\\n theFName = theDialog.FindByName(\\\"Recent Projects lbx\\\").GetSelection.Get(0).as filename\\n if (file.Exists(theFName).Not) then\\n msgbox.error(\\\"Unable to find Project\\\"++theFName.asstring,Script.The.GetName)\\n return nil\\n end\\n thedialog.close\\n theProject = av.GetProject\\n if (theProjec\nt <> nil) then\\n theProject.Close\\n end\\n av.DelayedRun(\\\"Project.OpenPart2\\\",theFName,0.1)\\n else\\n thename=theradio.getname\\n if (thename=\\\"View\\\") then\\n av.delayedrun(\\\"Startup.MakeView\\\",\\\"\\\",0.1) \\n elseif (thename=\\\"OpenAPR\\\") then\\n av.delayedrun(\\\"Project.Open\\\" ,\\\"\\\",0.1)\\n elseif (thename=\\\"NewAPR\\\") then\\n end\\n thedialog.close\\nend\\n\\n\"\n)\n\n(Script.42\n Name: \"StartUp.Close\"\n SourceCode: \"thedialog=self\\nthedialog.FindByName(\\\"Recent Projects lbx\\\").Empty\\nav.run(\\\"Startup.showAgain\\\",thedialog)\\n\"\n)\n\n(Script.43\n Name: \"StartUp.MakeView\"\n SourceCode: \"' newView = View.MakeWithGUI(\\\"View\\\")\\n' newView.GetWin.Open\\n av.Delayedrun(\\\"View.New\\\",nil,0.1)\\n theView = av.GetActiveDoc\\n if (msgbox.yesno(\\\"Would you like to add data to the View now?\\\",\\\"Add data\\\",TRUE)) then\\n av.delayedrun(\\\"view.add\\\",\\\"\\\",0.1)\\n end\\n\"\n)\n\n(Script.44\n Name: \"StartUp.Open\"\n SourceCode: \"thedialog=self\\n\\nAVUpperLeft = av.ReturnOrigin \\nAVCenter = avUpperLeft + (av.ReturnExtent / (2@2)) \\nhalfDialogWidthHeight = TheDialog.ReturnExtent.ReturnSize / (2@2) \\nMovePoint = AVCenter - halfDialogWidthHeight \\nTheDialog.MoveTo(MovePoint.GetX, MovePoint.GetY)\\nthedialog.findbyname(\\\"view\\\").select\\n\\ntheodb = odb.open(\\\"$TEMP\\\\default.l4\\\".asfilename)\\nif (theodb = nil) then\\n flist = nil\\n thedialog.FindByName(\\\"Recent Projects lbx\\\").empty\\n else\\n flist = theodb.get(0)\\n theDialog.FindByName(\\\"Recent P\nrojects lbx\\\").definefromlist(flist)\\nend\\n\\n\"\n)\n\n(Script.45\n Name: \"Startup.ProjectOpen\"\n SourceCode: \"theDialog = av.FindDialog(\\\"Startup\\\")\\ntheFName = theDialog.FindbyName(\\\"Recent Projects lbx\\\").GetSelection.get(0).asfilename\\nif (file.Exists(theFName).Not) then\\n msgbox.error(\\\"Unable to find Project\\\"++theFName.asstring,Script.The.GetName)\\n return nil\\ nend\\ntheProject = av.GetProject\\nif (theProject <> nil) then\\n theProject.Close\\nend\\nav.DelayedRun(\\\"Project.OpenPart2\\\",theFName,0.1)\\nav.DelayedRun(\\\"Project.UpdateInterface\\\",nil,1)\\ntheDialog.Close\\n\"\n)\n\n(Script.46\n Name: \"StartUp.ShowAgain\"\n SourceCode: \"if (self.findbyname(\\\"Show\\\").isSelected.Not) then\\n alinef=\\\"$HOME/avstart.txt\\\".asfilename\\n startfile=linefile.make(alinef,#FILE_PERM_WRITE )\\n startfile.writeelt(\\\"If this file exists then ArcView will not display the startup wizard\\\")\\n sta rtfile.close\\nend\\n\"\n)\n\n(Script.47\n Name: \"StartUpExt.CanUnload\"\n SourceCode: \"return System.CanUnloadLibrary(self.GetDependencies.Get(0))\"\n)\n\n(Script.48\n Name: \"StartUpExt.Unload\"\n SourceCode: \"Dialog.DetachFromExtension(self)\"\n)\n\n" FontSize: 1 ) (DocWin.7 Owner: 6 X: 252 Y: 56 W: 363 H: 245 ) (CSMgr.8 ) (DocAct.9 Doc: 6 ) (SEd.10 Name: "Default Project" CreationDate: "Monday, May 18, 1998 12:42:56" GUIName: "Script" Win: 11 CSMgr: 12 DocExts: 13 Source: "/3.1\n(ODB.1\n Dependencies: \"$AVEXT/dlogcore.___\\n\"\n FirstRootClassName: \"Project\"\n Roots: 2\n Version: 31\n)\n\n(Project.2\n Name: \"default.apr\"\n GUIName: \"Project\"\n CSMgr: 3\n DocExts: 4\n VisGUIWidth: 70\n Flags: 0x01\n Dependencies: 5\n Scripts: 6\n Prefs: 457\n GUI: 467\n GUI: 742\n GUI: 871\n GUI: 967\n GUI: 1157\n GUI: 1267\n GUI: 1322\n WinX: 189\n WinY: 29\n WinW: 1063\n WinH: 849\n GUINames: 1340\n GUINames: 1341\n GUINames: 1342\n GUINames: 1343\n GUINames: 1344\n GUINames: 1345\n GUINames: 1346\n TocWidthScale: 1.000000000000 00\n)\n\n(CSMgr.3\n)\n\n(DocAct.4\n Doc: 2\n)\n\n(FN.5\n Path: \"$AVEXT/dlogcore.___\"\n)\n\n(NameDict.6\n Obj: 7\n Obj: 8\n Obj: 9\n Obj: 10\n Obj: 11\n Obj: 12\n Obj: 13\n Obj: 14\n Obj: 15\n Obj: 16\n Obj: 17\n Obj: 18\n Obj: 19\n Obj: 20\n Obj: 21\n Obj: 22\n Obj: 23\n Obj: 24\n Obj: 25\n Obj: 26\n Obj: 27\n Obj: 28\n Obj: 30\n Obj: 31\n Obj: 32\n Obj: 33\n Obj: 34\n Obj: 35\n Obj: 36\n Obj: 37\n Obj: 38\n Obj: 39\n Obj: 40\n Obj: 41\n Obj: 43\n Obj: 44\n Obj: 45\n Obj: 46\n Obj: 47\n Obj: 48\n Obj: 49\n Obj: 50\n Obj: 51\n Obj: 52\n Obj: 53\n Obj: 54\n Obj: 55\n Ob j: 56\n Obj: 57\n Obj: 58\n Obj: 59\n Obj: 60\n Obj: 61\n Obj: 62\n Obj: 63\n Obj: 64\n Obj: 65\n Obj: 66\n Obj: 67\n Obj: 68\n Obj: 69\n Obj: 70\n Obj: 71\n Obj: 72\n Obj: 73\n Obj: 74\n Obj: 75\n Obj: 76\n Obj: 77\n Obj: 78\n Obj: 79\n Obj: 80\n Obj: 81\n Obj: 82\n Obj: 83\n Obj: 84\n Obj: 85\n Obj: 86\n Obj: 87\n Obj: 88\n Obj: 89\n Obj: 90\n Obj: 91\n Obj: 92\n Obj: 93\n Obj: 94\n Obj: 95\n Obj: 96\n Obj: 97\n Obj: 98\n Obj: 99\n Obj: 100\n Obj: 101\n Obj: 102\n Obj: 103\n Obj: 104\n Obj: 105\n Obj: 106\n Obj: 107\n Obj: 108\n Obj: 109\n Obj: 110\n Obj: 111 \n Obj: 112\n Obj: 113\n Obj: 114\n Obj: 115\n Obj: 116\n Obj: 117\n Obj: 118\n Obj: 119\n Obj: 120\n Obj: 121\n Obj: 122\n Obj: 123\n Obj: 124\n Obj: 125\n Obj: 126\n Obj: 127\n Obj: 128\n Obj: 129\n Obj: 130\n Obj: 131\n Obj: 132\n Obj: 133\n Obj: 134\n Obj: 135\n Obj: 136\n Obj: 137\n Obj: 138\n Obj: 139\n Obj: 140\n Obj: 141\n Obj: 142\n Obj: 143\n Obj: 144\n Obj: 145\n Obj: 146\n Obj: 147\n Obj: 148\n Obj: 149\n Obj: 150\n Obj: 151\n Obj: 152\n Obj: 153\n Obj: 154\n Obj: 155\n Obj: 156\n Obj: 157\n Obj: 158\n Obj: 159\n Obj: 160\n Obj: 161\n Obj: 162\n Obj: 163\n Obj: 164\n Obj: 165\n Obj: 166\n Obj: 167\n Obj: 168\n Obj: 169\n Obj: 170\n Obj: 171\n Obj: 172\n Obj: 173\n Obj: 174\n Obj: 175\n Obj: 176\n Obj: 177\n Obj: 178\n Obj: 179\n Obj: 180\n Obj: 181\n Obj: 182\n Obj: 183\n Obj: 184\n Obj: 185\n Obj: 186\n Obj: 187\n Obj: 188\n Obj: 189\n Obj: 190\n Obj: 191\n Obj: 192\n Obj: 193\n Obj: 194\n Obj: 195\n Obj: 196\n Obj: 197\n Obj: 198\n Obj: 199\n Obj: 200\n Obj: 201\n Obj: 202\n Obj: 203\n Obj: 204\n Obj: 205\n Obj: 206\n Obj: 207\n Obj: 208\n Obj: 209\n Obj: 210\n Obj: 211\n Obj: 212\n Obj: 213\n Ob j: 214\n Obj: 215\n Obj: 216\n Obj: 217\n Obj: 218\n Obj: 219\n Obj: 220\n Obj: 221\n Obj: 222\n Obj: 223\n Obj: 224\n Obj: 225\n Obj: 226\n Obj: 227\n Obj: 228\n Obj: 229\n Obj: 230\n Obj: 231\n Obj: 232\n Obj: 233\n Obj: 234\n Obj: 235\n Obj: 236\n Obj: 237\n Obj: 238\n Obj: 239\n Obj: 240\n Obj: 241\n Obj: 242\n Obj: 243\n Obj: 244\n Obj: 245\n Obj: 246\n Obj: 247\n Obj: 248\n Obj: 249\n Obj: 250\n Obj: 251\n Obj: 252\n Obj: 253\n Obj: 254\n Obj: 255\n Obj: 256\n Obj: 257\n Obj: 258\n Obj: 259\n Obj: 260\n Obj: 261\n Obj: 262\n Obj: 263\n Obj: 264\n Obj: 265\n Obj: 266\n Obj: 267\n Obj: 268\n Obj: 269\n Obj: 270\n Obj: 271\n Obj: 272\n Obj: 273\n Obj: 274\n Obj: 275\n Obj: 276\n Obj: 277\n Obj: 278\n Obj: 279\n Obj: 280\n Obj: 281\n Obj: 282\n Obj: 283\n Obj: 284\n Obj: 285\n Obj: 286\n Obj: 287\n Obj: 288\n Obj: 289\n Obj: 290\n Obj: 291\n Obj: 292\n Obj: 293\n Obj: 294\n Obj: 295\n Obj: 296\n Obj: 297\n Obj: 298\n Obj: 299\n Obj: 300\n Obj: 301\n Obj: 302\n Obj: 303\n Obj: 304\n Obj: 305\n Obj: 306\n Obj: 307\n Obj: 308\n Obj: 309\n Obj: 310\n Obj: 311\n Obj: 312\n Obj: 313\n Obj: 314\n Obj: 315\n Obj: 3 16\n Obj: 317\n Obj: 318\n Obj: 319\n Obj: 320\n Obj: 321\n Obj: 322\n Obj: 323\n Obj: 324\n Obj: 325\n Obj: 326\n Obj: 327\n Obj: 328\n Obj: 329\n Obj: 330\n Obj: 331\n Obj: 332\n Obj: 333\n Obj: 334\n Obj: 335\n Obj: 336\n Obj: 337\n Obj: 338\n Obj: 339\n Obj: 340\n Obj: 341\n Obj: 342\n Obj: 343\n Obj: 344\n Obj: 345\n Obj: 346\n Obj: 347\n Obj: 348\n Obj: 349\n Obj: 350\n Obj: 351\n Obj: 352\n Obj: 353\n Obj: 354\n Obj: 355\n Obj: 356\n Obj: 357\n Obj: 358\n Obj: 359\n Obj: 360\n Obj: 361\n Obj: 362\n Obj: 363\n Obj: 364\n Obj: 365\n Obj: 366\n Obj: 367 \n Obj: 368\n Obj: 369\n Obj: 370\n Obj: 371\n Obj: 372\n Obj: 373\n Obj: 374\n Obj: 375\n Obj: 376\n Obj: 377\n Obj: 378\n Obj: 379\n Obj: 380\n Obj: 381\n Obj: 382\n Obj: 383\n Obj: 384\n Obj: 385\n Obj: 386\n Obj: 387\n Obj: 388\n Obj: 389\n Obj: 390\n Obj: 391\n Obj: 392\n Obj: 393\n Obj: 394\n Obj: 395\n Obj: 396\n Obj: 397\n Obj: 398\n Obj: 399\n Obj: 400\n Obj: 401\n Obj: 402\n Obj: 403\n Obj: 404\n Obj: 405\n Obj: 406\n Obj: 407\n Obj: 408\n Obj: 409\n Obj: 410\n Obj: 411\n Obj: 412\n Obj: 413\n Obj: 414\n Obj: 415\n Obj: 416\n Obj: 417\n Obj: 418\n Obj: 419\n Obj: 420\n Obj: 421\n Obj: 422\n Obj: 423\n Obj: 424\n Obj: 425\n Obj: 426\n Obj: 427\n Obj: 428\n Obj: 429\n Obj: 430\n Obj: 431\n Obj: 432\n Obj: 433\n Obj: 434\n Obj: 435\n Obj: 436\n Obj: 437\n Obj: 438\n Obj: 439\n Obj: 440\n Obj: 441\n Obj: 442\n Obj: 443\n Obj: 444\n Obj: 445\n Obj: 446\n Obj: 447\n Obj: 448\n Obj: 449\n Obj: 450\n Obj: 451\n Obj: 452\n Obj: 453\n Obj: 454\n Obj: 455\n Obj: 456\n)\n\n(Script.7\n Name: \"View.SelectToEditTool\"\n SourceCode: \"theView = av.GetActiveDoc\\ntheView.SetSelectMode(#GRAPHICS_SELECT_VERTEX)\"\n )\n\n(Script.8\n Name: \"View.AddGraphicsUpdate\"\n SourceCode: \"theView = av.GetActiveDoc\\n\\nSELF.SetEnabled((theView.GetActiveThemes.Count = 1) AND theView.GetGraphics.HasSelected)\\n\\n\"\n)\n\n(Script.9\n Name: \"Project.HelpTopics\"\n SourceCode: \"av.Help.SetAVFile\\nav.Help.Show\"\n)\n\n(Script.10\n Name: \"Project.Delete\"\n SourceCode: \"theProject = av.GetProject\\ntheDocs = theProject.GetSelectedDocs\\nif (theDocs.IsEmpty) then\\n return nil\\nend\\ndoc_names = \\\"\\\"\\nall = false\\nresult = false\\nfor each d in theDocs\\n if (NO T all) then\\n result = MsgBox.AllYesNo( \\\"Are you sure you want to delete\\\"++d.GetName, \\\"Delete\\\", NIL )\\n if (result = nil) then\\n all = true\\n elseif (result = false) then\\n continue\\n end\\n end\\n if(d.Is(View)) then\\n editThm = d.GetEditableTheme\\n if (editThm <> nil) then\\n doSave = MsgBox.YesNoCancel(\\\"Sa\nve Edits to \\\"+editThm.GetName+\\\" in \\\"+\\n d.GetName+\\\"?\\\", \\\"Stop Editing\\\", true)\\n if (doSave = nil) then\\n continue\\n end\\n if (edi tThm.StopEditing(doSave).Not) then\\n MsgBox.Info(\\\"Unable to Save Edits to Theme \\\"\\n + editThm.GetName +\\n \\\", please use the Save Edits As option\\\", \\\"\\\")\\n continue\\n else\\n d.SetEditableTheme(NIL)\\n end\\n end \\n end\\n if (d.Is(Table)) then\\n if (d.GetVTab.IsBeingEditedWithrecovery) then\\n \n doSave = MsgBox.YesNoCancel(\\\"Save Edits to the table \\\"+d.GetName+\\n \\\"?\\\", \\\"Stop Editing\\\", True)\\n if (doSave = n il) then\\n continue\\n end\\n if (d.GetVtab.StopEditingWithRecovery(doSave).Not) then\\n MsgBox.Info(\\\"Unable to Save Edits to Table \\\" + d.GetName +\\n \\\", please use the Save Edits As option\\\", \\\"\\\")\\n continue\\n end\\n end \\n end \\n av.GetProject.RemoveDoc( d )\\nend\\n\\nav.PurgeObjects\"\n)\n\n(Script.11\n Name: \"UTIL.MakeDir\"\n SourceCode: \"' Name: UTIL.MKDir\\n'\\n' Author: Timothy N. Loesch\\n' Minnesota Department of Natural Resources\\n' 500 Lafayette Road - Box 11\\n' St. Paul, MN 55155\\n' tim.loesch@dnr.state.mn.us\\n' \\n' Date: Wed Sept 9th 1998\\n' Revised by: \\n' Revision Date: \\n' Revisions: \\n' -------------------------------------------------------------------\\n' Description: This script creates a subdirectory using the operating system command\\n' designed for the task. It uses \nthe COMMAND.COM on windows 3.1 based\\n' systems and the MKDIR command for UNIX. \\n' If tye OS is Win NT or 95 and above the script uses the API call to the\\n' kernel32.dll.\\n' If you are running windows 3.1 and AV3.0a ExecuteSyncronous is used, if you are \\n' using windows 3.1 and AV3.0 then system.Execute is used.\\n' Requires: \\n' Runs: \\n' Run by: \\n' Self: {dir}\\n' Returns: \\n' -------------------------------------------------------------------\\n'\n Name: UTIL.MakeDir\\n'\\n' Headline: Makes a subdirectory\\n'\\n' Self: a string object representing the path to create\\n'\\n' Returns: nil if unsuccessful, true if successful\\n'\\n'\\n' Topics: execute system programs\\n'\\n' Search Keys: execute\\n'\\n' Requires: \\n'\\n' History: Tim Loesch Original Coding 4-14-96\\n'\\n'-ESRI - ArcView 3.0a\\n'\\n\\n'this script makes subdirectories\\n\\nif ( Self = nil ) then \\n msgbox.info(\\\"No Directory Name Passed to DNR.MAKEDIR\\\",\\\"Oh, Oh\\\")\\n return nil\\nend\\n\\ndir = self.get(0)\\n\\nif ( file.exists(dir.asfilen\name) ) then\\n' msgbox.info(\\\"Directory \\\"++dir++\\\" Exists!, No need to create\\\",\\\"DNR.MAKEDIR\\\")\\n return nil\\nend\\n\\n' we must use the DOS, UNIX, or NT command to do this because ArcView does not have a request\\n' to create a subdirectory. We will construct two variables here one that represents\\n' the operating system and one that represents the arguement to the program that \\n' creates the subdirectory.\\n'\\nsys = System.GetOS\\nvar = System.GetOSVariant\\n\\n\\nif ( file.exists((dir).asfilename).not ) then\\n if ( sys = #SYSTEM\n_OS_MSW ) then\\n dir = dir .substitute(\\\"/\\\",\\\"\\\\\\\")\\n if (system.GetOSVariant = #SYSTEM_OSVARIANT_MSW16) then\\n ex = FileName.FindInSystemSearchPath(\\\"command.com\\\")\\n \\n ver = av.GetVersion\\n if (ver = \\\"3.0\\\") then\\n system.execute(ex++dir)\\n else\\n system.executesynchronous(ex++dir)\\n end\\n else\\n kernelDLL = DLL.Make( FileName.FindInSystemSearchPath( \\\"kernel32.dll\\\" ))\\n procGetLastError = DLLProc.Make( kernelDLL, \\\"GetLastError\\\", #DLLPROC_TYPE_INT32,{#DLLPROC_TY\nPE _VOID})\\n CreateDirectoryDLLProc = DLLProc.Make( kernelDLL, \\\"CreateDirectoryA\\\",#DLLPROC_TYPE_INT32,\\n {#DLLPROC_TYPE_STR,#DLLPROC_TYPE_INT32} )\\n if (CreateDirectoryDLLProc.Is(DLLProc) ) then\\n returnNumber = CreateDirectoryDLLProc.Call( { dir, 0 } )\\n end\\n end\\n elseif ( sys = #SYSTEM_OS_UNIX ) then\\n dir = dir.substitute(\\\"\\\\\\\",\\\"/\\\")\\n ex = \\\"mkdir -p\\\"\\n system.execute(ex++dir)\\n end\\nend\\n\\n\\n' now check to see if the d irectory did in fact g\net made. If it did return a true,\\n' if it didn't get made, return a nil value....\\n'\\nif ( (file.exists(dir.asfilename)) and ((dir.asfilename).isdir) ) then\\n' msgbox.info(\\\"System Directory\\\"++dir++\\\"Successfully Created\\\",\\\"DNR.MAKEDIR\\\")\\n success = true\\n return success\\n else\\n msgbox.error(\\\"Unable to make system directory\\\"++dir,\\\"Problem making directory\\\")\\n return nil\\nend\\n\\n\\n\\n\"\n)\n\n(Script.12\n Name: \"View.RedoEditUpdate\"\n SourceCode: \"theView = av.GetActiveDoc\\nenab led = False\\ntheTheme = theView.GetEditableTheme\\n\\nif (theTheme <> nil) then\\n SELF.SetVisible(True)\\n if (theTheme.GetFTab.CanRedo) then\\n enabled = True\\n end\\nelse\\n SELF.SetVisible(False) \\nend\\n\\nself.SetEnabled(enabled)\\n\"\n)\n\n(Script.13\n Name: \"Last4.SaveName\"\n SourceCode: \"new = av.GetProject.GetFileName.GetName.Substitute( \\\"\\\\\\\", \\\"/\\\")\\n\\nav.run(\\\"Last4.RestoreState\\\",nil) \\n\\nif ((_RememberLast.Count <> 0) AND (_RememberLast.Get(0) = new)) then\\n return nil\\nend \\n_RememberLast.Insert( new )\\nif (_RememberLast.Count > 1) then\\n _RememberLast.RemoveDuplicates\\n if (_RememberLast.Count > 9) then\\n _RememberLast.Remove( 9 )\\n end\\nend\\n\\n'save to file\\n\\nlast = ODB.Make( \\\"$TEMP/default.l4\\\".AsFileName )\\nlast.Add( _RememberLast )\\nlast.commit\"\n)\n\n(Script.14\n Name: \"View.Find\"\n SourceCode: \"theView = av.GetActiveDoc\\nkey = MsgBox.Input(\\\"Search for:\\\", \\\"Find Text in Attributes\\\", theView.GetFindString)\\nif (key <> nil) then\\n av.UseWaitCursor\\n if (theView.Find(key).not) then\\n M sgBox.Warning(\\\"No more matches found.\\\",\\\"Find\\\")\\n end\\nend\"\n)\n\n(Script.15\n Name: \"Coordinate.DDtoDMS\"\n SourceCode: \"' Name: Coordinate.DDtoDMS\\n'\\n' Author: Timothy N. Loesch\\n' Date: Tue Jul 28 13:21:15 1998\\n' Revised by: \\n' Revision Date: \\n' Revisions: \\n' -------------------------------------------------------------------\\n' Description: This script displays a lat/long on the screen from a UTM zone 15 point\\n' and displays the DMS and DD versions of the point.\\n' Requires: \\n' Runs: \\ n' Run by: \\n' Self: a point object in Decimal Degrees\\n' Returns: a list object with two objects lat and long in DMS\\n' --------------\n-----------------------------------------------------\\nif ((self = nil) or (self.Is(Point).not)) then\\n msgbox.Error(\\\"This script expects a point object to be passed to it!\\\",\\\"Coordinate.DDtoDMS\\\")\\n return nil\\nend\\n\\nlatdd = self.gety\\nlongdd = self.getx\\n\\ntmplist = {}\\nfor each num in {latdd,longdd}\\n deg = num.truncate\\n tmp = num - deg\\n tmpmn = (tmp * 60).abs\\ n mn = tmpmn.truncate\\n tmp = tmpmn - mn\\n sec = (tmp * 60).truncate\\n tmplist.add(deg.asstring++mn.asstring++sec.asstring)\\nend\\n\\nreturn tmplist\\n\\n\"\n)\n\n(Script.16\n Name: \"View.New\"\n SourceCode: \"' Name: View.New\\n'\\n' Headline: Minnesota's Version of Add New View \\n'\\n' Self: \\n'\\n' Returns:\\n'\\n' Description: This is a re-write of the original View.New script. What it does \\n' extra is that it requests a name for the view and automatically sets\\n' the map and display uni ts to the values stored in the property sheet. \\n'\\n\\n' History: Tim Loesch Original coding 1-2-97\\n\\nmsg = system.getenvvar(\\\"DNRMSG\\\")\\nif (msg = nil) then\\n msg = \\\"ON\\\"\\nend\\nif ( msg.ucase <> \\\"OFF\\\") the\nn\\n vname = msgbox.input(\\\"Enter View Name\\\",\\\"Add View\\\",\\\"\\\")\\n if (vname = nil) then return nil end\\nend\\nnewView = View.MakeWithGUI(av.GetProject.GetSelectedGUI.GetName)\\nMapUnits = system.getenvvar(\\\"MAPUNITS\\\")\\nDistUnits = system.getenvvar(\\\"DISUNITS\\\")\\n\\nunitslist = {\\\"MET ERS\\\",\\\"MILES\\\",\\\"FEET\\\",\\\"YARDS\\\",\\\"KILOMETERS\\\",\\\"DEGREES\\\",\\\"NAUTICALMILES\\\",\\\"CENTIMETERS\\\",\\\"MILLIMETERS\\\"}\\nfound = false\\nfor each aunit in unitslist\\n if (MapUnits.ucase = aunit) then\\n MUnits = \\\"#UNITS_LINEAR_\\\"+aunit\\n found = true\\n end\\nend\\nif (found.n\not) then\\n MapUnits = \\\"Unknown\\\"\\n MUnits = \\\"#UNITS_LINEAR_UNKNOWN\\\"\\nend\\n\\nfound = false\\nfor each aunit in unitslist\\n if (DistUnits.ucase = aunit) then\\n DUnits = \\\"#UNITS_LINEAR_\\\"+aunit\\n found = true\\n end\\nend\\nif (fo und.not) then\\n distUnits = \\\"Unknown\\\"\\n DUnits = \\\"#UNITS_LINEAR_UNKNOWN\\\"\\nend\\n\\n\\nnewView.SetUnits(MUnits.AsEnum)\\nnewView.getdisplay.setdistanceunits(DUnits.AsEnum)\\nnewView.GetWin.Open\\nif (msg.ucase <> \\\"OFF\\\") then\\n newView.SetName(vname)\\n msgbox.info(\\\"Map Units set to \\\"+mapunits+\\\", Distance un\nits set to \\\"+distunits,\\\"New View\\\")\\nend\\n\\n\"\n)\n\n(Script.17\n Name: \"Project.NewPart2\"\n SourceCode: \"' DO NOT DELETE GLOBALS\\n'\\n\\nSystem.RefreshWindows\\nav.PurgeObjects\\nav.ProcessAllInvals\\nthePr oject = Project.Make\\ntheProject.GetWin.Open\\ntheProject.SetModified(FALSE)\\nav.Run(\\\"Codepage.Install\\\",nil)\\n\\n\"\n)\n\n(Script.18\n Name: \"Table.UndoEdit\"\n SourceCode: \"theTable = av.GetActiveDoc\\ntheTable.GetVtab.Undo\\n\"\n)\n\n(Script.19\n Name: \"DNR.Layout.AddTableGraphic\"\n SourceCode: \"' Name: DNR.Layout.AddTableGraphic\\n'\\n' Author: ESRI - derived from samples script.......\\n' \\n' Date: Sun Nov 29 07:13:01 1998\\n' Revised by: \\n' Revision Date: \\n' Revisions: \\n' ------------------ -------------------------------------------------\\n' Description: This script is a copy of the one provided by ESRI to \\n' add a table to a layout as a graphic rather than a table\\n' object. \\n' Requires: \\n' Runs: \\n' Run by: \\n' Self: \\n' Returns: \\n' ---------------------\n----------------------------------------------\\n\\nDEBUG = true\\nDEBUGNOT = false\\n\\ntheLayout = av.GetActiveDoc\\ngl = theLayout.GetGraphics\\nbRect = theLayout.ReturnUserRect\\nif (bRect.GetWidth < 0.1) then\\n r eturn nil\\nend\\n\\nif (System.IsShiftKeyDown) then\\n SelectedOnly = true\\nelse\\n SelectedOnly = false\\nend\\n\\nTableDocNames = {}\\nfor each d in av.GetProject.GetDocs\\n if(d.Is(Table)) then\\n TableDocNames.Add(d.GetName)\\n end\\nend\\n\\nif (TableDocNames.Count = 0) then\\n Msgbox.Error(\\\"You must have a table document in the\n Project\\\",\\\"Duh!\\\")\\n return nil\\n\\nend\\ngl.UnSelectAll\\n\\nTableName = Msgbox.ChoiceAsString(TableDocNames,\\\"Choose a table:\\\",\\\"Smart Table\\\")\\nif (TableName = nil) then\\n return nil\\nend\\n\\ntheTable = av.GetProject.FindDoc(TableName)\\ntheVTab = theTable.GetVTab\\ntheFieldNames = {}\\nfor each f in theVTab.GetFields\\n if (f.IsTypeShape.Not) then\\n theFieldNames.Add(f.GetAlias)\\n end\\nend\\n\\nFieldsToShow = Msgbox.MultiListAsString(theFieldNames,\\\"Choose the Fields to Show\\\",\\\"Smart Table\\\")\\nif (FieldsToShow = nil) then return nil e\nnd\\n\\nif (FieldsToShow.Count = 0) then\\n return nil\\nend\\n\\nbc = Color.Make\\nbc.SetRGBList({255,255,225})\\nftbf = RasterFill.Make\\nftbf.SetStyle(#RA STERFILL_STYLE_SOLID)\\nftbf.SetColor(bc)\\n\\nbRectO = bRect.ReturnOrigin\\nbRectH = bRect.GetHeight\\nbRectW = bRect.GetWidth\\nbRectT = bRect.GetTop\\nbrectB = bRect.GetBottom\\nbRectR = bRect.GetRight\\nHeightLeft = bRect.GetHeight\\n\\ntbo = bRectO + (0@bRectH)\\ncspace = 0\\n\\nfor each f in FieldsToShow\\n \\n 'Make Field Title\\n fl = GraphicText.Make(f,(tbo +(0.1@0)) )\\n\\n fl.GetSymbol.SetSiz\ne(12)\\n fl.SetDisplay(theLayout.GetDisplay)\\n tbo = tbo - (0@(fl.GetBounds.GetHeight + 0.05))\\n fl.SetSelected(true)\\ n \\n gl.AddBatch(fl)\\n HeightLeft = HeightLeft - fl.GetBounds.GetHeight - 0.05\\n HbarHeight = HeightLeft\\n \\n 'Now do the column of values\\n \\n if (SelectedOnly) then\\n theBitmap = theVTab.GetSelection\\n else\\n ResetSelection = false\\n if (theVTab.GetSelection.Count <> 0) then\\n theVTab.RememberSelection\\n theVTab.GetSelection.SetAll\\n\\n theVtab.UpdateSelection\\n ResetSel\nection = true\\n end\\n theBitmap = theVTab.GetDefBitmap\\n end\\n \\n counter = -1\\n ColStr = \\\"\\\"\\n vst = GraphicText.Make(ColStr,(0@0))\\n vst.SetDisplay(theLayout.GetDisplay)\\n vst.GetSymbol.SetSize(10)\\n While (HeightLeft <> 0)\\n rec = theBitmap.GetNextSet(counter)\\n counter = rec\\n ValStr = theVTab.ReturnValueString(theVTab.FindField(f),rec)\\n ColStr = ColStr + ValStr\\n vst.SetText(ColStr)\\n 'Check to see if column has exceeded Height\\n\\n if (HeightLeft < vst.GetBounds.GetHeight) then\\n H\neightLeft = 0\\n end \\n if (theBitmap.GetNextSet(counter) = -1) then\\n HeightLeft = 0\\n end\\n ColStr = ColStr + nl\\n end\\n \\n vst.SetOrigin(tbo - (0@(vst.getBounds.GetHeight)) )\\n \\n 'Check to see if the Column is wider than the Title\\n if (fl.GetBounds.GetWidth > vst.GetBounds.GetWidth) then\\n 'Title is wider, so move column\\n if (theVTab.FindField(f).IsTypeNumber) then\\n vst.SetAlignment(#TEXTCOMPOSER_JUST_RIGHT)\\n\\n vst.GetBounds.Move((fl.GetBounds.GetWidth - vst.GetBounds.GetWidth \n+ 0.1),0.1)\\n gl.AddBatch(vst)\\n elseif(theVTab.Find Field(f).IsTypeString) then\\n vst.SetAlignment(#TEXTCOMPOSER_JUST_LEFT)\\n vst.GetBounds.Move(0.1,0.1)\\n gl.AddBatch(vst)\\n end \\n else\\n 'Column is wider so move & justify title\\n if (theVTab.FindField(f).IsTypeNumber) then\\n vst.SetAlignment(#TEXTCOMPOSER_JUST_RIGHT)\\n vst.GetBounds.Move(0.1, 0.1)\\n gl.AddBatch(vst)\\n\\n elseif (theVTab.FindField(f).IsTypeString) then\\n vst.SetAlignment(#TEXTCOMPOSER_JUST_LEFT)\\n \n vst.GetBounds.Move(0.1, 0.1)\\n gl. AddBatch(vst)\\n end \\n fl.GetBounds.Move( ( (vst.GetBounds.GetWidth - fl.GetBounds.GetWidth) /2 ) ,0)\\n end \\n vst.SetSelected(true)\\n \\n cbr = gl.ReturnSelectedExtent.clone\\n cbr.ExpandBy(0.05)\\n cbp = GraphicShape.Make(cbr)\\n cbp.GetSymbol.SetOLWidth(0.1)\\n gl.AddBatch(cbp)\\n cbp.SetSelected(true) \\n gl.GroupSelected\\n\\n gl.GetSelected.Get(0).SetObjectTag(\\\"col\\\")\\n cspace = cspace + gl.ReturnSelectedExtent.GetWidth \\n gl.UnSelectAll\\n HeightLeft = bRectH\\n \n tbo = bRectO + (cspa ce@bRectH)\\nend\\n\\nfor each g in gl.FindAllByObjectTag(\\\"col\\\")\\n g.SetSelected(true)\\nend\\n\\nse = gl.ReturnSelectedExtent\\nseO = se.ReturnOrigin\\nftr = Rect.Make(SeO + (0@(se.GetHeight - 0.275)),(se.GetWidth@0.275))\\n\\ncoltits = {}\\nfor each g in gl.FindAllByObjectTag(\\\"col\\\")\\n colTitleRect = ftr.IntersectWith(g.GetBounds.Clone)\\n\\n coltits.Add(colTitleRect)\\n g.SetSelected(false)\\nend\\ntc = Color.Make\\ntc.SetTransParent(true)\\n\\nfor each ftr in coltits\\n bp = ftr.Clone.InsetBy(0.0125)\\n bpd = Polyg on.Mak\ne({{ftr.ReturnOrigin,(ftr.GetRight@ftr.GetBottom),(ftr.GetRight@ftr.GetTop),(bp.GetRight@bp.GetTop),(bp.GetLeft@bp.GetBottom),ftr.ReturnOrigin}})\\n bpl = Polygon.Make({{ftr.ReturnOrigin,(bp.ReturnOrigin),(bp.GetRight@bp.GetTop),(ftr.GetRight@ftr.GetTop),(ftr.GetLeft@ftr.GetTop),ftr.ReturnOrigin}})\\n\\n gbp = GraphicShape.Make(bp)\\n gbpd = GraphicShape.Make(bpd)\\n gbpl = GraphicShape.Make(bpl)\\n gbp.SetSymbol(ftbf.Clone)\\n gbpd.SetSymbol(ftbf.Clone)\\n gbpl.SetSymbol(ftbf.Clone)\\n lg = Color.Mak e\\n lg.SetRGBLis\nt({220,220,220})\\n dg = Color.Make\\n dg.SetRGBList({120,120,120})\\n gbpd.GetSymbol.SetColor(dg.Clone)\\n gbpl.GetSymbol.SetColor(lg.Clone)\\n gbpl.GetSymbol.SetOLWidth(0)\\n gbpd.GetSymbol.SetOLWidth(0)\\n gbpl.GetSymbol.SetColorLock(true)\\n gbpd.GetSymbol.SetColorLock(true)\\n\\n gbp.GetSymbol.SetOLWidth(0)\\n gbpl.GetSymbol.SetOLColor(tc.Clone)\\n gbpd.GetSymbol.SetOLColor(tc.Clone)\\n gbp.GetSymbol.SetOLColor(tc.Clone)\\n gl.AddBatch(gbpd)\\n gl.AddBatch(gbpl)\\n gl.AddBatch(gbp)\\n gbpd.SetSelected(true)\\n gbpl.SetSe\nlected(true)\\n gbp.SetSelected(True)\\nend\\ngl.GroupSelected\\ngl.MoveSelectedToBack\\ngl.GetSelected.Get(0).SetObjectTag(\\\"buttons\\\")\\ngl.UnSelectAll \\n\\nfor each g in gl.FindAllByObjectTag(\\\"col\\\")\\n g.SetSelected(true)\\n gl.MoveSelectedToFront\\n\\nend\\ngl.FindByObjectTag(\\\"buttons\\\").SetSelected(true)\\n\\nNeatRect = gl.ReturnSelectedExtent.Clone\\nnrgs = GraphicShape.Make(NeatRect)\\nnrgs.GetSymbol.SetOLWidth(0.6)\\ntheLayout.GetGraphics.AddBatch(nrgs)\\n\\ngl.UnSelectAll\\n \\nbp = GraphicShape.Make(NeatRect)\\nbw = Color.GetWhite\\nbpf = Rast\nerFill.Make\\nbpf.SetStyle(#RASTERFILL_STYLE_OPAQUESTIPPLE)\\nbp.SetSymbol(bpf)\\nbp.GetSymbol.SetColor(tc.Clone)\\nbp.GetSymbol.SetBGColor(Color.GetWhite)\\ntheLayout.GetGraphics.AddBatch(bp)\\n\\nbp.SetSelected(True)\\ngl.MoveSelectedToBack\\n\\nif (ResetSelection) then\\n LastSel = theVTab.GetLastSelection.Clone\\n theVTab.SetSelection(LastSel)\\n theVTab.UpdateSelection\\nend\\n\\nfor each g in gl.FindAllByObjectTag(\\\"col\\\")\\n g.SetSelected(true)\\n end\\ngl.FindByObjectTag(\\\"buttons\\\").SetSelected(true)\\nnrgs.SetSelected(true)\\ngl.GroupSelec\nted\\n\\ntheLayout.GetGraphics.EndBatch\\n\\n\"\n)\n\n(Script.20\n Name: \"View.SplitTool\"\n SourceCode: \"theView = av.GetActiveDoc\\nl = theView.ReturnUserPolyLine\\ntheTheme = theView.GetEditableTheme\\n\\nif (l.IsNull) then\\n return nil\\nelse\\n if (theTheme <> nil) then\\n theTheme.GetFtab.BeginTransaction\\n theField = theTheme.GetFTab.FindField(\\\"Shape\\\")\\n theType = theField.GetType\\n if ((theType = #FIELD_SHAPE POLY) or (theType = #FIELD_SHAPELINE)) then\\n theTheme.Split(l)\\n end\\n theTheme.GetFtab.EndTransaction\\n end \\n av.GetProject.SetModified(true)\\nend\\n\\n\"\n)\n\n(Script.21\n Name: \"Layout.ZoomPage\"\n SourceCode: \"av.GetProject.SetModified(true)\\ntheLayout = av.GetActiveDoc\\ntheLayout.GetDisplay.ZoomToPage\"\n)\n\n(Script.22\n Name: \"Script.Comment\"\n SourceCode: \"' Comment out selected lines\\n\\ntheSEd = av.GetActiveDoc\\n\\n' Comment out selected lines\\nselected = \\\"'\\\"+theSEd.GetSelected\\ncommented = sele cted.Substitute( NL, NL+\\\"'\\\" )\\n\\n' BUT not the next line!\\nif (commented.right( 1 ) = \\\"'\\\" ) then\\n commented = commented.left( commented.count - 1 )\\nend \\n\\n' Add revised text back into script\\nnew = theSEd.Insert( commented ) 'UNDO works!\\n\"\n)\n\n(Script.23\n Name: \"View.HighwayToolUpdate\"\n SourceCode: \"v = av.GetActiveDoc\\nenabled = false\\nif (Extension.GetExtensions.Get(\\\"Label & Text Tools\\\") = NIL) then\\n SELF.SetEnabled(FALSE)\\n return nil\\nend \\nif (v.GetActiveThemes.Count > 0) then\\n for eac h t in v.GetActiveThemes\\n if (t.Is(FTheme)) then\\n if (t.GetFTab.GetShapeClass.GetClassname.Contains(\\\"Line\\\")) then\\n enabled = true\\n end\\n end\\n end\\nend\\n\\nSelf.SetEnabled(enabled)\\n\\n\"\n)\n\n(Script.24\n Name: \"SymWin.DisplayPenPanel\"\n SourceCode: \"if ((av.GetSymbolWin.GetPanel = #SYMBOLWIN_PANEL_COLOR).not) then\\n av.GetSymbolWin.SetPanel(#SYMBOLWIN_PANEL_PEN)\\nend\"\n)\n\n(Script.25\n Name: \"Script.ShiftRight\"\n SourceCode: \"theSEd = av.GetActiveDoc\\ntheSEd.ShiftRight\"\n)\n\n(Script.26\n Name: \"Chart.Identify\"\n SourceCode: \"theChart = av.GetActiveDoc\\nrec = theChart.GetUserRecord\\nif (rec <> -1) then\\n idlabel = theChart.GetName++\\\"-\\\"\\n f = theChart.GetRecordLabelField\\n if (f = Nil) then\\n idlabel = idlabel++rec.AsString\\n else\\n idlabel = idlabel++theChart.GetVTab.ReturnValueString(f,rec)\\n end\\n theChart.GetVTab.Identify(rec, idlabel)\\nend\\n\"\n)\n\n(Script.27\n Name: \"Script.Embed\"\n SourceCode: \"'Embeds the current script in the Project\\n' and deletes the script editor\\n'\\ntheS Ed = av.GetActiveDoc\\nif (NOT (theSEd.IsCompiled)) then\\n msgbox.error(\\\"Script is uncompiled:\\\"++theSEd.GetName, \\\"\\\")\\n return nil\\nend\\n\\n'See if script name has been modified\\nSEdName = theSed.GetName\\nif ((SEdName.Left(6)=\\\"Script\\\") and (SEdName.Right(sedName.Count-6).IsNumber)) then\\n change = msgbox.yesno( \\\"Do you want to change the script name?\\\", \\\"Embed Script\\\", TRUE )\\n if (change) then\\n return nil\\n end\\nend\\n \\n'See if scrip\nt is already on the script list\\nif ( av.GetProject.Get Scripts.Get(theSEd.GetName ) <> nil) then\\n replace = msgbox.yesno( \\\"Do you want to overwrite\\\"++theSEd.GetName+\\\"?\\\",\\n \\\"Embed Script\\\", TRUE)\\n if (replace.Not) then \\n return nil\\n end\\nend\\n \\n'Embed the script\\ntheScript = theSEd.GetScript\\nav.GetProject.AddScript( theScript )\\n\\n'Remove the script editor\\nav.GetProject.RemoveDoc( theSEd )\\n\\n'Report success\\nav.ShowMsg(\\\"Script embedded:\\\"++theScript.Ge\ntName )\\n\\n\"\n)\n\n(Script.28\n N ame: \"WindowMenuUpdate\"\n SourceCode: \"\\n' Get the open documents and their names\\nnames = av.GetProject.GetName\\ndoclist = { av.GetProject }\\n\\nfor each d in av.GetProject.GetDocs\\n if (d.GetWin.IsOpen) then\\n doclist.Add( d )\\n names = names++d.GetName\\n end\\nend \\n \\n' Get last state and look for change\\noldNames = self.GetObjectTag\\nif (oldNames = nil) then\\n oldNames = \\\"\\\" \\nelseif (names = oldNames) then\\n return nil ' bail out if no change\\nend\\n \\n' save current state\\nself.SetObjectTa g( names )\\n \\n' set the default number format\\nScript.The.Set\nNumberFormat( \\\"d\\\" )\\n\\n' delete all of the menu items from the bottom to the separator\\nctlset = self.GetControlSet\\nl = ctlset.GetControls\\nlast = l.get(l.count - 1)\\n\\nwhile (last <> self)\\n ctlset.Remove(last)\\n last = l.get(l.count- 1)\\nend\\n\\n ' iterate through the open docs and add them back as menu items\\ncount = 1\\nfor each d in doclist\\n n= ctlset.New(l.Count)\\n n.setLabel(\\\"&\\\"+count.AsString++d.GetName)\\n n.setClick(\\\"WindowA ctivate\\\")\\n n.SetHelp(\\\"Activates\\\"++d.GetName)\\n count=count+1\\nend\\n\"\n NumberFormat: 29\n)\n\n(AVStr.29\n S: \"d\"\n)\n\n(Script.30\n Name: \"View.RemoveThemeLabels\"\n SourceCode: \"v = av.GetActiveDoc\\nfor each t in v.GetVisibleThemes\\n if (t.IsActive) then\\n if (t.GetGraphics.HasLabels) then\\n t.GetGraphics.SelectLabels\\n t.GetGraphics.Invalidate\\n end\\n end\\nend\\nv.GetGraphics.ClearSelected\"\n)\n\n(Script.31\n Name: \"Layout.UndoUpdate\"\n SourceCode: \"SELF.SetEnabled(av.GetActiveDoc.GetGraphics.CanRe storeGraphic)\\n\"\n)\n\n(Script.32\n Name: \"Layout.ShowHideMarginsUpdate\"\n SourceCode: \"theLayout = av.GetActiveDoc\\nif (theLayout.GetDisplay.IsMarginVisible) then\\n SELF.SetLabel(\\\"Hide &Margins\\\")\\nelse\\n SELF.SetLabel(\\\"Show &Margins\\\")\\nend\\n\"\n)\n\n(Script.33\n Name: \"Table.StopEditing\"\n SourceCode: \"theTable = av.GetActiveDoc\\ntheTable.StopEditing\"\n)\n\n(Script.34\n Name: \"View.Print\"\n SourceCode: \"theView = av.GetActiveDoc\\nvn = theView.GetName\\nl = {vn+\\\" - Display\\\", vn+\\\" - Table of Contents\\\"}\\nwhat = Prin ter.The.Edit(l)\\nif (what = 1) then\\n theView.PrintTOC\\nelseif (what = 0) then\\n theView.Print\\nend\"\n)\n\n(Script.35\n Name: \"Script.Properties\"\n SourceCode: \"theSEd = av.GetActiveDoc\\ntheSEd.Edit\"\n)\n\n(Script.36\n Name: \"Script.ClearAllBreaks\"\n SourceCode: \"theScript = av.GetActiveDoc\\ntheScript.ClearAllBreaks\\n\"\n)\n\n(Script.37\n Name: \"View.SaveEditsAs\"\n SourceCode: \"theView = av.GetActiveDoc\\neditThm = theView.GetEditableTheme\\n\\nif (editThm <> nil) then\\n \\n def = av.GetProject.MakeFileName(\\\"theme\\\", \\\"sh p\\\")\\n def = FileDialog.Put(def, \\\"*.shp\\\", \\\"Save Edits For Theme \\\" + editThm.GetName)\\n \\n if (def = NIL) then return nil end\\n\\n\\n newTheme = editThm.SaveEditsAs(def)\\n \\n if ((newTheme <> nil) and (newTheme.GetFTab.HasError.Not)) then\\n\\n theView.SetEditableTheme(nil)\\n theView.AddTheme(newTheme)\\n theView.SetEditableTheme(newTheme)\\n \\n editThm.SetVisible(False)\\n newThem\ne.SetVisible(True)\\n \\n else\\n MsgBox.Info(\\\"Unable to Save Edits As \\\"\\n + def.AsString +\\n \\\", please try another file name\\\", \\\"\\\") \\n end\\n \\nend\\n\"\n)\n\n(Script.38\n Name: \"Chart.ToggleTitle\"\n SourceCode: \"theChart = av.GetActiveDoc\\ntheChart.GetTitle.SetVisible(theChart.GetTitle.IsVisible.Not)\\n\"\n)\n\n(Script.39\n Name: \"Layout.TextToolUpdate\"\n SourceCode: \"theExt = Extension.GetExtensions.Get(\\\"Label & Text Tools\\\")\\nSELF.SetEnabled(theExt <> nil)\\n\"\n)\n\n(Script.40\n Name: \"View.RectTool\"\n SourceCode: \"theView = av.GetActiveDoc\\n\\nr = theView.ReturnUserRect\\ntheTheme = theView.GetEditable Theme\\n\\nif (r.IsNull) then\\n return nil\\nelse\\n if (theTheme <> nil) then\\n p = r.AsPolygon\\n thePrj = theView.GetProjection\\n if (thePrj.IsNull.Not) then\\n p = p.ReturnUnprojected(thePrj)\\n end\\n theTheme.getFTab.BeginTransaction\\n theField = theTheme.GetFTab.FindField(\\\"Shape\\\")\\n rec = theTheme.GetFTab.AddRecord\\n theTheme.GetFTab.SetValue(theField, rec, p)\\n theTheme.GetFTab.EndTransaction\\n theTheme.\nGetFTab.GetSelection.ClearAll\\n theTheme.GetFTab.GetSelection. Set(rec)\\n theTheme.GetFTab.UpdateSelection\\n else\\n gr = GraphicShape.Make(r)\\n theView.GetGraphics.UnselectAll\\n gr.SetSelected(TRUE)\\n theView.GetGraphics.Add(gr)\\n end\\n av.GetProject.SetModified(true)\\nend\"\n)\n\n(Script.41\n Name: \"Table.Statistics\"\n SourceCode: \"theTable = av.GetActiveDoc\\ntheVTab = theTable.GetVTab\\ntheField = theTable.GetActiveField\\n\\nthePrecision = \\\"d.dddddddddd\\\"\\ntheFieldPrecision = theField.GetPrecision\\nScript.The.SetNumberFormat( thePrecision.Left( theFieldPre cision + 2 ) )\\n\\nif ( theVTab.GetSelection.Count = 0 ) then\\n theSet = theVTab\\nelse\\n theSet = theVTab.GetSelection\\nend\\n\\ntheSum = 0\\ntheCount = 0\\ntheMinimum = nil\\ntheMaximum = nil\\nfor each rec in theSet\\n theValue = theVTab.ReturnValueNumber( theField, rec )\\n if ( not ( theValue.IsNull ) ) th\nen\\n if ( theMinimum = nil ) then\\n theMinimum = theValue\\n theMaximum = theValue\\n else\\n theMinimum = theMinimum min theValue\\n theMaximum = theMaximum max theValue\\n end\\n theSum = theValue + theSum\\n theCount = theCount + 1\\n end\\nend\\ntheMean = theSum / theCount\\n\\ntheSumSqDev = 0\\nfor each rec in theSet\\n theValue = theVTab.ReturnValueNumber( theField, rec )\\n if ( not ( theValue.IsNull ) ) then\\n theSqDev = ( theValue - theMean ) * ( theValue - theMean )\\n theSumSqDev = theSq\nDev + theSumSqDev\\n end\\nend\\n\\nif (theCount > 1) then\\n theVariance = theSumsqdev / (theCount - 1)\\n theStdDev = theVariance.Sqrt\\nelse\\n theVariance = 0\\n theStdDev = 0\\nend\\n\\nM sgBox.Report( \\\"Sum: \\\" + theSum.AsString + nl +\\n \\\"Count: \\\" + theCount.SetFormat( \\\"d\\\" ).AsString + nl +\\n \\\"Mean: \\\" + theMean.AsString + nl +\\n \\\"Maximum: \\\" + theMaximum.AsString + nl +\\n \\\"Minimum: \\\" + theMinimum.AsString + nl +\\n \\\"Range: \\\" + ( theMaximum-theMinimum ).Abs.AsSt\nring + nl +\\n \\\"Variance: \\\" + theVariance.AsString + nl +\\n \\\"Standard Deviation: \\\" + theStdDev.AsString,\\n \\ \"Statistics for\\\" ++ theField.GetAlias ++ \\\"field\\\" )\\n\\n\"\n NumberFormat: 42\n)\n\n(AVStr.42\n S: \"d.dddddd\"\n)\n\n(Script.43\n Name: \"Table.AddField\"\n SourceCode: \"theTable = av.GetActiveDoc\\ntheFld = theTable.MakeField\\n\\nif (theFld <> NIL) then\\n theTable.GetVTab.AddFields({theFld})\\n theTable.SetActiveField(theFld)\\nend\"\n)\n\n(Script.44\n Name: \"View.AOITool\"\n SourceCode: \"theView = av.GetActiveDoc\\nr = theView.ReturnUserRect\\nif (r.IsNull.not) then\\n theView.SetAOI(r)\\n av.GetProject.SetModified(true)\\nend\\n \\n\"\n)\n\n(Script.45\n Name: \"View.SnapToEndPointUpdate\"\n SourceCode: \"SELF.SetVisible(FALSE)\\nSELF.SetEnabled(FALSE)\\ntheView = av.GetActiveDoc\\ntheTheme = theView.GetEditableTheme\\n\\nif (theTheme <> nil) then\\n if (theTheme.IsInteractiveSnapping) then\\n theTool = av.GetActiveGUI.GetToolBar.GetActive\\n theType = theTheme.GetFTab.FindField(\\\"Shape\\\").GetType\\n if ((theType = #FIELD_SHAPELINE) and \\n ((theTool.GetApply.AsString = \\\"View.PolyLineTool\\\") or\\n (theTool.GetApply.AsString = \\\"View.SplitTool\\\"))) then\\n SELF.SetVisible(theTheme.IsInteractiveSnapping)\\n \n SELF.SetEnabled(TRUE)\\n end\\n end\\nend\\n\"\n)\n\n(Script.46\n Name: \"Layout.Circle\"\n SourceCode: \"theLayout = av.GetActiveDoc\\nc = theLayout.ReturnUserCircle\\nif (c.IsNull.not) then\\n gc = GraphicShape.Make(c)\\n theLayout.GetGraphics.UnselectAll\\n gc.SetSelected(TRUE)\\n theLayout.GetGraphics.Add(gc)\\n av.GetProject.SetModified(true)\\nend\"\n)\n\n(Script.47\n Name: \"Layout.Template\"\n SourceCode: \"theLayout = av.GetActive Doc\\nt = TemplateMgr.Show\\nif (t <> nil) then\\n objs = theLayout.GetGraphics.GetFrameObjs\\n objs.Merge(av.GetProject.GetDocs)\\n theLayout.UseTemplate(t)\\n theLayout.GetGraphics.FillFrames(objs)\\nend\"\n)\n\n(Script.48\n Name: \"View.EditLegend\"\n SourceCode: \"self.editlegend\"\n)\n\n(Script.49\n Name: \"Layout.SelectToEdit\"\n SourceCode: \"theLayout = av.GetActiveDoc\\ntheLayout.SelectToEdit\"\n)\n\n(Script.50\n Name: \"WindowActivate\"\n SourceCode: \"'Window Menu selection that activates an open document\\n\\n'entries in the Wi ndow menu can look like this: &1 View of the World\\n\\n'get the menu item label\\nmenulabel = self.GetLabel\\n\\n'find where the document name starts\\noff = menulabel.Extract(0).Count + 1\\n\\n'get the document name out of the item label\\ndocname=menulabel.Middle(off,menulabel.Count - off)\\n\\n'find the document in the project\\ntheDoc = av.GetProject.FindDoc(docname)\\n\\n'bring the doc to the front\\nif (theDoc = nil) then\\n av.GetProject.GetWin.Open\\nelseif \n(theDoc.GetWin.IsOpen) then\\n theDoc.GetWin.Open\\nend\\n \\n\\n\"\n)\n\n(Script.51\n Name: \"Table.Find\"\n SourceCode: \"theTable = av.GetActiveDoc\\nkey = MsgBox.Input(\\\"Search for:\\\", \\\"Find\\\", theTable.GetFindString)\\nif (key <> Nil) then\\n rec = theTable.Find(key)\\n if (rec = Nil) then\\n MsgBox.Warning(\\\"No more matches found.\\\",\\\"Find\\\")\\n else\\n b = theTable.GetVTab.GetSelection\\n b.ClearAll\\n b.Set(rec)\\n theTable.GetVTab.UpdateSelection\\n theTable.ShowRow(theTable.ConvertRecordToRow(rec))\\nend\\nend\\n\"\n)\n\n(Script.52\n Name: \"Chart.ToggleXAxis\"\n So urceCode: \"theChart = av.GetActiveDoc\\ntheChart.GetXAxis.SetVisible(theChart.GetXAxis.IsVisible.Not)\\n\"\n)\n\n(Script.53\n Name: \"DNR.UpdateProjectControls\"\n SourceCode: \"' Name: DNR.UpdateProjectControls\\n'\\n' Author: Timothy N. Loesch\\n' Minnesota Department of Natural Resources\\n' 500 Lafayette Road - Box 11\\n' St. Paul, MN 55155\\n' tim.loesch@dnr.state.mn.us\\n' \\n' Date: Wed Apr 14 11:28:58 1999\\n' Revised by: \\n' Revision Date: \\n' Revisions: \\n' -------------------------------------------------------------------\\n' Description: This script is run from the Project.Open script and resolves\\n' differences in menus\n, buttons, and controls from earlier versions\\n' of the default project.\\n' Requires: \\n' Runs: \\n' Run by: \\n' Self: \\n' Returns: \\n' -------------------------------------------------------------------\\n\\nDEBUG = true\\nDEBUGNOT = false\\n\\ntheproject = av.getproject\\nif (theproject = nil) then\\n return nil\\nend\\n\\n \\n' Update the additions to the project interface\\n'\\n'msgbox.info(\\\"Updating interface\\\",\\\"\\\")\\n\\nProjMenuBar = theProject.FindGUI(\\\"Project\\\").GetMenuBar\\n\\nthemenu = ProjMenuBar.FindByLabel(\\\"File\\\")\\nfor each ac\ntrl in themenu\\n if (actrl.Is(Space).Not) then\\n thetext = actrl.GetLabel\\n if (thetext.left(11) = \\\"DNR Default\\\") then\\n if (thetext.right(7) <> \\\"4/28/99\\\") then\\n actrl.SetLabel(\\\"DNR Default V3.1e - 4/28/99\\\")\\n end\\n end\\n end\\nend\\n\\ntheChoice = ProjMenubar.Fin dByScript(\\\"DNR.ExportProject\\\")\\nlabellist = {}\\nif (theChoice = nil) then\\n thechoice = Choice.Make\\n theChoice.SetClick(\\\"DNR.ExportProject\\\")\\n theChoice.SetHelp(\\\"Exports Project and Data to a Single Location\\\")\\n theChoice.SetLabel(\\\"Ex\nport Project\\\")\\n theChoice.SetUpdate(\\\"DNR.ExportProject.Update\\\")\\n themenu = Projmenubar.FindByLabel(\\\"File\\\")\\n for each actrl in themenu\\n if (actrl.Is(Space).Not) then\\n labellist.add(actrl.getLabel)\\n else\\n labelList.Add(\\\"Space\\\")\\n end\\n end\\n themenu.Add(thechoice,labelList.FindByValue(\\\"Save Project &As...\\\"))\\nend\\n\\n' make changes to the View and Layout document Interfaces...\\n'\\n\\nViewMenubar = theProject.FindGUI(\\\"View\\\").GetMenuBar\\nLayoutMenuBar = theProject.FindGUI(\\\"Layout\\\").GetMenuBar\\nfor e\nach amenubar in {ViewMenuBar,LayoutMenuBar}\\n thechoice = amenubar.FindByScript(\\\"Graphic.Label Defaults Show.DNR\\\")\\n if (thechoice <> nil) then\\n thechoice.SetClick(\\\"Graphic.Label Defaults Show\\\")\\n end\\nend\\n\\n\\ntheChoice = LayoutMenubar.FindByScript(\\\"Layout.ExportToAlchemy\\\")\\nlabellist = {}\\nif (theChoice = nil) then\\n thechoice = Choice.Make\\n theChoice.SetClick(\\\"Layout.ExporttoAlchemy\\\")\\n theChoice.SetHelp(\\\"Print a Layout using Image Alchemy\\\")\\n theChoice.SetLabel(\\\"Print Using Alchemy\\\")\\n theChoice.SetUpdate\n(\\\"Layout.ExportToAlchemy.Update\\\")\\n themenu = Layoutmenubar.FindByLabel(\\\"File\\\")\\n for each actrl in themenu\\n if (actrl.Is(Space).Not) then\\n labellist.add(actrl.getLabel)\\n else\\n l abelList.Add(\\\"Space\\\")\\n end\\n end\\n themenu.Add(thechoice,labelList.FindByValue(\\\"&Export...\\\"))\\nend\\n\\ntheChoice = LayoutMenubar.FindByScript(\\\"Layout.PrintRTLFile\\\")\\nlabellist = {}\\nif (theChoice = nil) then\\n thechoice = Choice.Make\\n theChoice.SetClick(\\\"Layout.PrintRTLFile\\\")\\n theChoice.SetHelp(\\\"Spool an Existing RTL\n File\\\")\\n theChoice.SetLabel(\\\"Print RTL File\\\")\\n theChoice.SetUpdate(\\\"Layout.ExportToAlchemy.Update\\\")\\n themenu = Layoutmenubar.FindByLabel(\\\"File\\\")\\n for each actr l in themenu\\n if (actrl.Is(Space).Not) then\\n labellist.add(actrl.getLabel)\\n else\\n labelList.Add(\\\"Space\\\")\\n end\\n end\\n themenu.Add(thechoice,labelList.FindByValue(\\\"Export to Alchemy\\\"))\\nend\\n\\nSedNamelist = {\\\"View.LabelTool.DNR\\\",\\\"View.CalloutLabelTool.DNR\\\",\\\"View.BulletLeaderLabelTool.DNR\\\",\\n \\\"View.ShadowBoxLabelTool.\nDNR\\\",\\\"View.TextTool.DNR\\\",\\\"View.CalloutTextTool.DNR\\\",\\n \\\"View.BulletLeaderTextTool.DNR\\\",\\\"View.ShadowBoxTextTool.DNR\\\" ,\\\"View.CreateDropShadowText.DNR\\\",\\n \\\"View.SplineText.DNR\\\"}\\nViewToolbar = theproject.findgui(\\\"View\\\").GetToolBar\\nLayoutToolBar = theProject.FindGUI(\\\"Layout\\\").GetToolBar\\nfor each amenu in {ViewToolBar,LayoutToolBar}\\n for each atool in amenu\\n if (atool.Is(ToolMenu)) then\\n for each ased in SEDNameList\\n thetool = atool.FindByScript(aSED)\\n if (theto\nol <> nil) then\\n newname = aSED.Substitute(\\\".DNR\\\",\\\"\\\")\\n theTool.SetApply(newname)\\n end\\n end\\n end\\n end\\nend\\n\\nSedNameList = {\\\"Project.Open.DNR\\\",\\\"Project.Save.DNR\\\",\\\"Project.SaveAs.DNR\\\"}\\n\\nfor each aGUI in {\\\"Project\\\",\\\"View\\\",\\\"Table\\\",\\\"Chart\\\",\\\"Layout\\\",\\\"Script\\\"}\\n themenubar = theProject.FindGUI(aGUI).GetMenuBar\\n for each ased in SEDNameList\\n thetool = themenubar.FindByScript(aSED)\\n if (thetool <> nil) then\\n newname = aSED.Substitute(\\\".DNR\\\",\\\"\\\")\\n theTool.SetClick(newna\nme)\\n end\\n end\\nend\\n\\nfor each aGUI in {\\\"Project\\\",\\\"View\\\",\\ \"Table\\\",\\\"Chart\\\",\\\"Layout\\\",\\\"Script\\\"}\\n thebuttonbar = theProject.FindGUI(aGUI).GetbuttonBar\\n for each ased in SEDNameList\\n thetool = thebuttonbar.FindByScript(aSED)\\n if (thetool <> nil) then\\n newname = aSED.Substitute(\\\".DNR\\\",\\\"\\\")\\n theTool.SetClick(newname)\\n end\\n end\\nend\\n\\n\\nfor each aGUI in {\\\"Appl\\\",\\\"Project\\\",\\\"View\\\",\\\"Table\\\",\\\"Chart\\\",\\\"Layout\\\",\\\"Script\\\"}\\n thebtnbar = theProject.FindGUI(aGUI).GetButtonBar\\n for each ased in SEDNameList\\n \n thebutton = theb tnbar.FindByScript(ased)\\n if (thebutton <> nil) then\\n newname = aSED.Substitute(\\\".DNR\\\",\\\"\\\")\\n thebutton.SetClick(NewName)\\n end\\n end\\nend\\n\"\n)\n\n(Script.54\n Name: \"Script.Action\"\n SourceCode: \"'\\n' run scripts contained in selected\\n' script documents\\n'\\nfor each d in av.GetProject.GetSelectedDocs\\n d.Run( nil )\\nend\\n\"\n)\n\n(Script.55\n Name: \"Table.Refresh\"\n SourceCode: \"theTable = av.GetActiveDoc\\ntheTable.GetVTab.Refresh\"\n)\n\n(Script.56\n Name: \"Doc.Print\"\n SourceCode: \"d = av.GetActiv eDoc\\nif (0 <= Printer.The.Edit({d.GetName})) then\\n av.ShowMsg(\\\"Printing \\\"+d.GetName+\\\"...\\\")\\n av.UseWaitCursor\\n System.RefreshWindows\\n d.Print\\n av.ShowMsg(\\\"\\\")\\nend\"\n)\n\n(Script.57\n Name: \"View.PasteUpdate\"\n SourceCode: \"SELF.SetEnabled(Clipboard.The.HasKindOf(Graphic) or Clipboard.The.HasKindOf(Theme))\\n\"\n)\n\n(Script.58\n Name: \"View.ZoomtoLatlong\"\n SourceCode: \"' Name: View.ZoomToLatlong\\n'\\n' Author: Timothy N. Loesch\\n' Date: Tue Jul 28 13:21:15 1998\\n' Revised by: \\n' Revision Date: \\n' Revi sions: \\n' -------------------------------------------------------------------\\n' Description: This script displays a lat/long on the screen from a UTM zone 15 point\\n' and displays the DMS and DD versions of the point.\\n' Requires: \\n' Runs: \\n' Run by: \\n' Self: \\n' Returns: \\n' -------------------------------------------------------------------\\n\\nDEBUG = true\\nDEBUGNOT = fals\ne\\n\\nscript.the.setnumberformat(\\\"d.dddd\\\")\\nthelabels = {\\\"Longitude\\\",\\\"Latitude\\\"}\\nthedefaults = {\\\"\\\",\\\"\\\"}\\ndm slist = msgbox.multiinput(\\\"Enter Degrees Minutes and Seconds\\\",\\\"Zoom to Lat/Long\\\",thelabels,thedefaults)\\nif (dmslist.count < 1) then\\n return nil\\nend\\n\\ntheView = av.GetActiveDoc\\n\\np = TrnMerc.Make(theView.ReturnExtent)\\np.SetCentralMeridian(-93)\\np.SetReferenceLatitude(0)\\np.SetScale(0.9996)\\np.SetFalseEasting(500000)\\np.SetFalseNorthing(0)\\np.SetSpheroid(#SPHEROID_GRS80)\\n\\nthelong = dmslist.get(0)\\nthelat = dmslist.ge\nt(1)\\nthelonglist = thelong.astokens(\\\" \\\")\\nthelatlist = thelat.astokens(\\\" \\\") \\nif ( (thelonglist.count <> 3) or (thelatlist.count <> 3) )then\\n msgbox.info(\\\"Invalid input for DMS - Must be seperated by a space\\\",\\\"View.Coordinates\\\")\\n return nil\\nend\\n\\nlongdd = ((((thelonglist.get(2).asnumber / 60) + thelonglist.get(1).asnumber))/60) + (thelonglist.get(0).asnumber.abs)\\nif (thelonglist.get(0).asnumber < 0) then\\n longdd = longdd * -1\\nend\\nlatdd = ((((thelatlist.get(2).asnumber / 60) + thelatlist.get(1).asnumber)) / 6\n0) + thelatlist.get(0).asnumber\\n\\n\\nllpt = point.make(long dd,latdd)\\n\\np.projectpt(llpt)\\n\\n'msgbox.info(llpt.getx.setformat(\\\"dd\\\").asstring+\\\",\\\"++llpt.gety.abs.setformat(\\\"dd\\\").asstring,\\\"\\\")\\n\\ntheorigin = point.make(llpt.getx - 750,llpt.gety - 750)\\ntherect = rect.makenull\\ntherect.setorigin(theorigin)\\ntherect.setsize(1500@1500)\\ntheview.getdisplay.zoomtorect(therect)\\n\\n\\naPoint = Point.Make(llpt.getx,llpt.gety)\\ngPoint = GraphicShape.Make(aPoint)\\ntheSymbol = gPoint.GetSymbol\\ntheSymbol.SetColor(Color.GetRed)\\ntheSymbol.SetS\nize(10)\\nthetext = graphictext .make(\\\"You are here\\\"+NL+\\n \\\"X = \\\"++llpt.getx.asstring+NL+\\n \\\"Y = \\\"++llpt.gety.asstring+NL+\\n \\\"Lat DD =\\\"++latdd.asstring+NL+\\n \\\"Long DD =\\\"++longdd.asstring+NL+\\n \\\"Lat DMS =\\\"++thelat+NL+\\n \\\"Long DMS =\\\"++thelong\\n ,(llpt.getx+30)@(llpt.gety+30))\\n \\ntheView.GetGraphics.UnselectAll\\ntheVi\new.G etGraphics.Add(gPoint)\\ntheView.GetGraphics.add(thetext)\\n\\nthebox = Rect.make((thetext.getbounds.returnorigin.getx - 20)@(thetext.getbounds.returnorigin.gety - 20),\\n (thetext.getbounds.getwidth + 20)@(thetext.getbounds.getheight+20))\\nagbox = graphicshape.make(thebox)\\nthesymbol = rasterfill.make\\nthesymbol.setstyle(#rasterfill_style_solid)\\nthesymbol.setcolor(color.getwhite)\\nthesymbol.setolcolor(color.getblack)\\nagbox.setsymbol(thesymbol)\\ntheView.GetGraphics.add(agbox)\\n\\ntheView.Get Display.h\nookupsymbol(agbox.getsymbol)\\ntheView.GetDisplay.HookupSymbol(thetext.getsymbol)\\ntheView.GetDisplay.HookupSymbol(gpoint.getsymbol)\\n\\n\\nagbox.select\\ntheView.GetGraphics.MoveSelectedToBack\\nthetext.select\\ngpoint.select\\n\\ntheView.GetGraphics.GroupSelected\\n\\ntheview.invalidate\"\n)\n\n(Script.59\n Name: \"Chart.ToggleYAxisUpdate\"\n SourceCode: \"theChart = av.GetActiveDoc\\nSELF.SetEnabled( theChart.GetChartDisplay.GetType <> #CHARTDISPLAY_PIE) \\n if (theChart.GetYAxis.IsVisible) then\\n SELF.SetLabel (\\\"Hide &Y Axis\\\")\\n else\\n SELF.SetLabel(\\\"Show &Y Axis\\\")\\n end\\n\"\n)\n\n(Script.60\n Name: \"Script.ToggleBreak\"\n SourceCode: \"theScript = av.GetActiveDoc\\nthePos = theScript.ReturnInsertPos\\nif (theScript.BreakExists(thePos)) then\\n res = theScript.ClearBreak(thePos)\\nelse\\n res = theScript.AddBreak(thePos)\\nend\\n\"\n)\n\n(Script.61\n Name: \"Table.HasLinksUpdate\"\n SourceCode: \"theTable = av.GetActiveDoc\\nSELF.SetEnabled( theTable.GetVTab.IsLinked )\"\n)\n\n(Script.62\n Name: \"Frame.RefreshUpdate\"\n SourceCode: \" theLayout = av.GetActiveDoc\\nSELF.SetEnabled(theLayout.GetGraphics.HasKindOf(ViewFrame) = true)\\n\\n\\n\"\n)\n\n(Script.63\n Name: \"View.IntersectUpdate\"\n SourceCode: \"theView = av.GetActiveDoc\\ntheTheme = theView.GetEditableTheme\\nenabled = FALSE\\nif (theTheme <> nil) then\\n SELF.SetLabel(\\\"&Intersect Features\\\")\\n SELF.SetHelpTopic(\\\"Intersect_Features\\\")\\n fCount = theTheme.GetFTab.GetSelection.Count\\n shapeClass = theTheme.GetFTab.FindField(\\\"shape\\\").GetType\\n enabled = ((fcount > 1) and (shapeClass = # FIELD_SHAPEPOLY))\\nelse\\n SELF.SetLabel(\\\"&Intersect Graphics\\\")\\n SELF.SetHelpTopic(\\\"Intersect_Graphics\\\")\\n theGraphics = theView.GetGraphics.GetSelected\\n gcount = theGraphics.\nCount\\n if (gcount > 1) then\\n dim2 = 0\\n for each gra in theGraphics\\n dim = gra.GetShape.GetDimension\\n if ((dim = 2) and (gra.Is(GraphicText).not) and (gra.Is(GraphicGroup).not)) then\\n dim2 = dim2 + 1\\n end\\n end\\n enabled = (gcount = dim2)\\n end\\nend\\n\\nSELF.SetEnabled(enabled)\\n\"\n)\n\n( Script.64\n Name: \"View.EditMatch\"\n SourceCode: \"theView = av.GetActiveDoc\\n\\nfor each t in theView.GetActiveThemes\\n if ((t.Is( FTHEME )) and (t.GetFTab.IsGeocoded)) then\\n editing = true\\n refresh = false\\n while (editing)\\n editing = RematchDialog.Show(t)\\n if (editing) then\\n refresh = true\\n end\\n end\\n if (refresh) then\\n t.Invalidate(true)\\n end\\n return nil\\n end\\nend\\n\"\n)\n\n(Script.65\n Name: \"Chart.LineGallery\"\n SourceCode: \"theChart = av.GetActiveDoc \\ntheChart.ShowGallery(#CHARTDISPLAY_LINE)\\n\"\n)\n\n(Script.66\n Name: \"Table.Edit\"\n SourceCode: \"theTable = av.GetActiveDoc\\ntheTable.EditValues\\n\"\n)\n\n(Script.67\n Name: \"Layout.ExportToAlchemy\"\n SourceCode: \"' Name: Layout.ExporttoAlchemy\\n'\\n' Author: Timothy N. Loesch\\n' Minnesota Department of Natural Resources\\n' 500 Lafayette Road - Box 11\\n' St. Paul, MN 55155\\n' tim.loesch@dnr.state.mn.us\\n' \\n' Date: Tue Oct 06 08:23:17 1998\\n' Revised by: \\n' Revision Date: \\n' Revisions: \\n' -------------------------------------------------------------------\\n' Description: This script exports a layout to EPS format and then executes\\n' Image Alchemy to proces\ns the information.\\n' Requires: \\n' Runs: \\n' Run by: \\n' Self: \\n' Returns: \\n' -------------------------------------------------------------------\\n\\nDEBUG = true\\nDEBUGNOT = false\\n\\ntheLayout = av.getactivedoc\\nif (theLayout.Is(Layout).Not) then\\n msgbox.error(\\\"This script only works o n Layouts\\\",\\\"Layout.ExporttoAlchemy\\\")\\n return nil\\nend\\n\\nalchemy = system.getEnvVar(\\\"ALCHLOC\\\")\\nif (alchemy = nil) then\\n msgbox.warning(\\\"Unable to find Image Alchemy. Looking for the project Property ALCHLOC\\\",\\\"Layout.ExportToAlchemy\\\")\\n \n return nil\\nend\\n\\nif (file.exists(alchemy.asfilename).not) then\\n msgbox.Warning(\\\"Unable to find the Image Alchemy Program. Looking for\\\"++alchemy)\\n return nil\\nend\\n\\nprtsrv = system.getenvvar(\\\"PRTSRV\\\")\\nif (prtsrv = nil) then\\n prtsrv = \\\"lobo\\\"\\nend \\n\\nigamma = system.getenvvar(\\\"IGAMMA\\\")\\nif (igamma = nil) then\\n igamma = \\\"1.0\\\"\\nend\\nogamma = system.getenvvar(\\\"OGAMMA\\\")\\nif (ogamma = nil) then\\n ogamma = \\\"1.8\\\"\\nend\\n\\nres = thelayout.getdisplay.getResolution\\n\\nLayoutWidth = theLayout.GetDisplay.ReturnPageExtent.GetWidth\\nLa\nyoutHeight = theLayout.GetDisplay.ReturnPageExtent.GetHeight\\n\\nif ( (layoutWidth > 36) and (layoutHeight > 36) ) then\\n if (msgbox.yesno(\\\"Plot size exceeds 36 inches in both width and height! Do you want to proceed?\\\", \\\"Export to Alchemy\\\",false).not ) then\\n return nil\\n end\\nend\\n \\nif ( (layoutWidth > 36) and (layoutHeight < 36) ) then\\n rotate = true\\n else\\n rotate = false\\nend\\n\\nprlist = {}\\nfor each var in {\\\"PRINTER1\\\",\\\"PRINTER2\\\",\\\"PRINTER3\\\"}\\n if (system.getenvvar(var) <> nil) then\\n prlist.add(system.geten\nvvar(var))\\n end\\nend\\n\\nif (prlist.count < 1) then\\n msgbox.info(\\\"No Printers Defined! See documentation for setting up Printers\\\",Script.The.GetName)\\n return nil\\nend\\n\\ndpi = msgbox.Lis tAsString({\\\"150\\\",\\\"300\\\",\\\"600\\\"},\\\"Select Output Resolution\\\",\\\"Export To Alchemy\\\")\\nif (dpi = nil) then\\n return nil\\nend\\n\\ndest = msgbox.ListAsString(prlist,\\\"Select Printer\\\",\\\"Layout.ExportToAlchemy\\\")\\nif (dest = nil) then\\n return nil\\nend\\n\\ntmpdir = system.getenvvar(\\\"TEMP\\\").asfilename\\nkillrtl = true\\nif (msgbox.MiniYesNo(\\\"Do you want to s\nave the output RTL File?\\\",TRUE)) then\\n tmprtl = filedialog.put(\\\"map.rtl\\\".asfilename,\\\"*.rtl\\\",\\\"Specify Output RTL Filename\\\")\\n if (tmprtl = nil) then\\n return nil\\n else\\n killrtl = false\\n end\\nelse\\n tmprtl = tmpdir.MakeTmp(\\\"AVRTL\\\",\\\"rtl\\\")\\nend\\n\\ntmpeps = tmpdir.MakeTmp(\\\"AVEPS\\\",\\\"eps\\\")\\ntmpeps.SetExtension(\\\"\\\")\\n\\n\\n'now write the batch file for image alchemy......\\n'\\nf1 = linefile.make(\\\"$TEMP/alch.bat\\\".asfilename,#FILE_PERM_WRITE)\\nspoolcmd = system.getenvvar(\\\"SPOOLCMD\\\")\\n\\nif (rotate) then\\n 'include rotate statem\nent -Zr90 and then the input and output sizes must be switched\\n f1.WriteElt(alchemy++tmpeps.asstring+\\\"eps\\ \"++tmprtl.asstring++\\\" -o --r7 -Zm2 -Zi\\\"+LayoutWidth.Asstring+\\\"i\\\"++LayoutHeight.AsString+\\\"i -Zo\\\"+layoutheight.AsString+\\\"i\\\"++LayoutWidth.AsString+\\\"i -Gi1.0 -Go1.8 -Zd\\\"++dpi++dpi++\\\"-Zr90\\\")\\n else\\n f1.WriteElt(alchemy++tmpeps.asstring+\\\"eps\\\"++tmprtl.asstring++\\\" -o --r7 -Zm2 -Zi\\\"+LayoutWidth.AsString+\\\"i\\\"++LayoutHeight.AsString+\\\"i -Gi\\\"+igamma++\\\"-Go\\\"+ogamma++\\\"-Zd\\\"++dpi++dpi)\\nend\\nif (spoolcmd = \\\"NPRINT\\\") then\\n \nf1.WriteElt(\\\"nprint\\\"++tmprtl.AsString++\\\"Q=\\\"+dest)\\nelse\\n f1.WriteElt (\\\"lpr -S\\\"++prtsrv++\\\" -P\\\"++dest++tmprtl.AsString)\\nend\\nif (killrtl = true) then \\n f1.WriteElt(\\\"del\\\"++tmprtl.AsString) \\nend\\nf1.WriteElt(\\\"del\\\"++tmpeps.AsString+\\\"eps\\\")\\nf1.WriteElt(\\\"pause\\\")\\nf1.close\\nfor each fname in {\\\"cmd.exe\\\",\\\"command.com\\\"}\\n cmd32exe = FileName.FindInSystemSearchPath( fname )\\n if (cmd32exe <> nil) then\\n break\\n end\\nend\\n\\nif (cmd32exe = nil) then\\n msgbox.info(\\\"Unable to find COMMAND.COM or CMD.EXE\\\",\\\"Layout.ExporttoAlchemy\\\"\n)\\n return nil\\nend\\n\\ntheLayo ut.ExportToFile((tmpeps.asstring+\\\"eps\\\").asfilename,\\\"PostScript New (EPS)\\\",{dpi.asnumber})\\nsystem.execute(cmd32exe.asstring++\\\"/c\\\"++f1.getname)\\n\\n\"\n)\n\n(Script.68\n Name: \"UTIL.InteractiveCopyCoverage\"\n SourceCode: \"' Name: UTIL.InteractiveCopyCoverage\\n'\\n' Headline: Gathers input interactively from the user for copying a coverage from one workspace \\n' to another. This script then sends the necessary information tot he UTIL.CopyCoverage script.\\n'\\n' SELF: none\\n'\\n' Returns: \\n'\\n' Description: \\n' \\n' Topics: Copy, Arc/Info, Coverage\\n'\\n' Search Keys: Copy, Arc/Info,Coverage\\n'\\n' Requires: \\n'\\n' History: Tim Loesch Original Coding 3/27/98\\n'\\n'-ESRI - ArcView 3.0a\\n'\\n\\nCovList = sourceDialog.ShowClass(\\\"Select Coverage To Copy\\\",fsr\nc)\\nif (covlist = nil) then\\n return nil\\nend\\nif (covlist.count < 1) then\\n return nil\\nend\\n\\nthesrcname = CovList.Get(0)\\n\\nthedatasource = thesrcname.getfilename\\nif (coverage.exists(thedatasource.asstring).not) then\\n msgbox.info(\\\"This command only copies Ar c/Info Coverages.\\\",\\\"Copy Coverage\\\")\\n return nil\\nend\\n\\ncovername = thesrcname.GetName\\n\\ndest = filedialog.put(\\\"SELECT DIRECTORY\\\".asfilename,\\\"\\\",\\\"Select Destination Workspace\\\")\\n\\nif (dest = nil) then\\n return nil\\nend\\n\\ndest.stripfile\\n\\nav.run(\\\"UTIL.CopyCoverage\\\",{t\nhedatasource.asstring,dest.asstring})\\n\"\n)\n\n(Script.69\n Name: \"Table.IsEditableUpdate\"\n SourceCode: \"theTable = av.GetActiveDoc\\nSELF.SetEnabled(theTable.GetVTab.IsEditable)\"\n)\n\n(Script.70\n Name: \"View.PopupPan\"\n SourceCode: \"av .GetProject.SetModified(true)\\ntheView = av.GetActiveDoc\\ntheDisp = theView.GetDisplay\\ntheMouseLoc = theDisp.GetMouseLoc\\ntheDisp.PanTo(theMouseLoc)\"\n)\n\n(Script.71\n Name: \"View.UnionUpdate\"\n SourceCode: \"theView = av.GetActiveDoc\\ntheTheme = theView.GetEditableTheme\\nenabled = FALSE\\nif (theTheme <> nil) then\\n SELF.SetLabel(\\\"U&nion Features\\\")\\n SELF.SetHelpTopic(\\\"Union_Features\\\")\\n SELF.SetHelp(\\\"Unions the selected features to create a new feature\\\")\\n fCount = theTheme.GetFTab.GetSelection.Count \\n theType = theTheme.GetFTab.FindField(\\\"Shape\\\").GetType\\n enabled = ((fcount > 1) and ((theType = #FIELD_SHAPEPOLY) or\\n (theType = #FIELD_SHAPELINE))) \\n else\\n SELF.SetLabel(\\\"U&nion Graphics\\\")\\n SELF.\nSetHelpTopic(\\\"Union_Graphics\\\")\\n SELF.SetHelp(\\\"Unions the selected graphics to create a new graphic\\\")\\n theGraphics = theView.GetGraphics.GetSelected\\n gcount = theGraphics.Count\\n if (gcount > 1) then\\n dim2 = 0\\n dim1 = 0\\n dim0 = 0\\n for each gra in theGraphic s\\n dim = gra.GetShape.GetDimension\\n if ((gra.Is(GraphicText).not) and (gra.Is(GraphicGroup).not)) then\\n if (dim = 2) then\\n dim2 = dim2 + 1\\n end\\n if (dim = 1) then\\n dim1 = dim1 + 1\\n end\\n\n end\\n end\\n enabled = ((gcount = dim2) or (gcount = dim1))\\n end\\nend\\n\\nSELF.SetEnabled(enabled)\\n\"\n)\n\n(Script.72\n Name: \"Script.ShowVariables\"\n SourceCode: \"theScript = av.GetActiveDoc\\ntheScript.ShowVariables\"\n)\n\n(Script.73\n Name: \"DNR.Properties. List.Update\"\n SourceCode: \"' Name: DNR.Properties.List.Update\\n'\\n' Author: Timothy N. Loesch\\n' Minnesota Department of Natural Resources\\n' 500 Lafayette Road - Box 11\\n' St. Paul, MN 55155\\n' tim.loesch@dnr.state.mn.us\\n' \\n' Date: Wed Nov 18 09:16:40 1998\\n' Revised by: \\n' Revision Date: \\n' Revisions: \\n' -------------------------------------------------------------------\\n' Description: This script updates the project properties sheet values \\n' Requires: \\n' Runs: \\n' Run by: \\n' Self\n: \\n' Returns: \\n' -------------------------------------------------------------------\\n\\nDEBUG = true\\nDEBUGNOT = false\\ntheVTAB = VTAB.Make(\\\"$TEMP/sets.dbf\\\".asfilename,false,false)\\nvarfield = theVTab.Findfield(\\\"ENVVAR\\\")\\nvalfield = theVTab.Findfield(\\\"Value\\\")\\ndescfield = theVTab.Findfield(\\\"Desc\\\")\\nself.definefromVTab(theVTAB,{descfield,varfield,valfield},false)\\nself.setfieldnamesvisible(true)\\nself.sortascending(false)\\nself.fitcolumns(0..2,true)\\n\"\n) \n\n(Script.74\n Name: \"View.TabularThemesUpdate\"\n SourceCode: \"theView = av.GetActiveDoc\\nfor each t in theView.GetActiveThemes\\n if (t.HasTable) then\\n SELF.SetEnabled(TRUE)\\n return nil\\n end\\nend\\nSELF.SetEnabled(FALSE)\\n\"\n)\n\n(Script.75\n Name: \"View.SubtractUpdate\"\n SourceCode: \"theView = av.GetActiveDoc\\ntheTheme = theView.GetEditableTheme\\nenabled = FALSE\\nif (theTheme <> nil) then\\n SELF.SetLabel(\\\"&Subtract Features\\\")\\n SELF.SetHelpTopic(\\\"Subtract_Features\\\")\\n fCount = theTheme.GetFTab.Ge tSelection.Count\\n shapeClass = theTheme.GetFTab.FindField(\\\"shape\\\").GetType\\n enabled = ((fcount = 2) and (shapeClass = #FIELD_SHAPEPOLY))\\nelse\\n SELF.SetLabel(\\\"&Subtract Graphics\\\")\\n SELF.SetHelpTopic(\\\"Subtract_Graphics\\\")\\n theGraphics = theView.GetGraphics.GetSelected\\n gcount = theGraphics.Coun\nt\\n if (gcount = 2) then\\n dim2 = 0\\n for each gra in theGraphics\\n dim = gra.GetShape.GetDimension\\n if ((dim = 2) and (gra.Is(GraphicText).not) and (gra.Is(GraphicGroup).not)) then \\n dim2 = dim2 + 1\\n end \\n end\\n enabled = (dim2 = 2) \\n end\\nend\\n\\nSELF.SetEnabled(enabled)\"\n)\n\n(Script.76\n Name: \"View.ClearGraphics\"\n SourceCode: \"theView = av.GetActiveDoc\\nfor each t in theView.GetActiveThemes\\n t.GetGraphics.SetVisible(true)\\n t.GetGraphics.Invalidate\\n t.GetGraphics.Empty\\nend\\nav.GetProject.SetModified(true)\"\n)\n\n(Script.77\n Name: \"Table.Index\"\n SourceCode: \"theTable = av.GetActiveDoc\\nf = theTable.GetActiveField\\nif (theTable.GetVTab.IsFieldIndexed(f)) then\\ n theTable.GetVTab.RemoveIndex(f)\\nelse\\n theTable.GetVTab.CreateIndex(f)\\nend\\n\"\n)\n\n(Script.78\n Name: \"Script.Cut\"\n SourceCode: \"theScript = av.GetActiveDoc\\ntheScript.CutSelected\"\n)\n\n(Script.79\n Name: \"Project.Cascade\"\n SourceCode: \"av.CascadeWindows\"\n)\n\n(Script.80\n Name: \"Layout.ZoomInTool\"\n SourceCode: \"av.GetProject.SetModified(true)\\ntheLayout = av.GetActiveDoc\\nr = theLayout.ReturnUserRect\\nd = theLayout.GetDisplay\\nif (r.IsNull.not) then\\n d.ZoomToRect(r)\\nelse\\n d.ZoomIn(125)\\n d.PanTo(d.Retur nUserPoint)\\nend\"\n)\n\n(Script.81\n Name: \"Script.New\"\n SourceCode: \"newSEd = SEd.MakeWithGUI(av.GetProject.GetSelectedGUI.GetName)\\nnewSEd.GetWin.Open\"\n)\n\n(Script.82\n Name: \"Table.RedoEdit\"\n SourceCode: \"theTable = av.GetActiveDoc\\ntheTable.GetVTab.Redo\\n\"\n)\n\n(Script.83\n Name: \"View.RemoveThemeLabelsUpdate\"\n SourceCode: \"Self.SetEnabled(false)\\nv = av.GetActiveDoc\\nif (v.GetEditableTheme <> nil) then\\n return nil\\nend\\nfor each t in v.GetVisibleThemes\\n if (t.IsActive) then\\n if (t.GetGraphics.HasLabels) then\\n Self.SetEnabled(true)\\n end\\n end\\nend\"\n)\n\n(Script.84\n Name: \"Script.Replace\"\n SourceCode: \"theScript = av.GetActiveDoc\\n\\nfindString = theScript.GetSelected\\nif (findString = \\\"\\\") then\\n findString = msgbox.input( \\\"Enter find string\\\", \\\"Replace\\\", \\\"\\\")\\n if (findString = nil) then\\n return nil\\n end\\nend\\n\\nif (findstring.count > 20) then\\n show = findstring.left( 20 )+\\\"...\\\"\\nelse\\n show = findstring\\nend\\nshow = show.Substitute( NL, \\\" \\\")\\n\\nreplaceString = msgbox.input( \\\"Replace\\\"++show.quote++\\\"with\\\", \\\"Replace\\\", \\\"\\\")\\nif (replaceString = nil) then\\n return nil\\nend\\n\\nif (msgbox.miniyesno( \\\"Replace all occurrences\n of\\\"++findString++\\\"with\\\"++replaceString+\\\"?\\\", TRUE)) then\\n oldPosition = theScript.ReturnInsertPos\\n theScript.SetInsertPos( 0 ) \\n count = 0 \\n while (theScript.Search(findString ))\\n theScript.Insert( replaceString )\\n count = count + 1\\n end\\n msgbox.info( \\\"Replaced\\\"++findString++\\\"with\\\"++replaceString++count.AsString++\\\"times\\\",\\n \\\"Replace\\\")\\n theScript.SetInsertPos(oldPosition)\\n \\nelseif (theScript.Search(findString)) then\\n theScript.Insert(replaceString)\\n msgbox.info( \\\"Replaced\\\"++find\nString++\\\"with\\\"++replaceString, \\\"Replace\\\")\\n theScript.SetInsertPos( theScript.ReturnInsertPos )\\n\\nelseif (msgbox.miniyesno( \\\"start search at beginning of script?\\\", TRUE)) then\\n oldPosition = theScript.ReturnInsertPos\\n theScript.SetInsertPos(0)\\n if (theScript.Search(findString).not) then\\n msgbox.info( \\\"Could not find\\\"++findString, \\\"\\\")\\n theScript.SetInsertPos( oldPosition )\\n else\\n theScript.Insert(replaceString)\\n theScript.SetInsertPos( theScript.ReturnInsertPos )\\n end\\nelse\\n msgbox.info( \\\"Co\nuld not find\\\"++findString, \\\"\\\")\\nend\\n\"\n)\n\n(Script.85\n Name: \"Graphic.Edit\"\n SourceCode: \"theDoc = av.GetActiveDoc\\ntheDoc.GetGraphics.Edit\"\n)\n\n(Script.86\n Name: \"Layout.ZoomSelected\"\n SourceCode: \"av.GetProject.SetModified(true)\\ntheLayout = av.GetActiveDoc\\nr = theLayout.GetGraphics.ReturnSelecte dExtent\\nr.Scale(1.05)\\ntheLayout.GetDisplay.ZoomToRect(r)\\n\"\n)\n\n(Script.87\n Name: \"View.Select\"\n SourceCode: \"theView = av.GetActiveDoc\\ntheTheme = theView.GetEditableTheme\\nif (theTheme = nil) then\\n theView.Select\\nelse\\n theTheme.GetFTab.BeginTransaction\\n theTheme.Select\\n theTheme.GetFTab.EndTransaction\\nend\\nav.GetProject.SetModified(true)\\n\"\n)\n\n(Script.88\n Name: \"View.ClearSelect\"\n SourceCode: \"theView = av.GetActiveDoc\\nfor each t in theView.GetActiveThemes\\n t.ClearSelection\\n end\"\n)\n\n(Script .89\n Name: \"Chart.ShowSymWin\"\n SourceCode: \"theChart = av.GetActiveDoc\\nif (av.GetSymbolWin.IsOpen.Not) then\\n av.GetSymbolWin.Open\\nend\"\n)\n\n(Script.90\n Name: \"View.Measure\"\n SourceCode: \"theView = av.GetActiveDoc\\np = theView.ReturnUserPolyLine\"\n)\n\n(Script.91\n Name: \"Table.SaveEdits\"\n SourceCode: \"theTable = av.GetActiveDoc\\ntheVTab = theTable.GetVTab\\nif (theVTab.IsBeingEditedWithRecovery.Not) then\\n return nil\\nend\\n\\n'first see if this is actually a Save on an edit theme\\ntheTheme = theTable.GetEditor \\n\\nif (theTheme <> nil) then\\n if (theTheme.Is(FTHEME)) then\\n \\n theView = theTheme.getView\\n \\n if (theView <> nil) then\\n \\n doSave = MsgBox.YesNoCancel(\\\"Save edits to \\\"+theTheme.GetName+\\n \\\"?\\\",\\\"Save Edits\\\",true)\\n if (doSave = nil) then\\n return \nnil\\n end\\n \\n if (doSave.Not) then\\n ' user changed her mind\\n return (nil)\\n end\\n \\n if (theTheme.StopEditing(TRUE).Not) then\\n ' unable to save edits to theme\\n MsgBox.Info(\\\"Unable to Save Edits, please use the Save Edits As option\\\", \\\"\\\")\\n ' remain in the editing state \\n return nil\\n end \\n \\n 'begin editing again\\n theView.SetEditableTheme(theTheme)\\n return nil\\n end\\n end\\nend \\n\\n\\n'this is a save on t\nhe table\\n\\ndoSave = MsgBox.YesNoCancel(\\\"Save Edits to \\\"\\n +theTable.GetName+\\\"?\\\", \\\"Save Edits\\\", True)\\n \\nif (doSave = nil) then\\n return nil\\nend \\n\\nif (doSave.Not) then\\n' user changed her mind\\n return nil\\nend\\n\\nif (theVTab.StopEditingWithRecovery(TRUE).Not) then\\n MsgBox.Info(\\\"Unable to Save Edits, please use the Save Edits As option\\\", \\\"\\\")\\n ' remain in the editing state \\n return nil \\nend\\n' restart editing\\ntheVTab.StartEditingWithRecovery\"\n)\n\n(Script.92\n Name: \"Table.Chart\"\n SourceCode: \"theTable = av.GetActiveDoc\\ntheChart = Chart.MakeUsingDialog(theTable.GetVTab, \\\"Chart\\\")\\nif (theChart <> NIL) then\\n theChart.GetWin.Open\\nen d\\n\"\n)\n\n(Script.93\n Name: \"Chart.Find\"\n SourceCode: \"theChart = av.GetActiveDoc\\nkey = MsgBox.Input(\\\"Find:\\\", \\\"Find\\\", theChart.GetFindString)\\nif (Nil <> key) then\\n rec = theChart.Find(key)\\n if (rec = Nil) then\\n MsgBox.Warning(\\\"No more matches found.\\\",\\\"Find\\\")\\n else\\n theChart.BlinkRecord(rec)\\n theChart.GetWin.Invalidate\\n end\\nend\\n\"\n)\n\n(Script.94\n Name: \"View.SnapToIntersection\"\n SourceCode: \"theView = av.GetActiveDoc\\ntheTheme = theView.GetActiveThemes.Get(0)\\ntheView.SetInteracti veSnapping(theTheme,#POINT_SNAP_INTERSECTION)\\n\"\n)\n\n(Script.95\n Name: \"View.EditMatchUpdate\"\n SourceCode: \"theView = av.GetActiveDoc\\n\\nthemes = theView.GetActiveThemes\\n\\nif (themes.count = 0) then\\n self.SetEnabled(false)\\n return nil\\nend\\n\\nfor each t in themes\\n if ((t.Is( FTHEME)) and (t.GetFTab.IsGeocoded) and not(t.GetFTab.IsEditable)) then\\n self.SetEnabled(true)\\n return nil\\n end\\nend\\n\\nself.SetEnabled(false)\\n\"\n)\n\n(Script.96\n Name: \"View.Add\"\n SourceCode: \"' View.Add\\ntheView = av.Ge tActiveDoc\\nsrcnames = SourceDialog.Show(\\\"\\\")\\nzoom = (theView.GetThemes.Count = 0)\\nuseDD=TRUE\\nisOther=FALSE\\n\\ntheBox=Rect.makexy(-200,-100,200,100)\\nthemeList={}\\nif (srcnames.count = 0) then\\n return(nil)\\nend\\n\\nfor each n in srcnames\\n theTheme=Theme.Make(n)\\n theleg=thetheme.getlegend.clone\\n if (TheBox.contains(theTheme.returnextent).NOT) then\\n useDD=FALSE \\n end\\n if (theTheme.Is(FTheme).Not) then\\n isOther=TRUE\\n end\\n theavlname=\\\" \\\"\\n if (n.getfilename<>NIL) then\\n if (n .\ngetfilename.getextension<>\\\"\\\") then\\n theext=n.getfilename.asstring.right(4)\\n theAVLname=n.getfilename.asstring.substitute(theext,\\\".avl\\\")\\n else\\n aFN=n.getfilename\\n afn=aFN.asstring+\\\".avl\\\"\\n theAVLname=afn\\n end\\n if ((theTheme.is(FTheme)) and (file.exists(theAVLname.asfilename))) then\\n alinefile=textfile.make(theAVLname.asfilename,#FILE_PERM_READ)\\n asource=alinefile.read(alinefile.getsize)\\n alinefile.close\\n if ((asource.contains(\\\"LegExt\\\" ).Not) or (Extension.F\nind(\\\"Spatial Analyst\\\")<>NIL))then\\n theleg=theTheme.getlegend\\n theleg.load(theAVLname.asfilename,#LEGEND_LOADTYPE_ALL)\\n theflds=theleg.getfieldnames\\n for each afld in theflds\\n if (thetheme.getftab.findfield(afld)=NIL) then\\n thetheme.getlegend.setlegendtype(#LEGEND_TYPE_SIMPLE)\\n thetheme.getlegend.singlesymbol\\n end\\n end\\n if ((theflds.count=0) and (theleg.getlegendtype <>#LEGEND_TYPE_SIMPLE)) th en\\n thetheme.getlegend.set\nlegendtype(#LEGEND_TYPE_SIMPLE)\\n thetheme.getlegend.singlesymbol\\n end\\n \\n end\\n end \\n end\\n theView.AddTheme(theTheme)\\nend\\n\\n\\n' Test if it is OK to set the Map Units to DD and then also set DistanceUnits to Miles (feet for StreetMap)\\n'\\nif ((theView.getUnits = #UNITS_LINEAR_UNKNOWN) and (useDD=TRUE)) then\\n theView.setUnits(#UNITS_LINEAR_DEGREES)\\n theView.getDisplay.setDistanceUnits(#UNITS_LINEAR_MILES)\\n theView.InvalidateTOC( theTheme)\\nend\\n\\n' Test if the user added projected dat\na into a projected view\\n'\\nif ((theView.getProjection.isNull.NOT) and (useDD=FALSE)) then\\n if (isOther.Not) then\\n msgbox.warning(\\\"One or more of the data sources you have chosen is not\\\"++\\n \\\"in decimal degrees. This data can't be projected to match this\\\"++\\n \\\"view's projection. The theme(s) will be added but won't display properly.\\\",\\n \\\"Warning: input theme(s) cannot be projected\\\")\\n end\\nend\\n\\nif ((theView.GetActiveThe mes.Count = 0) and (srcnames.Count > 0)) then\\n theView.GetThemes.Get(0).Set\nActive(TRUE)\\nend\\n\\nif (zoom) then\\n theThemes = theView.GetThemes\\n r = Rect.MakeEmpty\\n for each t in theThemes\\n r = r.UnionWith(t.ReturnExtent)\\n end\\n if (r.IsEmpty) then\\n return nil\\n elseif ((r.ReturnSize) = (0@0)) then\\n theView.GetDisplay.PanTo(r.ReturnOrigin)\\n else\\n theView.GetDisplay.SetExtent(r.Scale(1.1))\\n end\\nend\\n\\nav.GetProject.SetModified( TRUE )\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\"\n)\n\n(Script.97\n Name: \"Table.RemoveAllLinks\"\n SourceCode: \"theTable = av.GetActiveDoc\\nif (theTable.GetVTab.IsLinked) then\\n av.GetProject.SetModified(true)\\nend\\ntheTable.GetVTab.UnlinkAll\"\n)\n\n(Script.98\n Name: \"Project.AutoSave\"\n SourceCode: \"' Name: Project.AutoSave\\n'\\n' Headline: Automatically saves the current project every 5 minutes\\n'\\n' Self: \\n'\\n' Returns:\\n'\\n' Description: This script saves the current project every 5 minutes. Before\\n' it saves the project it checks to see if there is any themes or \\n' tables being edited. If so, the save is suspended until the next \\n' go-around.\\n'\\n' The autosave function can be turned off using the PROJECT: FILE: Turn Autosave ON/OFF\\n'\\n' History: 4/11/9\n7 Tim Loesch - Minnesota DNR \\n'\\n\\n' find out if the user is editing a theme or a table\\n' if a something is being edited then we don't want to save\\n' the project until they are done editing..\\n'\\nediting = false\\nif (av.GetProject <> nil) then\\n for each d in av.GetPr oject.GetDocs\\n if (d.Is(View)) then\\n if (d.getEditableTheme <> nil) then\\n editing = true\\n end\\n elseif (d.Is(Table)) then\\n if (d.GetVTab.IsBeingEditedWithRecovery) then\\n editing = true\\n end\\n end\\n end\\nend\\n\\ns\nave_interval = system.getenvvar(\\\"AUTOSAVEINT\\\")\\n\\nif (system.GetEnvVar(\\\"AutoSave\\\").UCase = \\\"ON\\\") then\\n if (av.GetProject <> nil) then\\n theFileName = av.GetProject.GetFileName\\n if ( (theFileName <> nil) and (editing.not) ) then\\n if (av.GetProject.Save) then\\n av.ShowMsg(\\\"Project saved to '\\\" + theFileName.GetBaseName + \\\"'\\\")\\n if (System.GetOS = #SYSTEM_OS_MAC) then\\n Script.Make(\\\"MacClass.SetDocInfo(SELF, Project)\\\").DoIt(theFileName)\\n end\\n end\\n end\\n end\\n av.delay\nedrun(\\\"Project.AutoSave\\\",nil,save_interval.asnumber)\\nend\\n\"\n)\n\n(Script.99\n Name: \"Link.Project\"\n SourceCode: \"theVal = SELF\\nif (not (theVal.IsNull)) then\\n av.GetProject.Import(theVal.AsFileName)\\nend\\n\"\n)\n\n(Script.10 0\n Name: \"Project.Import\"\n SourceCode: \"patterns = {\\\"*.apr\\\", \\\"*.av\\\" }\\nlabels = {\\\"Project (*.apr)\\\", \\\"ArcView 1 view (*.av)\\\"}\\nfiles = FileDialog.ReturnFiles(patterns, labels, \\\"Import\\\", 0)\\ngui = av.GetProject.GetSelectedGUI\\nif (gui.GetType <> \\\"View\\\" ) then\\n GUIName = \\\"View\\\"\\nelse\\n GUIName = gui.GetName\\nend\\n\\nfor each f in files\\n d = View.Import(f)\\n if (d <> nil) then\\n d.SetGUI( GUIName )\\n d.SetName(f.GetBaseName)\\n d.GetWin.Open\\n else\\n av.GetProject.Import(f)\\n end \\nend\"\n)\n\n(Script.101\n Name: \"View.ZoomFullExtent\"\n SourceCode: \"theView = av.GetActiveDoc\\nr = theView.ReturnExtent\\n\\nif (r.IsEmpty) then\\n return nil\\nelseif ( r.ReturnSize = (0@0) ) then\\n theView.GetDisplay.PanTo(r.ReturnOrigin)\\nelse\\n theView.GetDisplay.SetExtent(r.Scale(1.1))\\n av.GetProject.SetModified(true)\\nend\\n\"\n)\n\n(Script.102\n Name: \"View.ZoomOutTool\"\n SourceCode: \"av.GetProject.SetModified(true)\\ntheView = av.GetActiveDoc\\nr = theView.ReturnUserRect\\nd = theView.GetDisplay\\nif (r.IsNull.n ot) then\\n ext = d.ReturnExtent\\n ext.Scale(ext.GetWidth / r.GetWidth)\\n d.ZoomToRect(ext)\\nelse\\n d.ZoomOut(125)\\n d.PanTo(d.ReturnUserPoint)\\nend\"\n)\n\n(Script.103\n Name: \"View.AutoCompleteTool\"\n SourceCode: \"theView = av.GetActiveDoc\\nl = theView.ReturnUserPolyLine\\ntheTheme = theView.GetEditableTheme\\n\\nif (l.IsNull) then\\n return nil\\nelse\\n if (theTheme <> nil) then\\n theTheme.GetFtab.BeginTransaction\\n theTheme.AutoComplete(l)\\n theTheme.GetFtab.EndTransaction\\n end \\n av.GetProject. SetModified(true)\\nend\\n\\n\"\n)\n\n(Script.104\n Name: \"View.SnapToBoundary\"\n SourceCode: \"theView = av.GetActiveDoc\\ntheTheme = theView.GetActiveThemes.Get(0)\\ntheView.SetInteractiveSnapping(theTheme,#POINT_SNAP_BOUNDARY)\\n\"\n)\n\n(Script.105\n Name: \"View.HotLinkUpdate\"\n SourceCode: \"themes = av.GetActiveDoc.GetActiveThemes\\nif (themes.count = 0) then\\n self.SetEnabled( FALSE )\\n return nil\\nend\\n'\\n' there must be some active themes\\n'\\nfor each t in themes\\n if (t.CanHotLink) then\\n if ((t.GetHotField <> n il) and (t.GetHotScriptName <> \\\"\\\")) then\\n self.SetEnabled( TRUE )\\n return nil\\n end\\n end\\nend\\n\\nSelf.SetEnabled( FALSE )\\n\"\n)\n\n(Script.106\n Name: \"Project.RenameUpdate\"\n SourceCode: \"theProject = av.GetActiveDoc\\nhaveOneDoc = theProject.GetSelectedDocs.Count = 1\\n\\nSELF.SetEnabled(haveOneDoc)\\n\\nif (haveOneDoc) then\\n SELF.SetLabel(\\\"&Rename '\\\" + theProject.GetSelectedDocs.Get(0).GetName + \\\"'...\\\")\\nelse\\n SELF.SetLabel(\\\"&Rename...\\\")\\nend\\n\"\n)\n\n(Script.107\n Name: \"Table.Link\"\n Sour ceCode: \"theTable = av.GetActiveDoc\\nnext = theTable.GetWin.GetNextDoc\\ntheTable.GetVTab.Link(theTable.GetActiveField,next.GetVTab,next.GetActiveField)\\n\"\n)\n\n(Script.108\n Name: \"Table.MultiFieldDelete\"\n SourceCode: \"' Name: aanTable.MultiFieldDelete\\n'\\n' Title: Deletes Multiple Fields In A Table\\n'\\n' Topics: Editing a table\\n'\\n' Description: This script gives the user a list of fields to select from and then deletes the \\n' selected fields. The script protects the shape field from deletion and requi res that at least\\n' one other field be left in the table so that the FTab will not become undefined. \\n' WARNING: this script acts directly on the active table, not on a copy. A delete confirmation\\n' routine is included, b\nut once confirmed all deletion requests are final.\\n'\\n' Script by Mike DeLaune, (Email: mike.g.delaune@state.or.us),\\n' Oregon Department of Forestry, 9/23/97.\\n'\\n' Requires: The active document must be an editable table and the VTab must be editable.\\n'\\n' Self: \\n'\\n' Returns: \\n\\n'===========================================================\\n\\n' Check for the shift key, if the shift key is down, pop up instructions for using this script\\n\\nif (System.IsShiftKeyDown) then\\n message =\\n \\\" \\\"+nl+\\n\\\"Multiple Field Delet\ne Instructions:\\\"+nl+nl+\\n\\\"Description: This script gives the user a list of fields to select from\\\"+nl+ \\n\\\"and then deletes the selected fields. The script protects the shape field\\\"+nl+\\n\\\"from deletion and requires that at least one other field be left in the\\\"+nl+\\n\\\"table so that the FTab will not become undefined.\\\"+nl+nl+\\n\\\"WARNING: this script acts directly on the active table, not on a copy. A\\\"+nl+\\n\\\"delete confirmation routine is included, but once confirmed all deletion\\\"+nl+\\n\\\"requests are final.\\\"+nl+nl+\\n\\\"R\nequires: The active document must be an editable table and the VTab must\\\"+nl+\\n\\\"be editable.\\\"+NL+NL+\\n\\\"Script by Mike DeLaune, (Email: mike.g.delaune@state.or.us),\\\"+nl+\\n\\\"Oregon Department of Forestry, 9/23/97.\\\"+nl+nl+\\n\\\"Brief In structions:\\\"+nl+nl+\\n\\\"1. Select fields to delete using a single click to toggle selection, or\\\"+nl+\\n\\\"click and drag for multiple selection.\\\"+nl+nl+\\n\\\"2. Confirm the deletion for each field, or press Yes To All.\\\"\\n \\n msgbox.report(message,\\\"Table MultiField Delete\\\")\\n \\n Clipboard.T\nhe.Empty\\n Clipboard.The.Add(message)\\n Clipboard.The.Update\\n \\n MsgBox.Info(\\\"These instructions were copied to the system clipboard. To print them, open a text editor\\\"++\\n \\\"(like notepad), paste i n the contents of the clipboard, and print them from the text editor.\\\",\\\"PRINT INSTRUCTIONS\\\")\\n\\n return nil\\nend\\n\\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\\n' Ask for User input:\\n'''''''''''''''''''''''''''''''''''''''''''''''''''''''''' \\n\\n' Get the table\\ntheFtab = av.GetActiveDoc\\n\\n' Stops scr\nipt if the active document is not a table.\\nif(theFtab.is(table).not) then\\n msgbox.error(\\\"A table document must be active, bailing.\\\",\\\"Error\\\")\\n exit\\nend\\n\\n' Get the Vtab\\ntheVTa b = theFtab.GetVtab\\n\\n' Check to see if the VTab is editable:\\nif (theVtab.CanEdit.Not) then\\n msgbox.error(\\\"The table is not editable, bailing.\\\",\\\"Error\\\")\\n exit\\nend\\n\\n' Stops editing if currently editing, then restarts.\\nif (theVTab.IsBeingEditedWithRecovery) then\\n theVtab.StopEditingWithRecovery(true)\\nend\\n theVTab.StartEditingWithReco\nvery\\n\\n' Get the list of fields.\\nvfList = theVTab.GetFields\\nflist = List.Make\\n\\n' Make a new list without the shape field.\\nfor each fld in vfList\\n i f ((fld.GetName = \\\"Shape\\\").Not) then\\n flist.Add(fld)\\n end\\nend \\n\\n \\n' END OF THE INITIAL SETUP\\n\\n''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\\n' Ask for User input:\\n'''''''''''''''''''''''''''''''''''''''''''''''''''''''''' \\n\\n' Ask the user which fields to delete.\\nsellist = Msgbox.MultiList(fList,\\\"Select Fields To Delete\\\"+nl+\\\"(s\ningle click to toggle selection,\\\"+nl+\\n\\\" click and drag for multiple selection)\\\",\\\"Multiple Field Delete\\\")\\n\\n' Check to see if some fields were selected, bail if not:\\nif ((nil = sellist) or (sellist.count = 0)) then\\n msgbox.info(\\\"No fields were selected for deletion, bailing.\\\",\\\"Process Status\\\")\\n theVTab.StopEditingWithRecovery(true)\\n exit\\nend\\n\\n\\n' Confirm deletion request\\ndellist = list.make\\nyn = true\\nfor each f in sellist\\n if(yn <> nil) then\\n yn = Msgbox.AllYesNo(\\\"Do you want to delete this field: \\\"\\n \n++f.AsString,\\\"Delete Confirmation\\\",true)\\n end \\n \\n' Shape field deletion not allowed, otherwi se add the field to the deletion list if confirmed:\\n if(f.AsString = \\\"shape\\\") then\\n Msgbox.Error(\\\"Shape field deletion not allowed.\\\",\\\"User attempted to delete shape field\\\")\\n elseif((yn = true) or (yn = nil)) then\\n dellist.add(f)\\n end\\nend 'end the for each\\n\\n' END OF USER INPUT.\\n\\n'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\\n' Begin the deletion process\\n'''''''''''''''''''''''''''''''\n''''''''''''''''''''''''''''''''\\n \\n' Must retain at least one field in ad dition to shape:\\nif((fList.count) = dellist.count) then\\n msgbox.error(\\\"Removing all fields except 'Shape' will make the FTab undefined, bailing.\\\",\\n \\\"RETAIN SHAPE FIELD + ONE OTHER FIELD\\\")\\n theVTab.StopEditingWithRecovery(true)\\n exit\\nend \\n \\n' Remove the fields\\nif (dellist.count > 0) then\\n theVtab.RemoveFields(dellist)\\nend\\n\\n\\n' END OF THE FIELD DELETION PROCESS\\n\\n'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\\n' \n Begin the post-editing cleanup and calculations. \\n' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''\\n\\n' Commit the changes and stop editing\\\"\\ntheVtab.Flush\\ntheVTab.StopEditingWithRecovery(true)\\n\\n\\n\\n\\n\"\n)\n\n(Script.109\n Name: \"SymWin.DisplayFillPanel\"\n SourceCode: \"if ((av.GetSymbolWin.GetPanel = #SYMBOLWIN_PANEL_COLOR).not) then\\n av.GetSymbolWin.SetPanel(#SYMBOLWIN_PANEL_FILL)\\nend\"\n)\n\n(Script.110\n Name: \"Link.Document\"\n SourceCode: \"theVal = SELF\\nif (not (theVal.IsNull)) then\\n theDoc = av.GetProject.FindDoc(theVal)\\n if (nil <> th eDoc) then\\n theDoc.GetWin.Open\\n end\\nend\\n\"\n)\n\n(Script.111\n Name: \"View.UndoEditUpdate\"\n SourceCode: \"theView = av.GetActiveDoc\\nenabled = False\\ntheTheme = theView.GetEditableTheme\\nif (theTheme <> nil) then\\n if (SELF.GetControlSet.Is(Popup)) then\\n SELF.SetLabel(\\\"Undo Feature Edit\\\")\\n else\\n SELF.SetLabel(\\\"&Undo Feature Edit\\\") \\n end\\n SELF.SetHelp(\\\"Undo the last edit to features in a theme\\\")\\n SELF.SetHelpTopic(\\\"Undo_Feature_Edit_on_a_view\\\")\\n if (theTheme.GetFTab.CanUndo) then \\n enabled = True\\n end\\nelse \\n if (SELF.GetControlSet.Is(Popup)) then\\n SELF.SetLabel(\\\"Undo Graphic Edit\\\")\\n else\\n SELF\n.SetLabel(\\\"&Undo Graphic Edit\\\")\\n end \\n SELF.SetHelp(\\\"Undo the last edit to graphics on a view\\\")\\n SELF.SetHelpTopic(\\\"Undo_Graphic_Edit_on_a_view\\\")\\n if (theView.GetGraphics.CanRestoreGraphic) then\\n enabled = True\\n end\\nend\\n\\nself.SetEnabled(enabled)\\n\"\n)\n\n(Script.112\n Name: \"Project.Rename\"\n SourceCode: \"theProject = av.GetProject\\ntheDoc = theProject.G etSelectedDocs.Get(0)\\n\\nname = MsgBox.Input(\\\"New Name:\\\", \\\"Rename\\\", theDoc.GetName)\\nif (nil <> name) then\\n theDoc.SetName(name)\\n theProject.SetSelectedDoc(theDoc,FALSE)\\nend\"\n)\n\n(Script.113\n Name: \"View.HotLink\"\n SourceCode: \"theView = av.GetActiveDoc\\nfound = false\\np = theView.GetDisplay.ReturnUserPoint\\nfor each t in theView.GetActiveThemes\\n if ((t.HasAttributes) and (t.GetHotField <> nil)) then\\n recs = t.FindByPoint(p)\\n for each rec in recs\\n theField = t.GetHotField\\n found = true\\n theVal = t.ReturnValueString(theField.GetName, rec)\\n av.Run(t.GetHotScriptName,theVal)\\n end\\n end\\nend\\nif (not found) then\\n System.Beep\\nend\"\n)\n\n(Script.114\n Name: \"View.RemoveOverlapThemeLabelsUpdate\"\n SourceCode: \"Self.SetEnabled(false)\\nv = av.GetActiveDoc\\nif (v.GetEditableTheme <> nil) then\\n return nil\\nend\\noc = v.GetOverlapLabelColor\\nfor each t in v.GetVisibleThemes\\n if (t.IsActive) then\\n if (t.GetGraphics.HasOverlappingLabels(oc)) then\\n Self.SetEnabl ed(true)\\n end\\n end\\nend\"\n)\n\n(Script.115\n Name: \"View.DeleteThemes\"\n SourceCode: \"theView = av.GetActiveDoc\\neditThm = theView.GetEditableTheme\\nthmList = {}\\nfor each t in theView.GetActiveThemes\\n if (t.CanDeleteFromView) then\\n if (t = editThm) then\\n doSave = MsgBox.YesNoCancel(\\\"Save edits to \\\"+editThm.GetName+\\\"?\\\",\\n \\\"Stop Editing\\\",true)\\n if (doSave = nil) then\\n return nil\\n end\\n if (editThm.StopEditing(doSave).Not) then\\n MsgBox.Info(\\\"Unab le to Save Edits to \\\" \\n + editThm.GetName +\\n \\\", please use the Save Edits As\n option\\\",\\\"\\\")\\n return nil\\n else \\n theView.SetEditableTheme(NIL)\\n end \\n end \\n thmList.Add(t)\\n end\\nend\\n\\nthmList2 = thmlist.clone\\nfor each t in thmList\\n doDelete = MsgBox.AllYesNo(\\\"Are you sure you want to delete theme \\\" + \\n t.asString + \\\"?\\\", \\\"Delete Themes\\\", true)\\n if (doDelete = nil) then \\n break\\n elseif (doDelete) then\\n theView.DeleteTheme(t)\\n thmList2.RemoveObj(t)\\n else\\n thmList2.RemoveObj(t)\\n end\\nend\\n\\nfor each t in thmList2\\n theView.DeleteTheme(t)\\nen\nd\\n\\nav.GetProject.SetModified(true)\\nav.PurgeObjects\"\n)\n\n(Script.116\n Name: \"Table.DeleteRecords\"\n SourceCode: \"theTable = av.GetActiveDoc\\ntheVTab = theTable.GetVTab\\ntheVtab.BeginTransaction\\ntheVTab.RemoveRecords(theVTab.GetSelection.Clone)\\ntheVTab.EndTransaction\"\n)\n\n(Script.117\n Name: \"Layout.Cut\"\n SourceCode: \"theLayout = av.GetActiveDoc\\nif (theLayo ut.GetGraphics.HasSelected) then\\n av.GetProject.SetModified(true)\\nend\\ntheLayout.GetGraphics.CutSelected\\n\"\n)\n\n(Script.118\n Name: \"Table.Copy\"\n SourceCode: \"av.GetActiveDoc.Copy\"\n)\n\n(Script.119\n Name: \"View.AddEvent\"\n SourceCode: \"theView = av.GetActiveDoc\\ntheFTab = EventDialog.Show(theView)\\nif (theFTab <> nil) then\\n theView.AddTheme(FTheme.Make(theFTab))\\n av.GetProject.SetModified(true)\\nend\\n\"\n)\n\n(Script.120\n Name: \"Chart.TwoColumnUpdate\"\n SourceCode: \"theChart = av.GetActiveDoc\\nSELF.SetEnabled( theChart.GetFields.Count = 2) \\n\"\n)\n\n(Script.121\n Name: \"SymWin.DisplayFontPanel\"\n SourceCode: \"if ((av.GetSymbolWin.GetPanel = #SYMBOLWIN_PANEL_COLOR).not) then\\n av.GetSymbolWin.SetPanel(#SYMBOLWIN_PANEL_FONT)\\nend\"\n)\n\n(Script.122\n Name: \"DNR.Properties.Add\"\n SourceCode: \"' Name: DNR.Properties.Add\\n'\\n' Author: Timothy N. Loesch\\n' Minnesota Department of Natural Resources\\n' 500 Lafayette Road - Box 11\\n' St. Paul, MN 55155\\n' tim.loesch@dnr.state.mn.us\\n' \\n' Date: Wed Nov 18 08:13:01 1998\\n' Revised by: \\n' Revision Date: \\n' Revisions: \\n' -------------------------------------------------------------------\\n' Description: This script is used to add a project property\\n' Requires: \\n' Runs: \\n' Run by: \\n' Self: \\n' Returns: \\n' -\n------------------------------------------------------------------\\n\\nDEBUG = true\\nDEBUGNOT = false\\n\\nthedialog = self.GetDialog\\nthelistbox = theDialog.FindByName(\\\"Project Properties lbx\\\")\\n\\nlabels = {\\\"Environ ment Variable\\\",\\\"Variable Value\\\",\\\"Variable Description\\\"}\\ndefaults = {\\\"\\\",\\\"\\\"}\\n\\nvarval = msgbox.multiinput(\\\"Enter New Variable Parameters\\\",\\\"DNR.SetVariable\\\",labels,defaults)\\nif (varval.count < 1) then\\n return nil\\nend\\n\\nthedialog = self.GetDialog\\n\\nthelistbox = theDialog.FindByName(\\\"Project Properties lbx\\\")\\n\\nthe\nvtab = thelistbox.GetVTab\\ndescfield = theVTab.FindField(\\\"DESC\\\")\\nvarfield = theVTab.FindField(\\\"ENVVAR\\\")\\nvalfield = theVTab.FindField(\\\"VALUE\\\")\\n\\n'look to see if this var iable already exists\\nfor each rec in theVTab\\n tmpval = theVTab.ReturnValue(varfield,rec)\\n if (tmpval = varval.get(1)) then\\n msgbox.error(\\\"Environment Variable already exists, Use the Set Default Project Properties to change it\\\",\\\"DNR.SetVariable\\\")\\n return nil\\n end\\nend\\ntheVTab.SetEditable(true)\\ntherec = theVTab.Addrecord\\ntheVTab.SetValue\n(varfield,therec,varval.get(0))\\ntheVTab.SetValue(valfield,therec,varval.get(1))\\ntheVTab.SetValue(descfield,therec,varval.get(2))\\ntheVTab.SetEditable (false)\\ntheVTab.Flush\\ntheListBox.update\\n\"\n)\n\n(Script.123\n Name: \"View.UTM2LATLONG\"\n SourceCode: \"' Name: View.UTM2LATLONG\\n'\\n' Author: Timothy N. Loesch\\n' Date: Tue Jul 28 13:21:15 1998\\n' Revised by: \\n' Revision Date: \\n' Revisions: \\n' -------------------------------------------------------------------\\n' Description: This script displays a lat/long on the screen from a UTM zone 15 point\\n' and displays the DMS and DD versions of the point.\\n' Requires: \\n' Runs: \\n' Run by: \\n' Self: \\ n' Returns: \\n' -------------------------------------------------------------------\\n\\nDEBUG = true\\nDEBUGNOT = false\\n\n\\n'if (System.IsShiftKeyDown) then\\n' theprj = \\n' return nil\\n'end\\n\\ntheView = av.GetActiveDoc\\np = TrnMerc.Make(theView.ReturnExtent)\\np.SetCentralMeridian(-93)\\np.SetReferenceLatitude(0)\\np.SetScale(0.9996)\\np.SetFalseEasting(500000)\\np.SetFalseNorthing(0)\\np.SetSpheroid(#SPHEROID_GRS80)\\n\\nthept = theView.GetDisplay.ReturnUserPoint\\nif (thept = nil) then\\n return nil\\nend\\n\\nxutm = thept.getx.setformat(\\\"dd\\\")\\nyutm = thept.gety.setformat(\\\"dd\\\")\\n\\np.UnprojectPt(thept)\\n\\nlatdd = thept.gety\\nlongdd = thept.getx\\n\\ntmplist = {}\\nfo\nr each num in {latdd,longdd}\\n deg = num.truncate\\n tmp = num - deg\\n tmpmn = (tmp * 60).abs\\n\\n mn = tmpmn.truncate\\n tmp = tmpmn - mn\\n sec = (tmp * 60).round\\n tmplist.add(deg.asstring++mn.asstring++sec.asstring)\\nend\\n\\namsg1 = \\\"Lat/Long (DD) =\\\"++latdd.asstring+\\\",\\\"++longdd.asstring+NL+NL+\\n \\\"Lat/Long (DMS) =\\\"++tmplist.get(0).asstri ng+\\\",\\\"++tmplist.get(1)+NL+\\n \\\" UTM X/Y =\\\"++xutm.asstring+\\\",\\\"++yutm.asstring\\n\\nClipBoard.The.Empty\\nClipBoard.The.Add(amsg1)\\nClipBoard.The.Update\\namsg2 = \\\"These va\nlues have been copied to the ClipBoard.\\\"\\n\\n\\nmsgbox.report(amsg1+NL+NL+NL+amsg2,\\\"Report Latitude/Longitude\\\")\\n\"\n)\n\n(Script.124\n Name: \"Layout.ShowHideGridUpdate\"\n SourceCode: \"theLayout = av.GetActiveDoc\\nif (theLayout.GetDisplay.IsGridVisible) then\\n SELF.SetLabel(\\\"Hide &Grid\\\")\\nelse\\n SELF.SetLabel(\\\"Show &Grid\\\")\\ nend\\n\"\n)\n\n(Script.125\n Name: \"Table.Query\"\n SourceCode: \"theTable = av.GetActiveDoc\\ntheTable.BuildQuery\\n\"\n)\n\n(Script.126\n Name: \"View.SnapTool\"\n SourceCode: \"theView = av.GetActiveDoc\\n\\nc = theView.ReturnUserCircle\\ntheTheme = theView.GetEditableTheme\\n\\nif (c.IsNull.not) then\\n if (theTheme <> nil) then\\n theTheme.SetSnapTolerance(c.GetRadius)\\n end\\nend\"\n)\n\n(Script.127\n Name: \"Chart.PaintTool\"\n SourceCode: \"theChart = av.GetActiveDoc\\naColor = av.GetSymbolWin.ReturnCurrentSymbol(#SYMBOL_FILL).GetCol or\\np = theChart.GetUserPart\\nif (p = Nil) then\\n s = theChart.GetUserSeries\\n if (s <> -1) then\\n theChart.GetChartDisplay.SetSeriesColor(s, aColor)\\n end\\nelse\\n p.SetColor(aColor)\\nend\\n\"\n)\n\n(Script.128\n Name: \"Table.Action\"\n SourceCode: \"av.Run( \\\"Project.AddTable\\\", NIL )\\n\"\n)\n\n(Script.129\n Name: \"Table.SortAscending\"\n SourceCode: \"theTable = av.GetActiveDoc\\ntheTable.Sort(theTable.GetActiveField, False)\\n\"\n)\n\n(Script.130\n Name: \"Layout.New\"\n SourceCode: \"newLayout = Layout.MakeWithGUI(av.GetPro ject.GetSelectedGUI.GetName)\\nnewLayout.GetWin.Open\"\n)\n\n(Script.131\n Name: \"View.CopyGraphics\"\n SourceCode: \"theView = av.GetActiveDoc\\ntheTheme = theView.GetEditableTheme\\n\\nif (theTheme = nil) then\\n theView.GetGraphics.CopySelected\\nelse\\n theTheme.CopySelected\\nend\\n\"\n)\n\n(Script.132\n Name: \"View.LabelThemes\"\n SourceCode: \"theView = av.GetActiveDoc\\ntheTheme = theView.GetActiveThemes.Get(0)\\nAutoLabelDialog.Show(theTheme)\\n\"\n)\n\n(Script.133\n Name: \"Graphic.HasSelectionUpdate\"\n SourceCode: \"theDoc = av.G etActiveDoc\\nSELF.SetEnabled(0 < theDoc.GetGraphics.GetSelected.Count ) \\n\"\n)\n\n(Script.134\n Name: \"View.InteractiveSnapTool\"\n SourceCode: \"theView = av.GetActiveDoc\\n\\nc = theView.ReturnUserCircle\\ntheTheme = theView.GetEditableTheme\\n\\nif (c.IsNull) then\\n return nil\\nelse \\n if (theTheme <> nil) then\\n theTheme.SetInteractiveSnapTolerance(c.GetRadius)\\n end\\nend\\n\"\n)\n\n(Script.135\n Name: \"Project.CustomizeUpdate\"\n SourceCode: \"SELF.SetEnabled( av.IsCustomizable )\"\n)\n\n(Script.136\n Name: \"Project.Arran geIcons\"\n SourceCode: \"av.ArrangeIcons\"\n)\n\n(Script.137\n Name: \"Doc.Open\"\n SourceCode: \"for each d in av.GetProject.GetSelectedDocs\\n d.GetWin.Open\\nend\"\n)\n\n(Script.138\n Name: \"Doc.NewUpdate\"\n SourceCode: \"if (av.GetProject.GetGUIs.count <= 2) then\\n SELF.setEnabled(false)\\nelse\\n self.setEnabled(true)\\n self.setLabel(\\\"&New\\\")\\n self.setHelpTopic(\\\"New_button\\\")\\nend\\n\\n\\n\"\n)\n\n(Script.139\n Name: \"Script.SystemLoad\"\n SourceCode: \"theSEd = av.GetActiveDoc\\ntheScript = ScriptMgr.Show\\nif (nil <> th eScript) then\\n theSEd.Insert(theScript.AsString)\\nend\\n\\n\"\n)\n\n(Script.140\n Name: \"View.UndoEdit\"\n SourceCode: \"theView = av.GetActiveDoc\\ntheTheme = theView.GetEditableTheme\\n\\nif (theTheme <> nil) then\\n theTheme.GetFTab.Undo\\nelse\\n theView.getgraphics.restoregraphic\\nend\\n\\n\"\n)\n\n(Script.141\n Name: \"DNR.ExportProject\"\n SourceCode: \"' Name: DNR.ExportProject\\n'\\n' Author: 'by Dr. Yi Tang GeoSyntec Consultants Atlanta, GA\\n' \\n' Date: Fri Apr 02 15:29:27 1999\\n' Revised by: \\ n' Revision Date: \\n' Revisions: \\n' -------------------------------------------------------------------\\n' Description:This script runs the Export Project DLL. and was created\\n' to export projects and data to a single directory.... \\n' Requires: \\n' Runs: \\n' Run by: \\n' Self: \\n' Returns: \\n' -----------------------------------------------\n--------------------\\n\\nDEBUG = true\\nDEBUGNOT = false\\n\\ntheProject = av.GetProject\\nOldName = theProject.GetFileName\\nif (OldName=nil) then\\n OldName=Fi leName.GetCWD.MakeTmp(\\\"proj\\\",\\\"apr\\\")\\nend\\nNewName = FileDialog.Put(OldName, \\\"*.apr\\\", \\\"New Project Location\\\")\\nif (NewName = nil) then \\n return nil \\nend\\nav.ShowMsg(\\\"Transferring\\\"++OldName.AsString++\\\"Documents and Data. Please be patient...\\\")\\nmyDLL=DLL.Make(\\\"$USEREXT\\\\Avdlls.dll\\\".AsFileName)\\nTransfer=DLLProc.Make(myDLL,\\\"Apro\\\",#DLLPROC_TYPE_VOID,{#DLLPROC_TYPE_STR,#DLL\nPROC_TYPE_STR})\\nTransfer.Call({OldName.asString,Newname.asString})\\nav.ClearMsg \\n\"\n)\n\n(Script.142\n Name: \"Project.ShowH ideSymWin\"\n SourceCode: \"av.GetSymbolWin.Open\"\n)\n\n(Script.143\n Name: \"View.RemoveOverlapThemeLabels\"\n SourceCode: \"v = av.GetActiveDoc\\noc =v.GetOverLapLabelColor\\nfor each t in v.GetVisibleThemes\\n if (t.IsActive) then\\n t.GetGraphics.SelectOverlappingLabels(oc) \\n t.GetGraphics.Invalidate\\nend\\n \\nend\\nv.GetGraphics.ClearSelected\"\n)\n\n(Script.144\n Name: \"View.HasThemesUpdate\"\n SourceCode: \"theView = av.GetActiveDoc\\nSELF.SetEnabled(0 < theView.GetThemes.Count) \\n\"\n)\n\n(Script.145\n Name: \"Table.Cu tUpdate\"\n SourceCode: \"s = av.GetActiveDoc.GetEditString\\nSELF.SetEnabled( s <> nil)\\n\"\n)\n\n(Script.146\n Name: \"Script.FindNextUpdate\"\n SourceCode: \"theScript = av.GetActiveDoc\\nself.SetEnabled( theScript.GetSearchString <> \\\"\\\")\\n\\n\"\n)\n\n(Script.147\n Name: \"View.CutThemes\"\n SourceCode: \"theView = av.GetActiveDoc\\naList = List.Make\\nemptylist = true\\nfor each t in theView.GetActiveThemes\\n if (t.CanDeleteFromView) then\\n aList.Add(t)\\n emptylist = false\\n end\\nend\\nif (emptylist) then\\n return nil\\ne nd\\nav.GetProject.SetModified(true)\\neditThm = theView.GetEditableTheme\\nfor each t in aList\\n if (t = editThm) then\\n doSave = MsgBox.YesNoCancel(\\\"Save edits to \\\"+editThm.GetName+\\n \\\"?\\\",\\\"Stop Editing\\\",true)\\n if (doSave = nil) then\\n return nil\\n end\\n if (editThm.StopEditing(doSave).N\not) then\\n MsgBox.Info(\\\"Unable to Save Edits to \\\" \\n + editThm.GetName +\\n \\\", please use the Save Edits As option\\\",\\\"\\\")\\n return nil\\n else \\n theView.SetEditableTheme(NIL)\\n end \\n end \\nend\\ntheView.CutThemes\"\n)\n\n(Script.148\n Name: \"Layout.TemplateStore\"\n SourceCode: \"theLayout = av.GetActiveDoc\\nt = theLayout.AsTemplate\\nif (t <> nil) then\\n if (t.Edit) then\\n TemplateMgr.Add(t)\\n end\\nend\"\n)\n\n(Script.149\n Name: \"Table.Identify\"\n SourceCode: \"theTable = av.GetActiveDoc\\nrow = theTable.GetUserRow\\nrec = theTable.ConvertRowToRecord(row)\\ntheTable.GetVTab.Identify(rec, theTable.GetName++\\\"-\\\"++rec.AsString)\\n\"\n)\n\n(Script.150\n N ame: \"Chart.Toggle\"\n SourceCode: \"theChart = av.GetActiveDoc\\ntheChart.SetSeriesFromRecords(theChart.IsSeriesFromRecords.Not)\\n\"\n)\n\n(Script.151\n Name: \"TABLE.UTMtoLATLONG\"\n SourceCode: \"' Name: TABLE.UTM2LATLONG\\n'\\n' Author: Timothy N. Loesch\\n' Date: Tue aug 27, 1998\\n' Revised by: \\n' Revision Date: \\n' Revisions: \\n' -------------------------------------------------------------------\\n' Description: This script processes the active table document and converts\\n' utm coordinates to Lat/long in DD and DMS. The X and Y UTM coordinates\\n' are read from fields that the user specifies.\\n' Requires: \\n' Runs: \\n' Run by: \\n' Self: \\n' Returns: \\n' -----------------------------------\n--------------------------------\\n\\nDEBUG = true\\nDEBUGNOT = false\\n\\n'if (System.IsShiftKeyDown) then\\n' theprj = \\n' return nil\\n'end\\n\\ntheVTab = av.GetActiveDoc.GetVTab\\n\\n'p = TrnMerc.Make(theView.ReturnExtent)\\np = TrnMerc.Make(rect.make(0@0,1@1))\\n\\np.SetCentralMeridian(-93)\\np.SetReferenceLatitude( 0)\\np.SetScale(0.9996)\\np.SetFalseEasting(500000)\\np.SetFalseNorthing(0)\\np.SetSpheroid(#SPHEROID_GRS80)\\n\\n\\ntheFieldList = theVTab.GetFields\\nXField = msgbox.listasstring(thefieldlist,\\\"Select X-UTM Field\\\",\\\"TABLE.UTMtoLATLONG\\\"\n)\\nif (XField = nil) then return nil end\\nYField = msgbox.listasstring(thefieldlist,\\\"Select Y-UTM Field\\\",\\\"TABLE.UTMtoLATLONG\\\")\\nif (YField = nil) then return nil end\\n\\nLatDDField = field.make(\\\"LatDD\\\",#FIELD_DECIMAL,7,4)\\nlongddField = field.make(\\\"LongDD\\\",#FIELD_DECIMAL,7 ,4)\\nlatdmsField = field.make(\\\"LatDMS\\\",#FIELD_CHAR,9,0)\\nlongdmsField = field.make(\\\"LongDMS\\\",#FIELD_CHAR,9,0)\\n\\n\\ntheVTAB.SetEditable(true)\\ntheVTAB.AddFields({LongDDField,LatDDField,LongDMSField,LatDMSField})\\n\\nfor each rec in theVTab\\n xutm = theVTab\n.ReturnValue(XField,rec)\\n yutm = theVTab.ReturnValue(YField,rec)\\n thept = point.make(xutm,yutm)\\n p.UnprojectPt(thept)\\n latdd = thept.gety\\n longdd = thept.getx\\n tmplist = {}\\n for each num in {latdd,longdd}\\n deg = num.truncate\\n tmp = num - deg\\n tmpmn = (tmp * 60).abs\\n \\n mn = tmpmn.truncate\\n if (mn.asstring.count = 1) then \\n mnstr = \\\"0\\\"+mn.asstring\\n else\\n mnstr = mn.asstring\\n end\\n tmp = tmpmn - mn\\n sec = (tmp * 60).round\\n if (sec.asstring.count = 1) then\\n s\necstr = \\\"0\\\"+sec.asstring\\n else\\n secstr = sec.asstring\\n end\\n \\n tmplist.add(deg.asstring++mnstr++secstr)\\n end\\n theVtab.SetValue(LatDDField,rec,latdd)\\n theVtab.SetValue(LongDDField,rec,longdd)\\n theV tab.SetValue(LatDMSField,rec,tmplist.get(0))\\n theVtab.SetValue(LongDMSField,rec,tmplist.get(1))\\nend\\n\"\n)\n\n(Script.152\n Name: \"View.DelLastPointUpdate\"\n SourceCode: \"theView = av.GetActiveDoc\\nSELF.SetEnabled(0 < theView.GetActiveThemes.Count) \\nSELF.SetVisible(FALSE)\\nSELF.SetEnabled(FALSE)\\n\\ntheTool = av.GetActiveGUI.GetToolBar.GetActive\\nif (theTool <> nil) then\\n if ((theTool.GetApply = \\\"View.PolyLineTool\\\") or \\n (theTool.GetApply = \\\"View.PolyTool\\\") or\\n (theTool.GetApply = \\\"View.Spli tTool\\\") or\\n (theTool.GetApply = \\\"View.AutoCompleteTool\\\")) then\\n SELF.SetVisible(TRUE)\\n SELF.SetEnabled(TRUE)\\n end\\nend\"\n)\n\n(Script.153\n Name: \"Table.DeleteFieldUpdate\"\n SourceCode: \"theTable = av.GetActiveDoc\\ntheVTab = theTable.GetVTab\\nSELF.SetEnabled(theVTab.IsEditable and theVTab.CanRemoveFields and (theTable.GetActiveField <> NIL) and (theTable.GetActiveField.IsEditable) and not (theTable.GetActiveField.IsTypeShape))\"\n)\n\n(Script.154\n Name: \"WizardBuffer.OpenDialogUpdate\"\n SourceCode: \"theView = av.GetActiveDoc\\nSELF.SetEnabled(false)\\nhasData = ((theView.GetGraphics.Count > 0) or (theView.GetThemes.Count > 0))\\ntheExt = Extension.GetExtensions.Get(\\\"Buffer Wizard\\\")\\ntheUnits = theView.GetUnits\\ntheDistUnits = theView.GetDisplay.GetDistanceUnits\\nif (hasData and (theExt <> nil) and \\n (theUnits <> #UNITS_LINEAR_UNKNOWN) and \\n (theDistUnits <> #UNITS_LINEAR_UNKNOWN)) then\\n SELF.SetEnabled(true)\\nend\\n\"\n)\n\n(Script.155\n Name: \"Layout.Select\"\n SourceCode: \"theLayout = av.GetActiveDo c\\ntheLayout.Select\"\n)\n\n(Script.156\n Name: \"Layout.FramePicture\"\n SourceCode: \"theLayout = av.GetActiveDoc\\nr = theLayout.ReturnUserRect\\nif (r.IsNull.not) then\\n pf = PictureFrame.Make(r)\\n pf.SetDisplay(theLayout.GetDisplay)\\n theLayout.GetGraphics.UnselectAll\\n pf.SetSelected(TRUE)\\n if (pf.Edit(theLayout.GetGraphics)) then\\n theLayout.GetGraphics.AddName(pf)\\n av.GetProject.SetModified(true)\\n end\\nend\"\n)\n\n(Script.157\n Name: \"Layout.ZoomActual\"\n SourceCode: \"av.GetProject.SetModified(true)\\n theLayout = av.GetActiveDoc\\ntheLayout.GetDisplay.ZoomToActual\"\n)\n\n(Script.158\n Name: \"DNR.Properties.Delete\"\n SourceCode: \"' Name: DNR.Properties.Delete\\n'\\n' Author: Timothy N. Loesch\\n' Minnesota Department of Natural Resources\\n' 500 Lafayette Road - Box 11\\n' St. Paul, MN 55155\\n' tim.loesch@dnr.state.mn.us\\n' \\n' Date: Wed Nov 18 08:13:01 1998\\n' Revised by: \\n' Revision Date: \\n' Revisions: \\n' ----------------------------------------------- --------------------\\n' Description: This script is used to delete a project property\\n' Requires: \\n' Runs: \\n' Run by: \\n' Self: \\n' Returns\n: \\n' -------------------------------------------------------------------\\n\\nDEBUG = true\\nDEBUGNOT = false\\n\\nthedialog = self.GetDialog\\nthelistbox = theDialog.FindByName(\\\"Project Properties lbx\\\")\\n\\nthecell = thelistbox.getcurrentlocation\\ntherow = thecell.gety\\nthecol = thecell.getx\\n\\nthefield = thelistbox.GetCurrentField\\nfldname = thefield.getname.lcase\\nthe val = thelistbox.getcurrentvalue\\nif (theval.GetClass.GetClassname = \\\"FIELD\\\") then\\n msgbox.info(\\\"Reselect the Variable you wish to delete and try again\\\",\\\"Delete\n Property\\\")\\n return nil\\nend\\n\\nif (msgbox.yesno(\\\"Are you sure you want to delete\\\"++theval,\\\"Delete Project Property\\\",false)) then\\n thevtab = thelistbox.GetVTab\\n theVTab.SetEditable(true)\\n for each rec in theVTab\\n tmpval = theVTab.ReturnValue(thefield,rec)\\n varval = theVTab.ReturnValue(theVTab.FindField(\\\"VALUE\\\"),rec)\\n if (tmpval = theval) then\\n theVTab.RemoveRecord(rec)\\n theVTab.SetEditable(false)\\n end\\n theVTab.Flush\\n end\\n thelistbox.Update\\n else\\n return nil\\nend\\n\\n' now unset the \nenvironment variable\\nsystem.setenvvar(varval,\\\"\\\")\\n\"\n)\n\n(Script.159\n Name: \"Last4.ShowLastProjects\"\n SourceCode: \"theProject = av.GetActiveDoc\\nctlset = self.GetControlSet\\n\\n'if (_rememberLast = nil) then \\n av.run(\\\"Last4.RestoreState\\\",nil) \\n'end\\n\\nnext = ctlset.FindByScript( \\\"Last4.OpenProject\\\" )\\nif (n ext <> nil) then\\n if (_RememberLast.Count <> 0) then\\n if (next = (\\\"&1\\\"++_RememberLast.Get(0))) then 'UNCHANGED\\n return nil\\n end\\n end\\n while (next <> nil) \\n ctlset.Remove( next )\\n next = ctlset.FindByScript( \\\"Last4.OpenProject\\\" )\\n end\\nend\\n\\npos = ctlset.GetControls.Find( self )\\n\\n ' iterate through the op\nen docs and add them back as menu items\\ncount = 1\\nfor each name in _RememberLast\\n n= ctlset.New( pos )\\n n.setLabel(\\\"&\\\"+count.AsString++name)\\n n.setClick(\\\"L ast4.OpenProject\\\")\\n n.SetName( \\\"Last4\\\" )\\n n.SetHelp(\\\"Opens\\\"++name)\\n pos = pos + 1\\n pos.setformat(\\\"d\\\")\\n count=count+1\\nend\\n\"\n)\n\n(Script.160\n Name: \"View.ToggleGeneralSnap\"\n SourceCode: \"theView = av.GetActiveDoc\\ntheTheme = theView.GetEditableTheme\\n\\nif (theTheme <> nil) then\\n if (theTheme.IsSnapping) then\\n theTheme.SetSnapping(False)\\n else\\n theTheme.SetSnapping(True)\\n end\\nend\"\n)\n\n(Script.161\n Name: \"Table.JoinUpdate\"\n SourceCode: \"theTable = av.GetActiveDoc\\nfld = theTable .GetActiveField\\nnext = theTable.GetWin.GetNextDoc\\n \\nif ((fld = NIL) or (next = NIL)) then\\n SELF.SetEnabled( FALSE )\\n return nil\\nend\\n\\nnextfld = next.GetActiveField\\n\\nif (nextfld = NIL) then \\n SELF.SetEnabled( FALSE )\\n\\nelseif (fld.IsTypeNumber and nextfld.IsTypeNumber) then\\n SELF.SetEnabled( next.GetVTab.IsBase and next.GetVTab.IsBeingEditedWithRecovery.Not)\\n\\nelseif (fld.IsTypeString and nextfld.IsTypeString) then\\n SELF.SetEnabled( next.GetVTab.IsBase and next\n.GetVTab.IsBeingEditedW ithRecovery.Not)\\n\\nelseif (fld.IsTypeShape and nextfld.IsTypeShape) then\\n if ((fld.GetType = #FIELD_SHAPEPOLY) and \\n (nextfld.GetType <> #FIELD_SHAPEPOLY)) then\\n SELF.SetEnabled( FALSE )\\n else\\n SELF.SetEnabled( next.GetVTab.IsBase and next.GetVTab.IsBeingEditedWithRecovery.Not )\\n end\\n\\nelse\\n SELF.SetEnabled( FALSE )\\n\\nend\\n\\n\\n\"\n)\n\n(Script.162\n Name: \"Chart.PropTool\"\n SourceCode: \"theChart = av.GetActiveDoc\\ntheChart.EditChartPart\\n\"\n)\n\n(Script.163\n Name: \"View.CopyThemes\"\n SourceCo de: \"theView = av.GetActiveDoc\\ntheView.CopyThemes\\n\"\n)\n\n(Script.164\n Name: \"Layout.ClearTransformations\"\n SourceCode: \"theLayout = av.GetActiveDoc\\ntheLayout.GetGraphics.ClearTransforms\"\n)\n\n(Script.165\n Name: \"View.HasDataUpdate\"\n SourceCode: \"theView = av.GetActiveDoc\\nSELF.SetEnabled((theView.GetGraphics.Count > 0) or (theView.GetThemes.Count > 0))\\n\"\n)\n\n(Script.166\n Name: \"Table.Paste\"\n SourceCode: \"theTable = av.GetActiveDoc\\n\\ntheTable.GetVtab.BeginTransaction\\ntheTable.Paste\\ntheTable.GetVTab.EndTran saction\"\n)\n\n(Script.167\n Name: \"Layout.Point\"\n SourceCode: \"theLayout = av.GetActiveDoc\\npt = theLayout.GetDisplay.ReturnUserPoint\\ngp = GraphicShape.Make(pt)\\ntheLayout.GetGraphics.UnselectAll\\ngp.SetSelected(TRUE)\\ntheLayout.GetGraphics.Add(gp)\\nav.GetProject.SetModified(true)\\n\"\n)\n\n(Script.168\n Name: \"Chart.ErasePoly\"\n SourceCode: \"theChart = av.GetActiveDoc\\ntheChart.EraseWithPolygon\\n\"\n)\n\n(Script.169\n Name: \"Doc.ActionUpdate\"\n SourceCode: \"SELF.SetEnabled(av.GetProject.GetSelectedDocs.Count > 0)\\nSELF. SetLabel(\\\"P&rint\\\")\\nSELF.SetHelpTopic(\\\"Print_button\\\")\\n\"\n)\n\n(Script.170\n Name: \"View.SnapToVertex\"\n SourceCode: \"theView = av.GetActiveDoc\\ntheTheme = theView.GetActiveThemes.Get(0)\\ntheView.SetInteractiveSnapping(theTheme,#POINT_SNAP_VERTEX)\\n\"\n)\n\n(Script.171\n Name: \"DNR.Properties.Apply\"\n SourceCode: \"' Name: DNR.Properties.Apply\\n'\\n' Author: Timothy N. Loesch\\n' Minnesota Department of Natural Resources\\n' 500 Lafayette Road - Box 11\\n' St. Paul, MN 55155\\n' tim.loesc h@dnr.state.mn.us\\n' \\n' Date: Wed Nov 18 13:37:34 1998\\n' Revised by: \\n' Revision Date: \\n' Revisions: \\n' -------------------------------------------------------------------\\n' Description: This script submits the changes in the dialog to the ini file\\n' Requires: \\n' Runs: \\n' Run by: \\n' Self\n: \\n' Returns: \\n' -------------------------------------------------------------------\\n\\nDEBUG = true\\nDEBUGNOT = false\\n\\ntheDialog = self.getDialog\\n\\ninifile = av.run(\\\"DNR.ReturnIn iFile\\\",nil)\\ninibackup = inifile.clone\\ninibackup.SetExtension(\\\"bak\\\")\\nfile.copy(inifile,inibackup)\\ntheVTab = VTab.Make(\\\"$TEMP/sets.dbf\\\".asfilename,false,false)\\nfile.delete(inifile)\\nf1 = linefile.make(inifile,#file_perm_write)\\n\\nvarfield = theVTab.Findfield(\\\"ENVVAR\\\")\\nvalfield = theVTab.Findfield(\\\"Value\\\")\\ndescfield = theVTab.Findfield(\\\"Desc\n\\\")\\n\\nfor each rec in theVtab\\n var = thevtab.returnvalue(varfield,rec)\\n val = thevtab.returnvalue(valfield,rec)\\n desc = thevtab.returnvalue(descfie ld,rec) \\n f1.WriteELT(var+\\\"=\\\"+val+\\\"=\\\"+desc)\\n system.setenvvar(var,val)\\n if ((var.ucase = \\\"AUTOSAVE\\\") and (val.ucase = \\\"ON\\\")) then\\n av.run(\\\"Project.Autosave\\\",nil)\\n end\\nend \\n\\nf1.close\\n\\ntheDialog.Close\\n\"\n)\n\n(Script.172\n Name: \"View.Layout\"\n SourceCode: \"'View.Layout\\nt = TemplateMgr.Show\\nif (t <> nil) then\\n theView = av.GetActiveDoc\\n \\n '\\n 'Build list of objects used to fill frames\\n '\\n docs = av.GetProject.GetDocs\\n docs.Shuffle(theView, 0)\\n objs = List.Make\\n objs .Add(theView.GetName)\\n objs.Merge(docs)\\n\\n '\\n 'Check if any layouts exist. If so, give user choice of which layout to use.\\n '\\n layouts = List.Make\\n for each d in docs\\n if (d.Is(Layout)) then\\n layouts.Add(d)\\n end\\n end\\n if (layouts.Count = 0) then\\n l = Layout.Make\\n else\\n\n new = Layout.Make\\n name = new.GetName\\n new.SetName(\\\"\\\")\\n layouts.Insert(new)\\n l = MsgBox.List(layouts, \\\"Select a Layout\\\", \\\"View - Layout\\\")\\n if (l = new) then\\n l.SetName(name)\\n else\\n av.GetProject.RemoveDoc(new)\\n end\\n end\\n \\n \\n '\\n ' Format the layout with the selected template\\n ' and fill with objs\\n '\\n if (l <> nil) then\\n l.UseTemplate(t)\\n l.GetGraphics.FillFrames(objs)\\n l.GetWin.Open\\n end\\nend\"\n)\n\n(Script.173\n Name: \"View.Pan\"\n SourceCode: \"av.GetProject.SetModified(true)\\ntheView = av.GetActiveDoc\\ntheView.GetDisplay.Pan\"\n)\n\n(Script.174\n Name: \"Library.VerifyLayer\"\n SourceCode: \"' Name: Library.VerifyLayer\\n' Purpose: To verify the tiles in a layer\\n'\\n\\n'\\n'\\ntheVTab = VTAB.Make(\\\"$ARCHOME/tables/libraries\\\".asfilename,false,false)\\nlibdict = dictionary.make(20)\\nlibnamefield = theVTAB.FindField(\\\"Name\\\")\\nLiblocfield = theVTab.FindField(\\\"Location\\\")\\nfor each rec in theVTAB\\n thelib = theVTAB.ReturnValue(libnamefield,rec)\\n libloc = theVTab.ReturnValue(liblocfield,rec)\\n libdict.add(thelib,libloc)\\nend\\ntmplist = libdict.returnkeys\\ntmplist.sort(true)\\nthelib = msgbox.listasstring(tmplist,\\\"Select L\nibrary\\\",\\\"Lib rary.VerifyLayer\\\")\\nif (thelib = nil) then return nil end\\n\\nthelibloc = libdict.get(thelib)\\nlayerVtab = vtab.make( (thelibloc+\\\"/info/layers\\\").asfilename,false,false)\\nlayerdict = dictionary.make(20)\\nlayernamefield = layerVTAB.findfield(\\\"Name\\\")\\nlayercovfield = layerVTab.Findfield(\\\"Coverage\\\")\\n\\nfor each rec in layervtab\\n layername = LayerVTAb.returnvalue(layernamefield,rec)\\n layercov = LayerVTab.ReturnValue(layercovfield,rec)\\n layerdict.add(layername,layercov)\\nend\\n\\ntmplist = layerdict.ret urnkeys\\ntm\nplist.sort(true)\\nthelayer = msgbox.listasstring(tmplist,\\\"Select Layer\\\",\\\"Library.VerifyLayer\\\")\\nif (thelayer = nil) then return nil end \\nthelayercov = layerdict.get(thelayer)\\n\\nindexVTAB = VTab.Make( (thelibloc+\\\"/info/index.pat\\\").asfilename,false,true)\\nthelayerfield = indexVTab.findfield(thelayer)\\nthelocfield = indexVTab.Findfield(\\\"Location\\\")\\n\\nindexVTab.SetEditable(true)\\nfor each rec in indexVTab\\n thecover = indexVTab.ReturnValue(thelocfield,rec)+\\\"/\\\"+thelayercov\\n if (covera ge.Exists(thecover)) then\\n Inde\nxVTab.SetValue(thelayerfield,rec,\\\"P\\\")\\n else\\n IndexVTab.SetValue(TheLayerField,rec,\\\"N\\\")\\n end\\nend\\nindexVTab.SetEditable(false)\\n\"\n)\n\n(Script.175\n Name: \"Help.Tool\"\n SourceCode: \"av.Help.SetAVFile\\nav.SetHelping(TRUE)\"\n)\n\n(Script.176\n Name: \"Layout.ShowHideGrid\"\n SourceCode: \"theLayout = av.GetActiveDoc\\ntheLayout.GetDisplay.SetGridVisible(theLayout.GetDisplay.IsGridVisible.Not)\\n\"\n)\n\n(Script.177\n Name: \"View.AttributeThemesUpdate\"\n SourceCode: \"theView = av.G etActiveDoc\\nfor each t in theView.GetActiveThemes\\n if (t.HasAttributes) then\\n SELF.SetEnabled(TRUE)\\n return nil\\n end\\nend\\nSELF.SetEnabled(FALSE)\\n\"\n)\n\n(Script.178\n Name: \"Appl.GetExtensionWin\"\n SourceCode: \"av.GetExtensionWin.Show\"\n)\n\n(Script.179\n Name: \"Script.CompileUpdate\"\n SourceCode: \"theSEd = av.GetActiveDoc\\nSELF.SetEnabled( NOT (theSEd.IsCompiled)) \\n\"\n)\n\n(Script.180\n Name: \"View.AddGraphics\"\n SourceCode: \"theView = av.GetActiveDoc\\ntheTheme = theView.GetActiveThemes.Get(0)\\nif (theVie w.GetGraphics.HasSelected) then\\n av.GetProject.SetModified(true)\\nend\\ntheTheme.GetGraphics.Merge(theView.GetGraphics.GetSelected)\\ntheTheme.GetGraphics.RemoveDuplicates\\ntheTheme.GetGraphics.SetVisible(theTheme.IsVisible)\\ntheTheme.GetGraphics.Invalidate\"\n)\n\n(Script.181\n Name: \"Project.Exit\"\n SourceCode: \"theProject = av.GetProject\\n\\nif (nil <> theProject) then \\n if (theProject.IsModified) then\\n if (av.Run(\\\"Project.CheckForEdits\\\",nil).Not) then\\n return nil\\n end \\n res = MsgBox.Save Changes(\\\"Do you want to save changes to \\\" \\n + theProject.GetName + \\\"?\\\", \\\"ArcView\\\", true)\\n if (nil = res) then return nil end\\n if (res) then\\n av.Run(\\\"Project.Save\\\", nil)\\n if (theProject.IsModified) then return nil end\\n end\\n end\\ntheProject.Close\\nend\\n\\nav.Quit\"\n)\n\n(Script.182\n Name: \"View.PopupZoomIn\"\n SourceCode: \"av.GetProject.SetModified(true)\\ntheView = av.GetActiveDoc\\ntheDisp = theView.GetDisplay\\ntheMouseLoc = theDisp.GetMouseLoc\\ntheDisp .PanTo(theMouseLoc)\\ntheDisp.ZoomIn(125)\"\n)\n\n(Script.183\n Name: \"Chart.ToggleLegendUpdate\"\n SourceCode: \"theChart = av.GetActiveDoc\\nif (theChart.GetChartLegend.IsVisible) then\\n SELF.SetLabel(\\\"Hide &Legend\\\")\\nelse\\n SELF.SetLabel(\\\"Show &Legend\\\")\\nend\\n\"\n)\n\n(Script.184\n Name: \"Script.Unembed\"\n SourceCode: \"\\nscripts = av.GetProject.GetScripts\\nscriptlist = scripts.ReturnKeys\\nscriptlist.sort( true )\\nscriptName = MsgBox.ListAsString( scriptlist, \\\"Select script\\\", \\\"UnEmbed\\\" )\\nif (scriptName <> nil) then\\n ' get the script\\n theScript = scripts.Get(scriptName)\\n newSEd = SEd.Make\\n newSEd.SetName( scriptName )\\n newSEd.SetSource( theScript.AsString )\\n newSEd.GetWin.Open\\n \\n ' Remove it from the embedded script list\\n scripts.Remove( scriptName )\\nend\"\n)\n\n(Script.185\n Name: \"View.PolylineTool\"\n SourceCode: \"theView = av.GetActiveDoc\\nl = theView.ReturnUserPolyLine\\ntheTheme = theView.GetEditableTheme\\n\\nif (l.IsNull) then\\n return nil\\nelse\\n if (theTheme <> nil) then\\n theTheme.GetFtab .BeginTransaction\\n thePrj = theView.GetProjection\\n if (thePrj.IsNull.Not) then\\n l = l.ReturnUnprojected(thePrj)\\n end\\n theField = theTheme.GetFTab.FindField(\\\"Shape\\\")\\n rec = theTheme.GetFTab.AddRecord\\n theTheme.GetFTab.SetValue(theField, rec, l)\\n theTheme.GetFTab.GetSelection.ClearAll\\n theTheme.GetFTab.Ge\ntSelection.Set(rec)\\n theTheme.GetFTab.UpdateSelection\\n theTheme.GetFtab.EndTransaction\\n else\\n gl = GraphicShape.Make(l)\\n theView.GetGraphics.Unselect All\\n gl.SetSelected(TRUE)\\n theView.GetGraphics.Add(gl)\\n end\\n av.GetProject.SetModified(true)\\nend\"\n)\n\n(Script.186\n Name: \"View.MergeUpdate\"\n SourceCode: \"' View.MergeUpdate\\ntheView = av.GetActiveDoc\\ntheTheme = theView.GetEditableTheme\\nenabled = FALSE\\nif (theTheme <> nil) then\\n fCount = theTheme.GetFTab.GetSelection.Count\\n shapeClass = theTheme.GetFTab.GetShapeClass\\n enabled = ((fcount > 1) and (shapeClass.IsSubClassOf(MultiPoint))) \\nend\\n\\nSELF.SetEnabled(enabled)\\n\\n\\n\"\n)\n\n(Script.1 87\n Name: \"Project.About\"\n SourceCode: \"av.About\"\n)\n\n(Script.188\n Name: \"Chart.NewUpdate\"\n SourceCode: \"SELF.SetLabel(\\\"&New\\\")\\nSELF.SetHelpTopic(\\\"New_button\\\")\\n\\nSELF.SetEnabled(FALSE)\\nfor each d in av.GetProject.GetDocs\\n if (d.Is(Table)) then\\n SELF.SetEnabled(TRUE)\\n break\\n end\\nend\\n\"\n)\n\n(Script.189\n Name: \"View.Properties\"\n SourceCode: \"theView = av.GetActiveDoc\\ntheView.Edit\"\n)\n\n(Script.190\n Name: \"Project.SetProjectWorkDir\"\n SourceCode: \"theProject = av.GetProject\\n\\nnewDir = MsgBox.Inpu t( \\\"Specify new work directory\\\", \\\"Work Directory\\\", theProject.GetWorkDir.GetFullName)\\nif (newDir = nil) then\\n return nil\\nelseif (newDir.AsFileName.IsDir.Not) then\\n MsgBox.Error( newDir.AsFileName.GetFullName++\\\"is not a directory\\\", \\\"\\\")\\nelseif (File.IsWritable(newDir.AsFileName).Not) then\\n MsgBox.Error( newDir.AsFileName.GetFullName++\\\"is not writable\\\", \\\"\\\")\\nelse\\n theProject.SetWorkDir( newDir.AsFileName )\\nend\\n\"\n)\n\n(Script.191\n Name: \"Layout.AddTextFile\"\n SourceCode: \"' Name: Layout.Ad dTextFile\\n'\\n' Headline: Adds the contents of a Text file to a Text box in a Layout\\n'\\n' Self: \\n'\\n' Returns:\\n'\\n' Description: This script allows the user to add a text box on a layout and then\\n' insert the contents of a text file. The box uses a Courier fixed\\n' width font as the default but this can be changed at the user's convience\\n'\\n' History: 4/10/97 Tim Loesch - Minnesota DNR \\n'\\n\\nthedoc = av.getactivedoc\\n\\nfile1 = filedialog.show(\\\"*.*\\\",\\\"Select Text File\\\", \\\"Add\n Text File to Layout\\\")\\nif (file1=nil) then return nil end\\n\\nf1= linefile.make(file1,#file_perm_read)\\n\\ncomments = \\\"\\\"\\nfor each i in 1..f1.getsize\\n rec = f1.readelt\\n comments = comments +NL+rec\\nend\\n\\n\\npt = theDoc.GetDisplay.ReturnUserPoint