/3.2 (Extension.1 Name: "Sensitive Areas Model, Version 1.0" Dependencies: "$AVEXT/Spatial.avx\n" FirstRootClassName: "List" Roots: 2 Roots: 3 Roots: 244 Roots: 245 Roots: 253 Roots: 254 Roots: 255 Roots: 256 Roots: 257 Roots: 258 Roots: 259 Roots: 260 Roots: 261 Roots: 262 Roots: 263 Roots: 264 Roots: 265 Roots: 266 Roots: 266 Roots: 266 Roots: 267 Roots: 268 Roots: 269 Roots: 270 Roots: 271 Roots: 272 Roots: 273 Roots: 274 Roots: 275 Roots: 276 Roots: 277 Roots: 278 Roots: 279 Roots: 280 Roots: 281 Roots: 282 Roots: 283 Roots: 284 Roots: 285 Roots: 286 Roots: 287 Roots: 288 Roots: 289 Roots: 290 Roots: 291 Roots: 292 Roots: 293 Roots: 294 Roots: 295 Roots: 296 Roots: 297 Roots: 298 Roots: 299 Roots: 300 Roots: 301 Roots: 302 Roots: 303 Roots: 304 Roots: 305 Roots: 306 Roots: 307 Roots: 308 Roots: 309 Roots: 310 Roots: 311 Version: 32 About: "The Sensitive Areas Model (SAM), is a spatial analysis tool that allows multiple-theme overlays, theme buffering, and weighting of input themes to analyze sensitive resource areas within National Park Service units." InstallScript: 312 UninstallScript: 313 ExtVersion: 1 ) (List.2 ) (List.3 Child: 4 Child: 50 Child: 209 Child: 224 Child: 230 ) (AVDLog.4 Name: "DirBrowser.Dialog" X: 11 Y: 43 W: 334 H: 328 ConstrainedControlNames: 5 ConstrainedControlNames: 6 ConstrainedControlNames: 7 ConstrainedControlNames: 8 Constraints: 9 Constraints: 10 Constraints: 11 Constraints: 12 Server: 13 ControlPanel: 14 ObjectTag: 48 Title: "Directory Browser" EscapeEnabled: 1 Modal: 1 Resizable: 1 AlwaysOnTop: 1 HasTitleBar: 1 Closeable: 1 Close: "dlg.DirBrowser.Close" Open: "dlg.DirBrowser.Open" DefaultButton: 49 ) (AVStr.5 S: "lbnOK" ) (AVStr.6 S: "lbnCancel" ) (AVStr.7 S: "aButton4" ) (AVStr.8 S: "btnDir" ) (Numb.9 N: 85.00000000000000 ) (Numb.10 N: 85.00000000000000 ) (Numb.11 N: 85.00000000000000 ) (Numb.12 N: 85.00000000000000 ) (Nil.13 ) (CPanel.14 Child: 15 Child: 17 Child: 18 Child: 19 Child: 20 Child: 21 Child: 23 Child: 24 Child: 25 Child: 27 Child: 29 Child: 31 Child: 33 ResBox: 35 ResBox: 36 ResBox: 37 ResBox: 38 ResBox: 39 ResBox: 40 ResBox: 41 ResBox: 42 ResBox: 43 ResBox: 44 ResBox: 45 ResBox: 46 ResBox: 47 Listening: 1 ) (AVLBox.15 InternalName: "lbxDirs" Help: " " NextControl: 13 ContentKind: 4 Constraints: 0x55 ColumnCount: 1 Listening: 1 VerticalScroll: 1 Select: "dlg.DirBrowser.lbx.Select" SelectionStyle: 16 Apply: "dlg.DirBrowser.Driver" ) (AVEnum.16 Name: "LISTBOX_SELECTION_SINGLECELL" ) (AVCBBox.17 InternalName: "cbxDrives" Help: "Available drives//" NextControl: 13 ContentKind: 4 Constraints: 0x55 Listening: 1 Select: "dlg.DirBrowser.Driver" ) (LButn.18 InternalName: "lbnOK" Label: "OK" Click: "dlg.DirBrowser.Driver" ) (LButn.19 InternalName: "lbnCancel" Label: "Cancel" Click: "dlg.DirBrowser.Driver" ) (TextLabel.20 InternalName: "driveLabel" Constraints: 0x55 Label: "Drives:" Listening: 1 ) (TextLine.21 InternalName: "tlnPath" Help: "Full path to current directory//" Label: " " Constraints: 0x55 Listening: 1 ReadOnly: 1 TextType: 22 Apply: "dlg.DirBrowser.Driver" NextControl: 13 ) (AVEnum.22 Name: "TEXTLINE_TYPE_ALL" ) (TextLabel.23 InternalName: "aTextLabel2" Constraints: 0x55 Label: "Directories in current directory:" Listening: 1 ) (TextLabel.24 InternalName: "aTextLabel1" Constraints: 0x55 Label: "Path to current directory:" Listening: 1 ) (Butn.25 InternalName: "aButton4" Help: "Up One Level //" Icon: 26 Click: "dlg.DirBrowser.Up" ) (AVIcon.26 Name: "up.gif" Data: 4e442049 6d616765 0001000f 000d0000 Data: 00c30f0f 00000000 000f0f0f 0f0f0f0f Data: 0f0f0011 0e110e11 000f0f0f 0f0f0f0f Data: 00000000 00000000 00000000 00000f00 Data: 0e110e11 0e110e11 0e110e11 0e000011 Data: 0e110e00 0e110e11 0e110e11 00000e11 Data: 0e000000 0e110e11 0e110e00 00110e00 Data: 00000000 0e110e11 0e110000 0e110e11 Data: 00110e11 0e110e11 0e000011 0e110e00 Data: 0e110e11 0e110e11 00000e11 0e110000 Data: 00000000 0e110e00 00110e11 0e110e11 Data: 0e110e11 0e110000 0e110e11 0e110e11 Data: 0e110e11 0e000000 00000000 00000000 Data: 00000000 00000003 00000000 80808080 Data: 00008080 00008000 00808000 00808000 Data: 80808040 00404000 80ff0040 804000ff Data: 804000ff ffffc0c0 c0ff0000 ffff0000 Data: ff0000ff ff0000ff ff00ffff ff8000ff Data: 8080ffff 8080ffff 0080ff80 40c0dcc0 Data: a6caf004 04040808 080c0c0c 11111116 Data: 16161c1c 1c222222 29292955 55554d4d Data: 4d424242 393939ff 7c80ff50 50d60093 Data: ccecffef d6c6e7e7 d6ada990 33000066 Data: 00009900 00cc0000 00330033 33006633 Data: 00993300 cc3300ff 33000066 00336600 Data: 66660099 6600cc66 00ff6600 00990033 Data: 99006699 00999900 cc9900ff 990000cc Data: 0033cc00 66cc0099 cc00cccc 00ffcc00 Data: 66ff0099 ff00ccff 00000033 33003366 Data: 00339900 33cc0033 ff003300 33333333 Data: 33663333 993333cc 3333ff33 33006633 Data: 33663366 66339966 33cc6633 ff663300 Data: 99333399 33669933 999933cc 9933ff99 Data: 3300cc33 33cc3366 cc3399cc 33cccc33 Data: ffcc3333 ff3366ff 3399ff33 ccff33ff Data: ff330000 66330066 66006699 0066cc00 Data: 66ff0066 00336633 33666633 66993366 Data: cc3366ff 33660066 66336666 66666699 Data: 6666cc66 66009966 33996666 99669999 Data: 66cc9966 ff996600 cc6633cc 6699cc66 Data: cccc66ff cc6600ff 6633ff66 99ff66cc Data: ff66ff00 cccc00ff 00999999 33999900 Data: 99cc0099 00009933 33996600 99cc3399 Data: ff009900 66993366 99663399 996699cc Data: 6699ff33 99339999 66999999 9999cc99 Data: 99ff9999 00cc9933 cc9966cc 6699cc99 Data: cccc99ff cc9900ff 9933ff99 66cc9999 Data: ff99ccff 99ffff99 0000cc33 00996600 Data: cc9900cc cc00cc00 33993333 cc6633cc Data: 9933cccc 33ccff33 cc0066cc 3366cc66 Data: 66999966 cccc66cc ff669900 99cc3399 Data: cc6699cc 9999cccc 99ccff99 cc00cccc Data: 33cccc66 cccc99cc cccccccc ffcccc00 Data: ffcc33ff cc66ff99 99ffcccc ffccffff Data: cc3300cc 6600ff99 00ff0033 cc3333ff Data: 6633ff99 33ffcc33 ffff33ff 0066ff33 Data: 66ff6666 cc9966ff cc66ffff 66cc0099 Data: ff3399ff 6699ff99 99ffcc99 ffff99ff Data: 00ccff33 ccff66cc ff99ccff ccccffff Data: ccff33ff ff66ffcc 99ffffcc ffffff66 Data: 6666ff66 ffff6666 66ffff66 ff66ffff Data: a500215f 5f5f7777 77000200 08000500 Data: 18000000 00000000 00000000 00 ) (AVIBox.27 InternalName: "icoOpened" Constraints: 0x55 Icon: 28 Listening: 1 ) (AVIcon.28 Name: "opened.gif" Data: 4e442049 6d616765 00010011 000e0000 Data: 00ee0e0e 0e0e0e0e 0e0e0e0e 0e0e0e0e Data: 0e0e0e0e 0e0e0e01 01010101 0e0e0e0e Data: 0e0e0e0e 0e0e0e01 0e0e0e0e 0e010e0e Data: 0e0e0e0e 0e0e0e01 0e0f110f 110f0e01 Data: 01010101 010e0e0e 010e110f 110f110f Data: 0e0e0e0e 0e01000e 0e010e0f 110f110f Data: 110f110f 110f0100 0e010101 01010101 Data: 01010101 01011101 000e010e 0e0e0e0e Data: 0e0e0e0e 0e01000f 01000e01 0e0f110f Data: 110f110f 110f1100 0101000e 0e010e0f Data: 110f110f 110f110f 01000100 0e0e010e Data: 110f110f 110f110f 110f0001 000e0e0e Data: 010e110f 110f110f 110f1101 00000e0e Data: 0e010101 01010101 01010101 0100000e Data: 0e0e0e00 00000000 00000000 00000000 Data: 00000300 00000080 80808000 00808000 Data: 00800000 80800000 80800080 80804000 Data: 40400080 ff004080 4000ff80 4000ffff Data: ffc0c0c0 ff0000ff ff0000ff 0000ffff Data: 0000ffff 00ffffff 8000ff80 80ffff80 Data: 80ffff00 80ff8040 c0dcc0a6 caf00404 Data: 04080808 0c0c0c11 11111616 161c1c1c Data: 22222229 29295555 554d4d4d 42424239 Data: 3939ff7c 80ff5050 d60093cc ecffefd6 Data: c6e7e7d6 ada99033 00006600 00990000 Data: cc000000 33003333 00663300 993300cc Data: 3300ff33 00006600 33660066 66009966 Data: 00cc6600 ff660000 99003399 00669900 Data: 999900cc 9900ff99 0000cc00 33cc0066 Data: cc0099cc 00cccc00 ffcc0066 ff0099ff Data: 00ccff00 00003333 00336600 33990033 Data: cc0033ff 00330033 33333333 66333399 Data: 3333cc33 33ff3333 00663333 66336666 Data: 33996633 cc6633ff 66330099 33339933 Data: 66993399 9933cc99 33ff9933 00cc3333 Data: cc3366cc 3399cc33 cccc33ff cc3333ff Data: 3366ff33 99ff33cc ff33ffff 33000066 Data: 33006666 00669900 66cc0066 ff006600 Data: 33663333 66663366 993366cc 3366ff33 Data: 66006666 33666666 66669966 66cc6666 Data: 00996633 99666699 66999966 cc9966ff Data: 996600cc 6633cc66 99cc66cc cc66ffcc Data: 6600ff66 33ff6699 ff66ccff 66ff00cc Data: cc00ff00 99999933 99990099 cc009900 Data: 00993333 99660099 cc3399ff 00990066 Data: 99336699 66339999 6699cc66 99ff3399 Data: 33999966 99999999 99cc9999 ff999900 Data: cc9933cc 9966cc66 99cc99cc cc99ffcc Data: 9900ff99 33ff9966 cc9999ff 99ccff99 Data: ffff9900 00cc3300 996600cc 9900cccc Data: 00cc0033 993333cc 6633cc99 33cccc33 Data: ccff33cc 0066cc33 66cc6666 999966cc Data: cc66ccff 66990099 cc3399cc 6699cc99 Data: 99cccc99 ccff99cc 00cccc33 cccc66cc Data: cc99cccc ccccccff cccc00ff cc33ffcc Data: 66ff9999 ffccccff ccffffcc 3300cc66 Data: 00ff9900 ff0033cc 3333ff66 33ff9933 Data: ffcc33ff ff33ff00 66ff3366 ff6666cc Data: 9966ffcc 66ffff66 cc0099ff 3399ff66 Data: 99ff9999 ffcc99ff ff99ff00 ccff33cc Data: ff66ccff 99ccffcc ccffffcc ff33ffff Data: 66ffcc99 ffffccff ffff6666 66ff66ff Data: ff666666 ffff66ff 66ffffa5 00215f5f Data: 5f777777 00020008 00050018 00000000 Data: 00000000 00000000 ) (AVIBox.29 InternalName: "icoClosed" Invisible: 1 Constraints: 0x55 Icon: 30 Listening: 1 ) (AVIcon.30 Name: "closed.gif" Data: 4e442049 6d616765 0001000f 000d0000 Data: 00c30e0e 01010101 010e0e0e 0e0e0e0e Data: 0e0e010f 110f110f 010e0e0e 0e0e0e0e Data: 010f110f 110f110f 01010101 01010e01 Data: 0e0e0e0e 0e0e0e0e 0e0e0e0e 0100010e Data: 110f110f 110f110f 110f1101 00010e0f Data: 110f110f 110f110f 110f0100 010e110f Data: 110f110f 110f110f 11010001 0e0f110f Data: 110f110f 110f110f 0100010e 110f110f Data: 110f110f 110f1101 00010e0f 110f110f Data: 110f110f 110f0100 010e110f 110f110f Data: 110f110f 11010001 01010101 01010101 Data: 01010101 01000e00 00000000 00000000 Data: 00000000 00000003 00000000 80808080 Data: 00008080 00008000 00808000 00808000 Data: 80808040 00404000 80ff0040 804000ff Data: 804000ff ffffc0c0 c0ff0000 ffff0000 Data: ff0000ff ff0000ff ff00ffff ff8000ff Data: 8080ffff 8080ffff 0080ff80 40c0dcc0 Data: a6caf004 04040808 080c0c0c 11111116 Data: 16161c1c 1c222222 29292955 55554d4d Data: 4d424242 393939ff 7c80ff50 50d60093 Data: ccecffef d6c6e7e7 d6ada990 33000066 Data: 00009900 00cc0000 00330033 33006633 Data: 00993300 cc3300ff 33000066 00336600 Data: 66660099 6600cc66 00ff6600 00990033 Data: 99006699 00999900 cc9900ff 990000cc Data: 0033cc00 66cc0099 cc00cccc 00ffcc00 Data: 66ff0099 ff00ccff 00000033 33003366 Data: 00339900 33cc0033 ff003300 33333333 Data: 33663333 993333cc 3333ff33 33006633 Data: 33663366 66339966 33cc6633 ff663300 Data: 99333399 33669933 999933cc 9933ff99 Data: 3300cc33 33cc3366 cc3399cc 33cccc33 Data: ffcc3333 ff3366ff 3399ff33 ccff33ff Data: ff330000 66330066 66006699 0066cc00 Data: 66ff0066 00336633 33666633 66993366 Data: cc3366ff 33660066 66336666 66666699 Data: 6666cc66 66009966 33996666 99669999 Data: 66cc9966 ff996600 cc6633cc 6699cc66 Data: cccc66ff cc6600ff 6633ff66 99ff66cc Data: ff66ff00 cccc00ff 00999999 33999900 Data: 99cc0099 00009933 33996600 99cc3399 Data: ff009900 66993366 99663399 996699cc Data: 6699ff33 99339999 66999999 9999cc99 Data: 99ff9999 00cc9933 cc9966cc 6699cc99 Data: cccc99ff cc9900ff 9933ff99 66cc9999 Data: ff99ccff 99ffff99 0000cc33 00996600 Data: cc9900cc cc00cc00 33993333 cc6633cc Data: 9933cccc 33ccff33 cc0066cc 3366cc66 Data: 66999966 cccc66cc ff669900 99cc3399 Data: cc6699cc 9999cccc 99ccff99 cc00cccc Data: 33cccc66 cccc99cc cccccccc ffcccc00 Data: ffcc33ff cc66ff99 99ffcccc ffccffff Data: cc3300cc 6600ff99 00ff0033 cc3333ff Data: 6633ff99 33ffcc33 ffff33ff 0066ff33 Data: 66ff6666 cc9966ff cc66ffff 66cc0099 Data: ff3399ff 6699ff99 99ffcc99 ffff99ff Data: 00ccff33 ccff66cc ff99ccff ccccffff Data: ccff33ff ff66ffcc 99ffffcc ffffff66 Data: 6666ff66 ffff6666 66ffff66 ff66ffff Data: a500215f 5f5f7777 77000200 08000500 Data: 18000000 00000000 00000000 00 ) (Butn.31 InternalName: "btnDir" Help: "Create New Directory//" Icon: 32 Click: "dlg.DirBrower.Dir" ) (AVIcon.32 Name: "dir.gif" Data: 4e442049 6d616765 0001000f 000e0000 Data: 00d20f0f 0f0f0f0f 0f0f0f0f 000f0f0f Data: 0f0f0f0f 0f0f0f0f 0f0f0f0f 0f0f0f0f Data: 0f0f0f0f 0f0f0f0f 0f0f000f 0f0f0f0f Data: 0f0f0f0f 0f0f000f 0f0f0f0f 000f0f0f Data: 00000000 0f0f000f 000f000f 0f0f0011 Data: 0e110e00 0f0f000f 000f0f0f 00000000 Data: 00000000 00000f0f 000f0000 0e110e11 Data: 0e110e11 0e00000f 0f0f0011 0e110e11 Data: 0e110e11 000f000f 0f000e11 0e110e11 Data: 0e110e00 0f0f000f 00110e11 0e110e11 Data: 0e11000f 0f0f0f00 0e110e11 0e110e11 Data: 0e000f0f 0f0f0011 0e110e11 0e110e11 Data: 000f0f0f 0f000000 00000000 00000000 Data: 0f0f0f0f 00000300 00000080 80808000 Data: 00808000 00800000 80800000 80800080 Data: 80804000 40400080 ff004080 4000ff80 Data: 4000ffff ffc0c0c0 ff0000ff ff0000ff Data: 0000ffff 0000ffff 00ffffff 8000ff80 Data: 80ffff80 80ffff00 80ff8040 c0dcc0a6 Data: caf00000 33000066 00009900 00cc0033 Data: 00003333 00336600 33990033 cc0033ff Data: 00660000 66330066 66006699 0066cc00 Data: 66ff0099 00009933 00996600 99990099 Data: cc0099ff 00cc0000 cc3300cc 6600cc99 Data: 00cccc00 ccff00ff 3300ff66 00ff9900 Data: ffcc3300 00330033 33006633 00993300 Data: cc3300ff 33330033 33333333 66333399 Data: 3333cc33 33ff3366 00336633 33666633 Data: 66993366 cc3366ff 33990033 99333399 Data: 66339999 3399cc33 99ff33cc 0033cc33 Data: 33cc6633 cc9933cc cc33ccff 33ff0033 Data: ff3333ff 6633ff99 33ffcc33 ffff6600 Data: 00660033 66006666 00996600 cc6600ff Data: 66330066 33336633 66663399 6633cc66 Data: 33ff6666 00666633 66666666 66996666 Data: cc6666ff 66990066 99336699 66669999 Data: 6699cc66 99ff66cc 0066cc33 66cc6666 Data: cc9966cc cc66ccff 66ff0066 ff3366ff Data: 6666ff99 66ffcc66 ffff9900 00990033 Data: 99006699 00999900 cc9900ff 99330099 Data: 33339933 66993399 9933cc99 33ff9966 Data: 00996633 99666699 66999966 cc9966ff Data: 99990099 99339999 66999999 9999cc99 Data: 99ff99cc 0099cc33 99cc6699 cc9999cc Data: cc99ccff 99ff0099 ff3399ff 6699ff99 Data: 99ffcc99 ffffcc00 00cc0033 cc0066cc Data: 0099cc00 cccc00ff cc3300cc 3333cc33 Data: 66cc3399 cc33cccc 33ffcc66 00cc6633 Data: cc6666cc 6699cc66 cccc66ff cc9900cc Data: 9933cc99 66cc9999 cc99cccc 99ffcccc Data: 00cccc33 cccc66cc cc99cccc ccccccff Data: ccff00cc ff33ccff 66ccff99 ccffcccc Data: ffffff00 33ff0066 ff0099ff 00ccff33 Data: 00ff3333 ff3366ff 3399ff33 ccff33ff Data: ff6600ff 6633ff66 66ff6699 ff66ccff Data: 66ffff99 00ff9933 ff9966ff 9999ff99 Data: ccff99ff ffcc00ff cc33ffcc 66ffcc99 Data: ffccccff ccffffff 33ffff66 ffff99ff Data: ffcc0606 06131313 1f1f1f2c 2c2c3939 Data: 39464646 5353535f 5f5f6c6c 6c797979 Data: 898989ff fbf0a0a0 a41e7929 7a757aa0 Data: 05bf6f11 ac3e120e 00020008 00050018 Data: 00000000 00000000 00000000 ) (AVIBox.33 InternalName: "icoUp" Invisible: 1 Constraints: 0x55 Icon: 34 Listening: 1 ) (AVIcon.34 Name: "upl.gif" Data: 4e442049 6d616765 00010015 000d0000 Data: 01110e0e 0e0e0000 0e0e0e0e 0e0e0e0e Data: 0e0e0e0e 0e0e0e0e 0e0e0004 12000e0e Data: 0e0e0e0e 0e0e0e0e 0e0e0e0e 0e0e0004 Data: 04041200 0e0e0e0e 0e0e0e0e 0e0e0e0e Data: 0e0e0004 04040404 12000e0e 0e0e0e0e Data: 0e0e0e0e 0e0e0004 04040404 04041200 Data: 0e0e0e0e 0e0e0e0e 0e0e0e00 00000004 Data: 12000000 000e0e0e 0e0e0e0e 0e0e0e0e Data: 0e0e0e00 0412000e 0e0e0e0e 0e0e0e0e Data: 0e0e0e0e 0e0e0e0e 00041200 0e0e0e0e Data: 0e0e0e0e 0e0e0e0e 0e0e0e0e 0e000412 Data: 000e0e0e 0e0e0e0e 0e0e0e0e 0e0e0e0e Data: 0e0e0004 12000000 00000e0e 0e0e0e0e Data: 0e0e0e0e 0e0e0e00 04040404 0412000e Data: 0e0e0e0e 0e0e0e0e 0e0e0e0e 00040404 Data: 04041200 0e0e0e00 000e0e0e 00000e0e Data: 0e000000 00000000 000e0e0e 00000e0e Data: 0e000000 00030000 00008080 80800000 Data: 80800000 80000080 80000080 80008080 Data: 80400040 400080ff 00408040 00ff8040 Data: 00ffffff c0c0c0ff 0000ffff 0000ff00 Data: 00ffff00 00ffff00 ffffff80 00ff8080 Data: ffff8080 ffff0080 ff8040c0 dcc0a6ca Data: f0000033 00006600 00990000 cc003300 Data: 00333300 33660033 990033cc 0033ff00 Data: 66000066 33006666 00669900 66cc0066 Data: ff009900 00993300 99660099 990099cc Data: 0099ff00 cc0000cc 3300cc66 00cc9900 Data: cccc00cc ff00ff33 00ff6600 ff9900ff Data: cc330000 33003333 00663300 993300cc Data: 3300ff33 33003333 33333366 33339933 Data: 33cc3333 ff336600 33663333 66663366 Data: 993366cc 3366ff33 99003399 33339966 Data: 33999933 99cc3399 ff33cc00 33cc3333 Data: cc6633cc 9933cccc 33ccff33 ff0033ff Data: 3333ff66 33ff9933 ffcc33ff ff660000 Data: 66003366 00666600 996600cc 6600ff66 Data: 33006633 33663366 66339966 33cc6633 Data: ff666600 66663366 66666666 996666cc Data: 6666ff66 99006699 33669966 66999966 Data: 99cc6699 ff66cc00 66cc3366 cc6666cc Data: 9966cccc 66ccff66 ff0066ff 3366ff66 Data: 66ff9966 ffcc66ff ff990000 99003399 Data: 00669900 999900cc 9900ff99 33009933 Data: 33993366 99339999 33cc9933 ff996600 Data: 99663399 66669966 999966cc 9966ff99 Data: 99009999 33999966 99999999 99cc9999 Data: ff99cc00 99cc3399 cc6699cc 9999cccc Data: 99ccff99 ff0099ff 3399ff66 99ff9999 Data: ffcc99ff ffcc0000 cc0033cc 0066cc00 Data: 99cc00cc cc00ffcc 3300cc33 33cc3366 Data: cc3399cc 33cccc33 ffcc6600 cc6633cc Data: 6666cc66 99cc66cc cc66ffcc 9900cc99 Data: 33cc9966 cc9999cc 99cccc99 ffcccc00 Data: cccc33cc cc66cccc 99cccccc ccccffcc Data: ff00ccff 33ccff66 ccff99cc ffccccff Data: ffff0033 ff0066ff 0099ff00 ccff3300 Data: ff3333ff 3366ff33 99ff33cc ff33ffff Data: 6600ff66 33ff6666 ff6699ff 66ccff66 Data: ffff9900 ff9933ff 9966ff99 99ff99cc Data: ff99ffff cc00ffcc 33ffcc66 ffcc99ff Data: ccccffcc ffffff33 ffff66ff ff99ffff Data: cc060606 0d0d0d13 13131a1a 1a202020 Data: 2727272d 2d2d3434 343b3b3b 41414148 Data: 48484e4e 4e555555 5b5b5b62 62626969 Data: 696f6f6f 76767600 02000800 05001800 Data: 00000000 00000000 000000 ) (RectD.35 Left: 8.00000000000000 Top: 222.00000000000000 Right: 220.00000000000000 Bottom: 70.00000000000000 ) (RectD.36 Left: 5.00000000000000 Top: 330.00000000000000 Right: 221.00000000000000 Bottom: 242.00000000000000 ) (RectD.37 Left: 244.00000000000000 Top: 254.00000000000000 Right: 316.00000000000000 Bottom: 232.00000000000000 ) (RectD.38 Left: 245.00000000000000 Top: 229.00000000000000 Right: 316.00000000000000 Bottom: 207.00000000000000 ) (RectD.39 Left: 10.00000000000000 Top: 242.00000000000000 Right: 83.00000000000000 Bottom: 228.00000000000000 ) (RectD.40 Top: 46.00000000000000 Right: 264.00000000000000 Bottom: 26.00000000000000 ) (RectD.41 Left: 8.00000000000000 Top: 73.00000000000000 Right: 170.00000000000000 Bottom: 54.00000000000000 ) (RectD.42 Left: 8.00000000000000 Top: 24.00000000000000 Right: 157.00000000000000 Bottom: 12.00000000000000 ) (RectD.43 Left: 271.00000000000000 Top: 46.00000000000000 Right: 297.00000000000000 Bottom: 24.00000000000000 ) (RectD.44 Left: 10.00000000000000 Top: 43.00000000000000 Right: 28.00000000000000 Bottom: 27.00000000000000 ) (RectD.45 Left: 232.00000000000000 Top: 99.00000000000000 Right: 260.00000000000000 Bottom: 71.00000000000000 ) (RectD.46 Left: 304.00000000000000 Top: 46.00000000000000 Right: 330.00000000000000 Bottom: 24.00000000000000 ) (RectD.47 Left: 276.00000000000000 Top: 102.00000000000000 Right: 314.00000000000000 Bottom: 65.00000000000000 ) (Nil.48 ) (Nil.49 ) (AVDLog.50 Name: "NSModelSetup" X: 23 Y: 61 W: 744 H: 462 ConstrainedControlNames: 51 ConstrainedControlNames: 52 ConstrainedControlNames: 53 ConstrainedControlNames: 54 ConstrainedControlNames: 55 ConstrainedControlNames: 56 ConstrainedControlNames: 57 ConstrainedControlNames: 58 ConstrainedControlNames: 59 ConstrainedControlNames: 60 ConstrainedControlNames: 61 ConstrainedControlNames: 62 ConstrainedControlNames: 63 ConstrainedControlNames: 64 ConstrainedControlNames: 65 Constraints: 66 Constraints: 67 Constraints: 68 Constraints: 69 Constraints: 70 Constraints: 71 Constraints: 72 Constraints: 73 Constraints: 74 Constraints: 75 Constraints: 76 Constraints: 77 Constraints: 78 Constraints: 79 Constraints: 80 Server: 81 ControlPanel: 82 Title: "Model Setup and Administration" EscapeEnabled: 1 Resizable: 1 AlwaysOnTop: 1 HasTitleBar: 1 Closeable: 1 Close: "NSCloseModelSetupDialog" DefaultButton: 208 ) (AVStr.51 S: "lblLoadFromTable" ) (AVStr.52 S: "lblLoadFromView" ) (AVStr.53 S: "lblLoadFromArchivedTable" ) (AVStr.54 S: "lblCloseDialog" ) (AVStr.55 S: "lblMainHelp" ) (AVStr.56 S: "btnWorkingDirectory" ) (AVStr.57 S: "btnSetBoundaryTheme" ) (AVStr.58 S: "btnOutputSettingsHelp" ) (AVStr.59 S: "btnBasicStepsHelp" ) (AVStr.60 S: "lblStandardOverlay" ) (AVStr.61 S: "btnSettingsHelp" ) (AVStr.62 S: "lblSaveParameters" ) (AVStr.63 S: "btnWeightedOverlayHelp" ) (AVStr.64 S: "lblWeightedOverlay" ) (AVStr.65 S: "btnDisUnitsHelp" ) (Numb.66 N: 85.00000000000000 ) (Numb.67 N: 85.00000000000000 ) (Numb.68 N: 85.00000000000000 ) (Numb.69 N: 85.00000000000000 ) (Numb.70 N: 85.00000000000000 ) (Numb.71 N: 85.00000000000000 ) (Numb.72 N: 85.00000000000000 ) (Numb.73 N: 85.00000000000000 ) (Numb.74 N: 85.00000000000000 ) (Numb.75 N: 85.00000000000000 ) (Numb.76 N: 85.00000000000000 ) (Numb.77 N: 85.00000000000000 ) (Numb.78 N: 85.00000000000000 ) (Numb.79 N: 85.00000000000000 ) (Numb.80 N: 85.00000000000000 ) (Nil.81 ) (CPanel.82 Child: 83 Child: 122 Child: 124 Child: 142 Child: 160 Child: 161 Child: 180 Child: 196 Child: 198 ResBox: 199 ResBox: 200 ResBox: 201 ResBox: 202 ResBox: 203 ResBox: 204 ResBox: 205 ResBox: 206 ResBox: 207 Listening: 1 ) (CPanel.83 InternalName: "cpaOutputSettings" Child: 84 Child: 85 Child: 87 Child: 88 Child: 89 Child: 90 Child: 97 Child: 98 Child: 100 Child: 102 Child: 103 Child: 105 Child: 107 Constraints: 0x55 ResBox: 109 ResBox: 110 ResBox: 111 ResBox: 112 ResBox: 113 ResBox: 114 ResBox: 115 ResBox: 116 ResBox: 117 ResBox: 118 ResBox: 119 ResBox: 120 ResBox: 121 Label: " " VisibleBorder: 1 Listening: 1 ) (TextLabel.84 InternalName: "txtWorkingDirectory" Constraints: 0x55 Label: "c:\\temp" Listening: 1 ) (Butn.85 InternalName: "btnWorkingDirectory" Help: "Set Working Directory//Select working directory through a file browser. All data generated by the application will be created here." Icon: 86 Click: "dlg.DirBrowser.Run" ) (AVIcon.86 Name: "Open" Res: "Icons.Open" ) (TextLabel.87 InternalName: "txtBoundaryTheme" Constraints: 0x55 Label: " " Listening: 1 ) (TextLabel.88 InternalName: "txtBoundaryThemeTitle" Constraints: 0x55 Label: "OVERLAY EXTENT THEME:" Listening: 1 ) (TextLabel.89 InternalName: "txtWorkingDirTitle" Constraints: 0x55 Label: "WORKING DIRECTORY" Listening: 1 ) (AVSlider.90 InternalName: "sldCellSize" Help: "Cell Size Slider//Set the output data cell size. All data during the conversion and overlay processes will be given a uniform cell size based on this setting." Constraints: 0x55 NextControl: 81 Listening: 1 Horizontal: 1 StepButtons: 1 Value: 91 Upper: 92 Lower: 93 ValueIncrement: 94 MainIncrement: 95 AuxIncrement: 96 Drag: "NSCellSizeUpdate" ) (Numb.91 InternalName: "60.000000" N: 60.00000000000000 ) (Numb.92 InternalName: "1000.000000" N: 1000.00000000000000 ) (Numb.93 InternalName: "10.000000" N: 10.00000000000000 ) (Numb.94 InternalName: "10.000000" N: 10.00000000000000 ) (Numb.95 InternalName: "20.000000" N: 20.00000000000000 ) (Numb.96 InternalName: "0.000000" ) (TextLabel.97 InternalName: "aTextLabel2" Constraints: 0x55 Label: "Resolution (Cell Size):" Listening: 1 ) (TextLine.98 InternalName: "txtCellSize" Label: " " Constraints: 0x55 Listening: 1 TextType: 99 Apply: "NSCellSizeUpdate" NextControl: 81 ) (AVEnum.99 Name: "TEXTLINE_TYPE_INTEGER" ) (Butn.100 InternalName: "btnSetBoundaryTheme" Help: "Set Boundary Theme//Takes the currently selected theme in the list and sets it as the boundary theme. The analysis extent will be limited to this theme's extent" Icon: 101 Click: "NSSetBoundaryTheme" ) (AVIcon.101 Name: "Loop" Res: "Icons.Loop" ) (TextLabel.102 InternalName: "aTextLabel3" Constraints: 0x55 Label: "OUTPUT DATA SETTINGS (REQUIRED)" Listening: 1 ) (Butn.103 InternalName: "btnOutputSettingsHelp" Icon: 104 Click: "NSHelp.OutputDataSettings" ) (AVIcon.104 Name: "Help" Res: "Icons.Help" ) (AVIBox.105 InternalName: "aIconBox7" Constraints: 0x55 Icon: 106 Listening: 1 ) (AVIcon.106 Name: "NDLogo" Res: "Icons.NDLogo" ) (AVIBox.107 InternalName: "ico3" Constraints: 0x55 Icon: 108 Listening: 1 ) (AVIcon.108 Name: "Number3" Res: "Icons.Number3" ) (RectD.109 Left: 38.00000000000000 Top: 74.00000000000000 Right: 369.00000000000000 Bottom: 54.00000000000000 ) (RectD.110 Left: 6.00000000000000 Top: 73.00000000000000 Right: 31.00000000000000 Bottom: 51.00000000000000 ) (RectD.111 Left: 188.00000000000000 Top: 102.00000000000000 Right: 364.00000000000000 Bottom: 84.00000000000000 ) (RectD.112 Left: 36.00000000000000 Top: 101.00000000000000 Right: 178.00000000000000 Bottom: 83.00000000000000 ) (RectD.113 Left: 7.00000000000000 Top: 44.00000000000000 Right: 172.00000000000000 Bottom: 27.00000000000000 ) (RectD.114 Left: 357.00000000000000 Top: 97.00000000000000 Right: 568.00000000000000 Bottom: 62.00000000000000 ) (RectD.115 Left: 372.00000000000000 Top: 62.00000000000000 Right: 479.00000000000000 Bottom: 44.00000000000000 ) (RectD.116 Left: 579.00000000000000 Top: 90.00000000000000 Right: 624.00000000000000 Bottom: 70.00000000000000 ) (RectD.117 Left: 6.00000000000000 Top: 100.00000000000000 Right: 31.00000000000000 Bottom: 77.00000000000000 ) (RectD.118 Left: 195.00000000000000 Top: 38.00000000000000 Right: 407.00000000000000 Bottom: 12.00000000000000 ) (RectD.119 Left: 598.00000000000000 Top: 38.00000000000000 Right: 625.00000000000000 Bottom: 12.00000000000000 ) (RectD.120 Left: 484.00000000000000 Top: 57.00000000000000 Right: 525.00000000000000 Bottom: 21.00000000000000 ) (RectD.121 Left: 168.00000000000000 Top: 30.00000000000000 Right: 189.00000000000000 Bottom: 10.00000000000000 ) (AVLBox.122 InternalName: "lstModelSetup" Tag: "ThemeName Category BufferDist Process Weight Shape" NextControl: 81 ContentKind: 4 Constraints: 0x55 ColumnCount: 1 Listening: 1 VerticalScroll: 1 Select: "NSModelChoiceList" SelectionStyle: 123 ) (AVEnum.123 Name: "LISTBOX_SELECTION_SINGLECELL" ) (CPanel.124 InternalName: "cpaStandardSteps" Child: 125 Child: 126 Child: 128 Child: 130 Child: 131 Child: 132 Child: 133 Constraints: 0x55 ResBox: 135 ResBox: 136 ResBox: 137 ResBox: 138 ResBox: 139 ResBox: 140 ResBox: 141 Label: " " VisibleBorder: 1 Listening: 1 ) (TextLabel.125 InternalName: "txtBasicStepsTitle" Constraints: 0x55 Label: "STANDARD OVERLAY:" Listening: 1 ) (Butn.126 InternalName: "btnBasicStepsHelp" Help: "Basic Steps Help//Basic Steps Help" Icon: 127 Click: "NSHelp.StandardOverlay" ) (AVIcon.127 Name: "Help" Res: "Icons.Help" ) (Butn.128 InternalName: "lblStandardOverlay" Help: "Data Conversion and Standard Overlay//Apply all of the settings currently displayed in the list. Data will be converted and preprocessed in preparation for the standard overlay function, which is run once all data has been set up." Tag: "Standard" Icon: 129 Click: "NSPreProcess" ) (AVIcon.129 Name: "Run" Res: "Icons.Run" ) (TextLabel.130 InternalName: "aTextLabel6" Constraints: 0x55 Label: "Convert data and create" Listening: 1 ) (TextLabel.131 InternalName: "aTextLabel7" Constraints: 0x55 Label: "standard overlay model" Listening: 1 ) (TextLabel.132 InternalName: "aTextLabel1" Constraints: 0x55 Label: "(weights will not be used)" Listening: 1 ) (AVIBox.133 InternalName: "ico4" Constraints: 0x55 Icon: 134 Listening: 1 ) (AVIcon.134 Name: "Number4" Res: "Icons.Number4" ) (RectD.135 Left: 4.00000000000000 Top: 31.00000000000000 Right: 131.00000000000000 Bottom: 12.00000000000000 ) (RectD.136 Left: 87.00000000000000 Top: 127.00000000000000 Right: 114.00000000000000 Bottom: 101.00000000000000 ) (RectD.137 Left: 44.00000000000000 Top: 126.00000000000000 Right: 70.00000000000000 Bottom: 101.00000000000000 ) (RectD.138 Left: 6.00000000000000 Top: 86.00000000000000 Right: 129.00000000000000 Bottom: 66.00000000000000 ) (RectD.139 Left: 6.00000000000000 Top: 100.00000000000000 Right: 129.00000000000000 Bottom: 80.00000000000000 ) (RectD.140 Left: 5.00000000000000 Top: 47.00000000000000 Right: 131.00000000000000 Bottom: 27.00000000000000 ) (RectD.141 Top: 136.00000000000000 Right: 21.00000000000000 Bottom: 116.00000000000000 ) (CPanel.142 InternalName: "cpaLoad" Child: 143 Child: 144 Child: 145 Child: 146 Child: 148 Child: 150 Child: 152 Constraints: 0x55 ResBox: 153 ResBox: 154 ResBox: 155 ResBox: 156 ResBox: 157 ResBox: 158 ResBox: 159 Label: " " VisibleBorder: 1 Listening: 1 ) (LButn.143 InternalName: "lblLoadFromTable" Help: "Load Saved Settings//Load theme settings that were previously defined and saved. They will appear exactly as they do in the table, but can be modified for the current model" Label: "Last Completed Model" Click: "NSLoadSetupParametersFromTable" ) (LButn.144 InternalName: "lblLoadFromView" Help: "Loads data from view//Loads all source data from the data setup view. All themes in the view will be loaded into the list and made available for processing" Label: "Data Setup View" Click: "NSLoadSetupParametersFromCurrentView" ) (TextLabel.145 InternalName: "txtParametersTitle" Constraints: 0x55 Label: "LOAD THEME SETTINGS FROM:" Listening: 1 ) (Butn.146 InternalName: "btnSettingsHelp" Help: "Theme Settings Help//Theme Settings Help" Icon: 147 Click: "NSHelp.ThemeSettings" ) (AVIcon.147 Name: "Help" Res: "Icons.Help" ) (Butn.148 InternalName: "lblSaveParameters" Help: "Save and Continue//Save settings and continue with model. Current settings must be saved before running the standard or weighted overlay processes" Icon: 149 Click: "NSSaveSetupParameters" ) (AVIcon.149 Name: "Save" Res: "Icons.Save" ) (AVIBox.150 InternalName: "ico1" Constraints: 0x55 Icon: 151 Listening: 1 ) (AVIcon.151 Name: "Number1" Res: "Icons.Number1" ) (LButn.152 InternalName: "lblLoadFromArchivedTable" Help: "Load Archived Settings//Load theme settings that were previously defined and saved with a completed model. They will appear exactly as they do in the table, but can be modified and saved with the current model." Label: "Archived Model" Click: "NSLoadSetupParametersFromArchivedTable" ) (RectD.153 Left: 5.00000000000000 Top: 97.00000000000000 Right: 128.00000000000000 Bottom: 65.00000000000000 ) (RectD.154 Left: 6.00000000000000 Top: 61.00000000000000 Right: 99.00000000000000 Bottom: 29.00000000000000 ) (RectD.155 Left: 27.00000000000000 Top: 40.00000000000000 Right: 191.00000000000000 Bottom: 13.00000000000000 ) (RectD.156 Left: 159.00000000000000 Top: 130.00000000000000 Right: 186.00000000000000 Bottom: 104.00000000000000 ) (RectD.157 Left: 159.00000000000000 Top: 83.00000000000000 Right: 184.00000000000000 Bottom: 57.00000000000000 ) (RectD.158 Left: 2.00000000000000 Top: 29.00000000000000 Right: 23.00000000000000 Bottom: 9.00000000000000 ) (RectD.159 Left: 5.00000000000000 Top: 133.00000000000000 Right: 129.00000000000000 Bottom: 101.00000000000000 ) (LButn.160 InternalName: "lblCloseDialog" Help: "Close this window//Close this window" Label: "Close" Click: "NSCloseDialog" ) (CPanel.161 InternalName: "cpaWeightedOverlay" Child: 162 Child: 163 Child: 164 Child: 166 Child: 167 Child: 169 Child: 171 Constraints: 0x55 ResBox: 173 ResBox: 174 ResBox: 175 ResBox: 176 ResBox: 177 ResBox: 178 ResBox: 179 Label: " " VisibleBorder: 1 Listening: 1 ) (AVCBox.162 InternalName: "chkWeightedOverlay" Listening: 1 Label: "Enable Weighted Overlay" Click: "NSEnableWeightedOverlay" Constraints: 0x55 ) (TextLabel.163 InternalName: "txtWeightedOverlayTitle" Constraints: 0x55 Label: "WEIGHTED OVERLAY (OPTIONAL)" Listening: 1 ) (Butn.164 InternalName: "btnWeightedOverlayHelp" Help: "Weighted Overlay Help//Weighted Overlay Help" Icon: 165 Click: "NSHelp.WeightedOverlay" ) (AVIcon.165 Name: "Help" Res: "Icons.Help" ) (TextLabel.166 InternalName: "txtWeightStatus" Constraints: 0x55 Label: "Weights will be ignored" Listening: 1 ) (AVIBox.167 InternalName: "icoWeightStatus" Constraints: 0x55 Icon: 168 Listening: 1 ) (AVIcon.168 Name: "DiamondRed" Res: "Icons.DiamondRed" ) (Butn.169 InternalName: "lblWeightedOverlay" Help: "Run Weighted Overlay//Creates a Weighted Overlay GRID based on weights applied to each theme. Requires that at least one Standard Overlay GRID has been created and that all input has been preprocessed." Tag: "Weighted" Icon: 170 Click: "NSStandardOverlay" ) (AVIcon.170 Name: "Run" Res: "Icons.Run" ) (AVIBox.171 InternalName: "ico5" Constraints: 0x55 Icon: 172 Listening: 1 ) (AVIcon.172 Name: "Number5" Res: "Icons.Number5" ) (RectD.173 Left: 6.00000000000000 Top: 57.00000000000000 Right: 161.00000000000000 Bottom: 35.00000000000000 ) (RectD.174 Left: 8.00000000000000 Top: 40.00000000000000 Right: 191.00000000000000 Bottom: 14.00000000000000 ) (RectD.175 Left: 130.00000000000000 Top: 120.00000000000000 Right: 157.00000000000000 Bottom: 94.00000000000000 ) (RectD.176 Left: 25.00000000000000 Top: 83.00000000000000 Right: 175.00000000000000 Bottom: 62.00000000000000 ) (RectD.177 Left: 6.00000000000000 Top: 76.00000000000000 Right: 21.00000000000000 Bottom: 61.00000000000000 ) (RectD.178 Left: 92.00000000000000 Top: 120.00000000000000 Right: 119.00000000000000 Bottom: 94.00000000000000 ) (RectD.179 Left: 3.00000000000000 Top: 134.00000000000000 Right: 24.00000000000000 Bottom: 114.00000000000000 ) (CPanel.180 InternalName: "cpaDistanceUnits" Child: 181 Child: 182 Child: 183 Child: 184 Child: 186 Child: 187 Child: 188 Constraints: 0x55 ResBox: 189 ResBox: 190 ResBox: 191 ResBox: 192 ResBox: 193 ResBox: 194 ResBox: 195 Label: " " VisibleBorder: 1 Listening: 1 ) (TextLabel.181 InternalName: "txtBufferDistTitle" Constraints: 0x55 Label: "BUFFER DISTANCE UNITS" Listening: 1 ) (TextLabel.182 InternalName: "aTextLabel99" Constraints: 0x55 Label: "Distance units entered" Listening: 1 ) (TextLabel.183 InternalName: "txtLine2" Constraints: 0x55 Label: "above are in:" Listening: 1 ) (Butn.184 InternalName: "btnDisUnitsHelp" Help: "Basic Steps Help//Basic Steps Help" Icon: 185 Click: "NSHelp.DistanceUnits" ) (AVIcon.185 Name: "Help" Res: "Icons.Help" ) (RButn.186 InternalName: "radUnitsFeet" Tag: "Feet" Constraints: 0x55 Listening: 1 Label: "Feet" ) (RButn.187 InternalName: "RadUnitsMeters" Tag: "Meters" Constraints: 0x55 Listening: 1 Label: "Meters" ) (RButn.188 InternalName: "RadUnitsOther" Tag: "Other" Constraints: 0x55 Listening: 1 Label: "Other(Same as map units)" ) (RectD.189 Left: 19.00000000000000 Top: 49.00000000000000 Right: 160.00000000000000 Bottom: 17.00000000000000 ) (RectD.190 Left: 8.00000000000000 Top: 53.00000000000000 Right: 155.00000000000000 Bottom: 37.00000000000000 ) (RectD.191 Left: 8.00000000000000 Top: 68.00000000000000 Right: 155.00000000000000 Bottom: 52.00000000000000 ) (RectD.192 Left: 90.00000000000000 Top: 103.00000000000000 Right: 117.00000000000000 Bottom: 77.00000000000000 ) (RectD.193 Left: 5.00000000000000 Top: 94.00000000000000 Right: 74.00000000000000 Bottom: 77.00000000000000 ) (RectD.194 Left: 5.00000000000000 Top: 112.00000000000000 Right: 74.00000000000000 Bottom: 95.00000000000000 ) (RectD.195 Left: 5.00000000000000 Top: 131.00000000000000 Right: 154.00000000000000 Bottom: 114.00000000000000 ) (AVIBox.196 InternalName: "ico2" Constraints: 0x55 Icon: 197 Listening: 1 ) (AVIcon.197 Name: "Number2" Res: "Icons.Number2" ) (LButn.198 InternalName: "lblMainHelp" Help: "Model Setup and Administration menu help" Label: "Help" Click: "NSHelp.Main" ) (RectD.199 Left: 5.00000000000000 Top: 462.00000000000000 Right: 658.00000000000000 Bottom: 356.00000000000000 ) (RectD.200 Left: 6.00000000000000 Top: 223.00000000000000 Right: 741.00000000000000 Bottom: 11.00000000000000 ) (RectD.201 Left: 388.00000000000000 Top: 357.00000000000000 Right: 522.00000000000000 Bottom: 219.00000000000000 ) (RectD.202 Left: 7.00000000000000 Top: 357.00000000000000 Right: 213.00000000000000 Bottom: 219.00000000000000 ) (RectD.203 Left: 665.00000000000000 Top: 456.00000000000000 Right: 721.00000000000000 Bottom: 426.00000000000000 ) (RectD.204 Left: 530.00000000000000 Top: 357.00000000000000 Right: 727.00000000000000 Bottom: 219.00000000000000 ) (RectD.205 Left: 221.00000000000000 Top: 357.00000000000000 Right: 380.00000000000000 Bottom: 219.00000000000000 ) (RectD.206 Left: 220.00000000000000 Top: 253.00000000000000 Right: 241.00000000000000 Bottom: 233.00000000000000 ) (RectD.207 Left: 665.00000000000000 Top: 415.00000000000000 Right: 721.00000000000000 Bottom: 385.00000000000000 ) (Nil.208 ) (AVDLog.209 Name: "ShadedReliefDlog" X: 63 Y: 61 W: 349 H: 337 ConstrainedControlNames: 210 ConstrainedControlNames: 211 Constraints: 212 Constraints: 213 Server: 214 ControlPanel: 215 Title: "NEXT STEPS:" EscapeEnabled: 1 Resizable: 1 AlwaysOnTop: 1 HasTitleBar: 1 Closeable: 1 DefaultButton: 223 ) (AVStr.210 S: "lblShadedReliefAddTheme" ) (AVStr.211 S: "lblShadedReliefClose" ) (Numb.212 N: 85.00000000000000 ) (Numb.213 N: 85.00000000000000 ) (Nil.214 ) (CPanel.215 Child: 216 Child: 218 Child: 219 ResBox: 220 ResBox: 221 ResBox: 222 Listening: 1 ) (AVLBox.216 InternalName: "lstInstructions" NextControl: 214 ContentKind: 4 Constraints: 0x55 ColumnCount: 1 Listening: 1 VerticalScroll: 1 SelectionStyle: 217 ) (AVEnum.217 Name: "LISTBOX_SELECTION_SINGLECELL" ) (LButn.218 InternalName: "lblShadedReliefAddTheme" Label: "Load Shaded Relief" Click: "View.Add" ) (LButn.219 InternalName: "lblShadedReliefClose" Label: "Close" Click: "NSCloseDialog" ) (RectD.220 Left: 11.00000000000000 Top: 293.00000000000000 Right: 332.00000000000000 Bottom: 13.00000000000000 ) (RectD.221 Left: 21.00000000000000 Top: 326.00000000000000 Right: 131.00000000000000 Bottom: 305.00000000000000 ) (RectD.222 Left: 157.00000000000000 Top: 326.00000000000000 Right: 222.00000000000000 Bottom: 305.00000000000000 ) (Nil.223 ) (AVDLog.224 Name: "statusDialog" X: 349 Y: 339 W: 329 H: 96 Server: 225 ControlPanel: 226 Title: "Working..." EscapeEnabled: 1 Resizable: 1 AlwaysOnTop: 1 HasTitleBar: 1 Closeable: 1 DefaultButton: 229 ) (Nil.225 ) (CPanel.226 Child: 227 ResBox: 228 Listening: 1 ) (TextLabel.227 InternalName: "txtWorking" Constraints: 0x55 Label: "Performing Overlay" Listening: 1 ) (RectD.228 Left: 8.00000000000000 Top: 61.00000000000000 Right: 296.00000000000000 Bottom: 33.00000000000000 ) (Nil.229 ) (AVDLog.230 Name: "ThemeStatusDlog" X: 11 Y: 58 W: 865 H: 506 ConstrainedControlNames: 231 ConstrainedControlNames: 232 Constraints: 233 Constraints: 234 Server: 48 ControlPanel: 235 Title: "Theme Selections" EscapeEnabled: 1 Resizable: 1 AlwaysOnTop: 1 HasTitleBar: 1 Closeable: 1 DefaultButton: 243 ) (AVStr.231 S: "lblExit" ) (AVStr.232 S: "lblContinue" ) (Numb.233 N: 85.00000000000000 ) (Numb.234 N: 85.00000000000000 ) (CPanel.235 Child: 236 Child: 238 Child: 239 ResBox: 240 ResBox: 241 ResBox: 242 Listening: 1 ) (AVLBox.236 InternalName: "lstThemeStatus" NextControl: 48 ContentKind: 4 Constraints: 0x55 ColumnCount: 1 HorizontalScroll: 1 Listening: 1 VerticalScroll: 1 SelectionStyle: 237 ) (AVEnum.237 Name: "LISTBOX_SELECTION_SINGLECELL" ) (LButn.238 InternalName: "lblExit" Tag: "Exit" Label: "Exit" Click: "NSPreProcess" ) (LButn.239 InternalName: "lblContinue" Tag: "Standard" Label: "Continue" Click: "NSPreProcess" ) (RectD.240 Left: 23.00000000000000 Top: 449.00000000000000 Right: 833.00000000000000 Bottom: 19.00000000000000 ) (RectD.241 Left: 397.00000000000000 Top: 489.00000000000000 Right: 477.00000000000000 Bottom: 462.00000000000000 ) (RectD.242 Left: 272.00000000000000 Top: 489.00000000000000 Right: 352.00000000000000 Bottom: 462.00000000000000 ) (Nil.243 ) (List.244 ) (List.245 Child: 246 ) (List.246 Child: 247 Child: 251 Child: 252 ) (List.247 Child: 248 Child: 249 Child: 250 ) (AVStr.248 S: "View" ) (AVStr.249 S: "Sensitive Areas Management Model" ) (AVStr.250 S: "NSModelOpenSetupDialog" ) (Choice.251 Label: "Open Model Setup and Administration Menu" Click: "NSModelOpenSetupDialog" Shortcut: "Keys.None" ) (Numb.252 ) (List.253 ) (Script.254 Name: "dlg.DirBrower.Dir" SourceCode: "'Last Modified: Juna Papajorgji/10.15.99\n' GeoPlan Center, University of Florida\n'-------------------------------------------------------\n'Name: \n'Author/Date: \n'Updated_by/Date: \n'Prepared at: \n'-------------------------------------------------------\n'Description: Creates a new directory at curre\n' Adds it to the ListBox.\n'Calls: MakeDir \n'Called by: btnDir in dialog\n'Returns: \n'Self: \n'Object Tags: \n'--------------------------------------------------------\n'ask user for a directory name\n'-----------------------------\ndirName = MsgBox.Input(\"Enter a name for new directory:\",\n \"Create new directory\",\"\")\nif (nil = dirName) then\n return nil\nend\n\n'get current dir\n'---------------\ntlnPath = self.GetDialog.FindByName(\"tlnPath\")\nlongStr = tlnPath.GetText\nstrPath = longStr.Right(longStr.Count-10)\ncurrDirFN = FileName.Make(strPath)\ncurrDirFN.SetCWD\nav.Run(\"MakeDir\", dirName)'***\n'Sys tem.ExecuteSynchronous(\"command.com /c mkdir \"+dirName)\ntlnPath.Apply" ) (Script.255 Name: "dlg.DirBrowser.Close" SourceCode: "'Last Modified: Juna Papajorgji/10.14.99\n' GeoPlan Center, University of Florida\n'-------------------------------------------------------\n'Name: dlg.DirBrowser.Close\n'Author/Date: Juna/10.14.99 \n'Updated_by/Date: \n'Prepared at: \n'-------------------------------------------------------\n'Description: Cleans dialog.\n'Calls: \n'Called by: \"DirBrowser.Dialog\"\n'Returns: nil\n'Self: \n'Object Tags: \n'--------------------- ----------------------------------\nself.FindByClass(TextLine).Get(0).SetText(\"\")\nself.FindByClass(ListBox).Get(0).Empty\nself.FindByClass(ComboBox).Get(0).Empty\n" ) (Script.256 Name: "dlg.DirBrowser.ColWidth" SourceCode: "'Last Modified: Juna Papajorgji/10.14.99\n' GeoPlan Center, University of Florida\n'-------------------------------------------------------\n'Name: dlg.DirBrowser.ColWidth\n'Author/Date: Juna/10.14.99 \n'Updated_by/Date: \n'Prepared at: \n'-------------------------------------------------------\n'Description: Adjusts column widths in the listbox any time\n' an event happens and the ListBox is being refreshed.\n'Calls: \n'Called by: dlg.DirBrowser.Driver; dlg.DirBrowser.Up\n'Returns: \n'Self: \n'Object Tags: \n'-------------------------------------------------------\nlbxDirs = self\nIconColumnWidth = 10\n'--------------------\nlbxDirs.GoColumn(0)\nlbxDirs.SetColumnWidth(iconColumnWidth) \nlbxDirs.GoColumn(1)\nlbxDirs.SetColumnWidth(100 - iconColumnWidth) \n" ) (Script.257 Name: "dlg.DirBrowser.Driver" SourceCode: "'Last Modified: Juna Papajorgji/10.14.99\n' GeoPlan Center, University of Florida\n'-------------------------------------------------------\n'Name: dlg.DirBrowser.Driver\n'Author/Date: Kelly Maloy - Original Code from ESRI\n'Updated_by/Date: \n'Prepared at: \n'-------------------------------------------------------\n'Description: Comprehensive script for almost all of the controls\n' and events in DirBrowser.Dialog. \n'Calls: dlg.DirBrowser.ColWidth; dl g.DirBrowser.Up \n'Called by: The following controls in the dialog \"DirBrowser.Dialog\":\n' SELECT event of cbxDrives\n' APPLY event of tlnPath\n' APPLY event of lbxDirs\n' CLICK event of lbnOK\n' CLICK event of lbnCancel\n'Returns: nil\n'Self: \n'Object Tags: \n'-------------------------------------------------------\nstrSlash = \"\\\"\nicPlace = String.MakeBuffer(10)\n'-------------------------------------------------------\n dlgSelf = SELF.GetDialog\nstrCtrlName = SELF.GetName\ntlnPath = dlgSelf.FindByname(\"tlnPath\")\nlbxDrives = dlgSelf.FindByName(\"cbxDrives\")\nlbxDirs = dlgSelf.FindByName(\"lbxDirs\")\nlbnOK = dlgSelf.FindByName(\"lbnOK\")\n\nlongStrPath = tlnPath.GetText\nstrPath = longStrPath.Right(longStrPath.Count-10)\n\n'Get the closed folder icon\ntheIcoCtrl = self.GetDialog.FindByName(\"icoClosed\")\nif (theIcoCtrl <> nil) then\n theFolder = theIcoCtrl.GetIcon\nelse\n theFolder = \"\"\nend\n\n'Get the level up icon\nupIcoCtrl = self.GetDia log.FindByName(\"icoUp\")\nif (upIcoCtrl <> nil) then\n upIco = upIcoCtrl.GetIcon\nelse\n upIco = \"\"\nend\n'---------------------------------------------------\n' If script called by APPLY event of lbxDirs control\n'---------------------------------------------------\nif (strCtrlName = \"lbxDirs\") then\n strSelDir = SELF.GetCurrentValue\n \n 'get text corresponding to currently selected icon\n if (strSelDir.Is(Icon)) then\n \n 'Check if it is the level up icon\n if (strSelDir = upIco) then\n av.Run(\"dlg .DirBrowser.Up\",nil) '*** \n return nil\n end\n rowInd = self.GetCurrentRow\n self.GoRow(rowInd)\n self.GoRight\n strSelDir = self.GetCurrentValue\n end\n listPath = strPath.AsTokens(strSlash) \n if (strPath.Right(1) = strSlash) then\n currPath = strPath + strSelDir\n else\n currPath = strPath + strSlash + strSelDir\n end\n \n ' Construct the list of directories for the new Path\n ' and populate the listbox and textline.\n '-------------------------------------------------\n listD irs = {} \n for each f in currPath.AsFileName.Read(\"\")\n listDirs.Add({theFolder, f.GetBaseName})\n end\n listDirs.Insert(upIco)\n lbxDirs.DefineFromList(listDirs)\n av.Run(\"dlg.DirBrowser.ColWidth\",lbxDirs)'***\n tlnPath.SetText(icPlace+currPath)\n'---------------------------------------------------\n' If script called by SELECT event of cbxDrives control\n'---------------------------------------------------\nelseif (strCtrlName = \"cbxDrives\") then\n \n noDirMsg = \"No directories found under this drive.\"+nl+ \n \"Drive may not be ready.\"\n strPath = SELF.GetCurrentValue.Left(3) 'c:\\\n listDirs = {} \n if (strPath.AsFileName.IsDir.Not) then\n Msgbox.Info(noDirMsg,\"\")'*\n return nil\n end\n for each f in strPath.AsFileName.Read(\"\")\n listDirs.Add({theFolder, f.GetBaseName})\n end\n listDirs.Insert(upIco)\n lbxDirs.DefineFromList(listDirs)\n av.Run(\"dlg.DirBrowser.ColWidth\",lbxDirs)'*** \n tlnPath.SetText(icPlace+strPath)\n'---------------------------------------------------\n' If script called by AP PLY event of tlnPath control\n'---------------------------------------------------\nelseif (strCtrlName = \"tlnPath\") then \n if (strPath.Count = 3) then 'it is just the drive c:\\\n strDrive = strPath\n else\n strDrive = strPath.AsTokens(strSlash).Get(0)\n end\n drivesList = {}\n for each d in lbxDrives\n drivesList.Add(d.Left(3)) 'c:\n end\n if (strDrive.Right(1) = strSlash) then 'when only the drive is the path\n myPath = strDrive\n else\n myPath = strDrive+strSlash\n end\n if (drivesList.FindByV alue(myPath) = -1 )then \n MsgBox.Error(\"Could not find drive \" ++ myPath,\" \")'*\n lbxDirs.Empty\n Return NIL\n end\n \n for each el in lbxDrives.GetList\n if (el.Left(3) = (myPath)) then \n lbxDrives.FindByValue(el)\n lbxDrives.SelectCurrent\n end\n end\n \n listDirs = {} \n for each f in strPath.AsFileName.Read(\"\")\n listDirs.Add({theFolder, f.GetBaseName})\n end\n\n SELF.SetText(icPlace+strPath)\n SELF.SetPosition(-1)\n \n listDirs.Insert(upIco)\n lbxDirs.DefineFromList(listDir s)\n av.Run(\"dlg.DirBrowser.ColWidth\",lbxDirs)'*** \n '---------------------------------------------------\n' If script called by CLICK event of lbnOK control\n'---------------------------------------------------\nelseif (strCtrlName = \"lbnOK\") then\n longStrPath = tlnPath.GetText\n currStrPath = longStrPath.Right(longStrPath.Count - 10)\n\n if (lbxDirs.HasSelection.Not) then \n if (currStrPath.AsFileName.IsDir) then\n dlgSelf.SetObjectTag(currStrPath)\n dlgSELF.SetModalResult(currStrPath)\n end\n MsgBox.Warning(\"Please select a directory\", \"Nothing Selected\")\n return nil\n \n elseif (lbxDirs.HasSelection) then\n if (currStrPath.Right(1) = strSlash) then\n strSelDir = currStrPath + lbxDirs.GetCurrentValue\n else\n strSelDir = currStrPath + strSlash + lbxDirs.GetCurrentValue\n end\n if (strSelDir.AsFileName.IsDir) then\n dlgSelf.SetObjectTag(currStrPath)\n dlgSELF.SetModalResult(strSelDir)\n 'SET THE WORKING DIRECTORY IN THE SETUP DIALOG\n av.Run(\"NSSetWorkingDir\" , strSelDir)\n else\n MsgBox.Error(strSelDir ++ \"is not a valid directory.\",\"\")'*\n Return NIL\n end \n end\n dlgSelf.Close\n'---------------------------------------------------\n' If script called by CLICK event of lbnCancel control\n'---------------------------------------------------\nelseif (strCtrlName = \"lbnCancel\") then \n dlgSelf.SetObjectTag(\"\")\n dlgSelf.SetModalResult(NIL)\n dlgSelf.Close\nend\nReturn NIL\n" ) (Script.258 Name: "dlg.DirBrowser.Driver_Remove" SourceCode: "'--------------------------------------------------------------------\n' Name : dlg.DirBrowser.Driver\n'\n' Purpose : Provides the user with a way to browse for and choose\n' directories (and only directories) on the file system.\n'\n'--------------------------------------------------------------------\n' Calls : None\n' Called By: The following controls in the dialog \"DirBrowser.Dialog\":\n' SELECT event of cbxDrives\n' APPLY event of tlnPath\n' APPLY event of lbxDir s\n' CLICK event of lbnOK\n' CLICK event of lbnCancel\n'--------------------------------------------------------------------\n' Arguments: None\n' Returns : NIL\n' Globals : USES: None SETS: None\n'\n'--------------------------------------------------------------------\n' Notes : Only tested on NT and UNIX\n'--------------------------------------------------------------------\n' History : Kelly Maloy 8/98 Original Code \n'\n'--------------------------------------------------- -----------------\n\ndlgSelf = SELF.GetDialog\nstrCtrlName = SELF.GetName\ntlnPath = dlgSelf.FindByname(\"tlnPath\")\nlbxDrives = dlgSelf.FindByName(\"cbxDrives\")\nlbxDirs = dlgSelf.FindByName(\"lbxDirs\")\nlbnOK = dlgSelf.FindByName(\"lbnOK\")\n\nstrPath = tlnPath.GetText\n\nif (System.GetOS = #SYSTEM_OS_UNIX) then\n strSlash = \"/\"\nelse\n strSlash = \"\\\"\nend\n\n'---------------------------------------------------\n' If script called by APPLY event of lbxDirs control\n'---------------------------------------------------\n\nif (strC trlName = \"lbxDirs\") then\n strSelDir = SELF.GetCurrentValue\n listPath = strPath.AsTokens(strSlash)\n \n if (strSelDir = \"UP ONE DIRECTORY LEVEL\") then\n \n ' If already at drive level, then exit. Else,\n ' go up a directory and make sure that if the path \n ' is a drive it should appear with a trailing slash \n ' (d:\\ for example) for NT drives.\n \n if (listPath.Count = 1) then\n Return NIL\n else\n strTrim = listPath.Get(listPath.Count - 1)\n strPath = strPath.Substitute( strSlash + strTrim,\"\") \n if (strPath.Right(1) = \":\") then\n strPath = strPath + \"\\\"\n end\n end\n else\n \n ' if the path is a drive (NT) then there is no need to add a\n ' slash between the existing Path and the Directory that gets\n ' appended to that Path.\n \n if (strPath.Right(1) = strSlash) then\n strPath = tlnPath.GetText + strSelDir\n else\n strPath = tlnPath.GetText + strSlash + strSelDir\n end\n end\n\n ' Construct the list of directories for the new Path\n ' and populate the listbox and textline.\n \n listDirs = {\"UP ONE DIRECTORY LEVEL\"}\n for each f in strPath.AsFileName.Read(\"\")\n listDirs.Add(f.GetBaseName)\n end\n lbxDirs.DefineFromList(listDirs)\n tlnPath.SetText(strPath)\n\n'---------------------------------------------------\n' If script called by SELECT event of cbxDrives control\n'---------------------------------------------------\nelseif (strCtrlName = \"cbxDrives\") then\n \n ' Be sure to put a slash after the drive before reading \n ' it as a direct ory. On NT you will get the most currently \n ' accessed directory on that drive (rather than just the \n ' drive level directory itself) if you forget the \"\\\" \n ' after the \":\"\n \n if (strSlash = \"\\\") then\n strPath = SELF.GetCurrentValue + strSlash\n else\n strPath = SELF.GetCurrentValue\n end\n \n ' Construct the list of directories for the new Path\n ' and populate the listbox and textline.\n \n listDirs = {\"UP ONE DIRECTORY LEVEL\"}\n for each f in strPath.AsFileName.Read(\"\")\n listDirs.Add(f.G etBaseName)\n end\n lbxDirs.DefineFromList(listDirs)\n tlnPath.SetText(strPath)\n\n'---------------------------------------------------\n' If script called by APPLY event of tlnPath control\n'---------------------------------------------------\nelseif (strCtrlName = \"tlnPath\") then\n \n ' Unix disk must be preceeded by a slash (ie: /esri2)\n \n if (strSlash = \"/\") then\n strDrive = strSlash + (strPath.AsTokens(strSlash).Get(0))\n else\n strDrive = strPath.AsTokens(strSlash).Get(0)\n end\n \n ' Make sure the user typed in a valid drive/disk\n \n if (lbxDrives.Getlist.FindByValue(strDrive) = -1) then\n MsgBox.Error(\"Could not find drive\" ++ strDrive,\" \")\n lbxDirs.Empty\n Return NIL\n end\n \n lbxDrives.FindByValue(strDrive)\n lbxDrives.SelectCurrent\n \n ' If the user only typed in an NT drive, add a slash for\n ' accurate reading. Otherwise, if the user typed in a\n ' slash after a path, trim the slash.\n \n strRtChar = strPath.Right(1)\n if (strRtChar = \":\") then\n strPath = strPath + \"\\\"\n elseif (strRtChar = strSlash) then\n strPath = strPath.Left(strPath.Count - 1)\n end\n \n ' Construct the list of directories for the new Path\n ' and populate the listbox and textline.\n\n listDirs = {\"UP ONE DIRECTORY LEVEL\"}\n for each f in strPath.AsFileName.Read(\"\")\n listDirs.Add(f.GetBaseName)\n end\n\n SELF.SetText(strPath)\n SELF.SetPosition(-1)\n lbxDirs.DefineFromList(listDirs)\n \n'---------------------------------------------------\n' If script called by CLICK event of lbnOK control\n'----------------- ----------------------------------\nelseif (strCtrlName = \"lbnOK\") then\n \n if (lbxDirs.HasSelection) then\n\n ' construct final directory path to pass back to calling\n ' function via modalresult.\n \n if (strPath.Right(1) = strSlash) then\n strSelDir = strPath + lbxDirs.GetCurrentValue\n else\n strSelDir = strPath + strSlash + lbxDirs.GetCurrentValue\n end\n \n if (strSelDir.AsFileName.IsDir) then\n dlgSelf.SetObjectTag(strPath)\n dlgSELF.SetModalResult(strSelDir)\n else\n MsgBox.Error(strSelDir ++ \"is not a valid directory.\",\"Error\")\n Return NIL\n end\n \n else\n MsgBox.Warning(\"Please select a directory from the list.\",\" \")\n Return NIL\n end\n\n dlgSelf.Close\n \n'---------------------------------------------------\n' If script called by CLICK event of lbnCancel control\n'---------------------------------------------------\nelseif (strCtrlName = \"lbnCancel\") then\n \n dlgSelf.SetModalResult(NIL)\n dlgSelf.Close\n\nend\n\nReturn NIL\n" ) (Script.259 Name: "dlg.DirBrowser.Drives" SourceCode: "'Last Modified: Juna Papajorgji/10.14.99\n' GeoPlan Center, University of Florida\n'-------------------------------------------------------\n'Name: dlg.DirBrowser.Drives\n'Author/Date: Kelly Maloy - Original Code from ESRI\n'Updated_by/Date: \n'Prepared at: \n'-------------------------------------------------------\n'Description: Uses a DLL procedure to get system\n' drive types. Returns them to the \n' dialog's open script.\n'Calls: \n'Called by: dlg.DirBrowser.Open\n'Returns: list of drives \n'Self: \n'Object Tags: \n'-------------------------------------------------------\ndllName = FileName.FindInSystemSearchPath(\"kernel32.dll\")\ntheDLL = DLL.Make(dllName)\nIf (theDLL = nil) then\n MsgBox.Error(\"Couldn't find DLL\",\"DOH!\")\n return nil\nEnd\n\ndllCall = DLLProc.Make(theDLL,\"GetDriveTypeA\",#DLLPROC_TYPE_INT32,\n {#DLLPROC_TYPE_STR})\nif (dllCall = nil) then\n Msgbox.Error(\"D LL call not found.\" + NL + \"Correct case / function name?\",\n \"DOH!\")\n return nil\nend\n\ndrvType = Dictionary.Make(7)\ndrvType.Add(0 , \"Undetermined\")\ndrvType.Add(1 , \"Root doesn't exist\")\ndrvType.Add(2 , \"REMOVABLE\") ' eg floppy\ndrvType.Add(3 , \"FIXED\") ' eg hard\ndrvType.Add(4 , \"REMOTE\") ' eg network\ndrvType.Add(5 , \"CDROM\")\ndrvType.Add(6 , \"RAMDISK\")\n\ndrvList = List.Make\nFor each char in 65..90 ' A-Z\n type = dllCall.Call({char.AsChar + \":\\\"})\n If (type > 1) Then ' Skip the boring ones...\n 'drvList.Add(char.AsChar + \":\\ (\" + drvType.Get(type)+\")\")\n drvList.Add(char.AsChar+\":\\\")\n End\nEnd\nreturn drvList\n" ) (Script.260 Name: "dlg.DirBrowser.lbx.Select" SourceCode: "'Last Modified: Juna Papajorgji/10.15.99\n' GeoPlan Center, University of Florida\n'-------------------------------------------------------\n'Name: dlg.DirBrowser.lbx.Select\n'Author/Date: Juna/10.15.99\n'Updated_by/Date: \n'Prepared at: \n'-------------------------------------------------------\n'Description: Jumps up a directory level, when user clicks\n' on level up icon.\n'Calls: dlg.DirBrowser.Up \n'Called by: Select even t of the listBox\n'Returns: \n'Self: \n'Object Tags: \n'-------------------------------------------------------\n'Get the level up icon\n\nupIcoCtrl = self.GetDialog.FindByName(\"icoUp\")\nif (upIcoCtrl <> nil) then\n upIco = upIcoCtrl.GetIcon\nelse\n upIco = \"\"\nend\n'-------------------------------------------------------\nstrSelDir = SELF.GetCurrentValue\nif (strSelDir.Is(Icon)) then\n \n 'Check if it is the level up icon\n if (strSelDir = upIco) then\n av.Run(\"dlg.DirBrowser.Up\",nil) '*** \n return nil\n else \n return nil\n end\nend" ) (Script.261 Name: "dlg.DirBrowser.Open" SourceCode: "'Last Modified: Juna Papajorgji/10.15.99\n' GeoPlan Center, University of Florida\n'-------------------------------------------------------\n'Name: dlg.DirBrowser.Open\n'Author/Date: Kelly Maloy - Original Code from ESRI\n'Updated_by/Date: \n'Prepared at: \n'-------------------------------------------------------\n'Description: Initializes controls in active dialog.\n' \n'Calls: DriveTypes \n'Called by: OPEN event of \"DirBrowser.Dialog\"\n'Returns : \n'Self: \n'Object Tags: \n'-------------------------------------------------------\ndefaultTitle = \"Directory Browser\"\n'---------------------------------\n'create a buffer string for the icon in the TextLine\nicPlace = String.MakeBuffer(10)\n'-------------------------------------------------------\nptCenter = (av.ReturnOrigin + (av.ReturnExtent / (2@2))) - \n (SELF.ReturnExtent.ReturnSize / (2@2))\nSELF.MoveTo(ptCenter.GetX, ptCenter.GetY)\n\nlbxDrives = SELF.FindByName(\"cbxDrives\" )\nlbxDrives.DefineFromList(av.Run(\"dlg.DirBrowser.Drives\",\"\")) '***\n'-------------------------------------------------------\n' Uses object tags to save the last path that was browsed or\n' to default directory to the calling script's directory,\n' otherwise defaults directory to current\n'-------------------------------------------------------\npassedParam = self.GetObjectTag\nif (passedParam <> nil) then\n theTitle = passedParam.Get(0)\n if (theTitle <> \"\") then\n self.SetTitle(theTitle)\n else\n self.Set Title(defaultTitle)\n end\n initDirName = passedParam.Get(1)\n if (initDirName = \"\") then\n strInitDir = FileName.GetCWD.AsString \n else\n strInitDir = initDirName\n end\nelse\n MsgBox.Info(\"This dialog works properly only if called by \"+\n \"'dlg.DirBrowser.Run' script.\",\"\")\n return nil \nend\n'-----------------------------------\ntlnPath = SELF.FindByname(\"tlnPath\")\ntlnPath.SetText(icPlace+strInitDir)\ntlnPath.Apply 'triggers the Apply script\n" ) (Script.262 Name: "dlg.DirBrowser.Open_old" SourceCode: "'--------------------------------------------------------------------\n' Name : dlg.DirBrowser.Open\n'\n' Purpose : Initializes the dialog \"DirBrowser.Dialog\"\n'\n'--------------------------------------------------------------------\n' Calls : None\n' Called By: OPEN event of \"DirBrowser.Dialog\"\n'--------------------------------------------------------------------\n' Arguments: None\n' Returns : NIL\n' Globals : USES: None SETS: None\n'\n'--------------------------------------------------------- -----------\n' Notes : Only tested on NT and UNIX\n'--------------------------------------------------------------------\n' History : Kelly Maloy 8/98 Original Code \n'\n'--------------------------------------------------------------------\n\n' Center the dialog window\n\nptCenter = (av.ReturnOrigin + (av.ReturnExtent / (2@2))) - (SELF.ReturnExtent.ReturnSize / (2@2))\nSELF.MoveTo(ptCenter.GetX, ptCenter.GetY)\n\n' Construct the drive/disk list for the control cbxDrives\n' UNIX: reads the \"/\" directory. This can take several seconds\n' if there are many disks mounted to the current machine, so \n' a dialog is created on-the-fly to let the user know to expect\n' a little wait.\n' NT: Populates control with every alphabetical drive - does not\n' which drives are mapped.\n\nlbxDrives = SELF.FindByName(\"cbxDrives\")\nif (System.GetOS = #SYSTEM_OS_UNIX) then\n \n dlgWait = Dialog.MakeSized(TRUE,TRUE,TRUE,TRUE,Rect.Make(ptCenter,350@60))\n dlgWait.SetModal(FALSE)\n dlgWait.SetTitle(\"Directory Browser\")\n prompt = TextLabel.Make\n dlgWait.GetControlPanel.Add(prompt,Rect.Make(10@20,350@20))\n prompt.SetLabel(\"DETECTING MOUNTED DISKS. PLEASE WAIT. . .\")\n dlgWait.Open\n System.RefreshWindows\n \n listDisks = {}\n for each d in (\"/\".AsFileName).Read(\"\")\n listDisks.Add(d.AsString)\n end\n lbxDrives.DefineFromList(listDisks)\n dlgWait.Close\n \nelse\n \n lbxDrives.DefineFromList({\"a:\",\"c:\",\"d:\",\"e:\",\"f:\",\"b:\",\"g:\",\"h:\",\"i:\",\n \"j:\",\"k:\",\"l:\",\"m:\",\"n:\",\"o:\",\"p:\",\"q:\",\"r:\",\n \"s:\",\"t: \",\"u:\",\"v:\",\"w:\",\"x:\",\"y:\",\"z:\"})\nend\n\n' Uses object tags to save the last path that was browsed.\n' If no tag exists, then use the project's Working Directory.\n\nstrInitDir = SELF.GetObjectTag\nif ((strInitDir = NIL) or (strInitDir.GetClass.GetClassName <> \"String\")) then\n strInitDir = \"C:\\temp\" 'av.Getproject.GetWorkDir.GetFullName\nend\n\ntlnPath = SELF.FindByname(\"tlnPath\")\ntlnPath.SetText(strInitDir)\ntlnPath.Apply\n\nav.PurgeObjects\nReturn NIL" ) (Script.263 Name: "dlg.DirBrowser.Run" SourceCode: "'Last Modified: Juna Papajorgji/10.18.99\n' GeoPlan Center, University of Florida\n'-------------------------------------------------------\n'Name: dlg.DirBrowser.Run\n'Author/Date: Juna/10.15.99 \n'Updated_by/Date: \n'Prepared at: \n'-------------------------------------------------------\n'Description: Calls the 'DirBrowser.Dialog' passing it\n' a list as Object Tag. The first element \n' in the list is a string for the title \n' of the dialog, the second element is \n' the name of a valid directory. Either of them\n' may be empty strings, in which case\n' the title will default to 'Directory Browser'\n' and the directory name will default to the \n' current working directory's.\n'Calls: \n'Called by: Menu-item or Button or Script\n'Returns: user selected valid directory name or empty string\n'Self: \n'O bject Tags: {dlgTitle, DirName}\n'--------------------------------------------------------\ndlgTitle = \"\"\ncurrDirName = \"\"\n'--------------------------------------------------------\nnoDirMsg = \"Specified directory '\"+currDirName+\"' was not found.\"+nl+\n \"Defaulting to current working directory.\"\n'--------------------------------------------------------\nd = av.GetProject.FindDialog(\"DirBrowser.Dialog\")\nif (nil = d) then\n MsgBox.Error(\"The 'DirBrowser.Dialog' dialog, was not found.\",\n Script.The.GetName)\n return nil\nend\n\nd.SetObjectTag({dlgTitle, currDirName})\n'---------------------------------------------------------\nif (currDirName <> \"\") then\n theDir = currDirName.AsFileName\n if (theDir.Is(FileName)) then\n if(theDir.IsDir.Not) then\n MsgBox.Warning(noDirMsg,\"\") '*\n d.SetObjectTag({dlgTitle, \"\"})\n else\n d.SetObjectTag({dlgTitle, currDirName})\n end\n else\n d.SetObjectTag({dlgTitle, \"\"})\n end\nend\nd.Open\n'------------------------------------------------ ---------\n'after dialog closes get the object tag\n'---------------------------------------------------------\nselectedDirectory = d.GetObjectTag\nd.SetObjectTag(nil)\n'------------------\nreturn selectedDirectory\n" ) (Script.264 Name: "dlg.DirBrowser.Up" SourceCode: "'Last Modified: Juna Papajorgji/10.14.99\n' GeoPlan Center, University of Florida\n'-------------------------------------------------------\n'Name: dlg.DirBrowser.Up\n'Author/Date: Juna/10.14.99 \n'Updated_by/Date: \n'Prepared at: \n'-------------------------------------------------------\n'Description: Goes one directory up.\n'Calls: dlg.DirBrowser.ColWidth \n'Called by: up Button; dlg.DirBrowser.Driver\n'Returns: \n'Self: \n'Ob ject Tags: \n'-------------------------------------------------------\nstrSlash = \"\\\"\nicPlace = String.MakeBuffer(10)\n'-------------------------------------------------------\nif (nil = self) then '*called by 'dlg.DirBrowser.Driver' script\n dlgSelf = av.GetProject.FindDialog(\"DirBrowser.Dialog\")\nelse\n dlgSelf = SELF.GetDialog '*called by the up button\nend\ntlnPath = dlgSelf.FindByname(\"tlnPath\")\nlbxDirs = dlgSelf.FindByName(\"lbxDirs\")\n\nlongStrPath = tlnPath.GetText\nstrPath = longStrPath.Right(longStrPath .Count-10) '10 is number of blank spaces needed for the preceeding icon\n\n'get closed folder icon\ntheIcoCtrl = dlgSelf.FindByName(\"icoClosed\")\nif (theIcoCtrl <> nil) then\n theFolder = theIcoCtrl.GetIcon\nelse\n theFolder = \"\"\nend\n\n'get level up icon\nupIcoCtrl = dlgSelf.FindByName(\"icoUp\")\nif (upIcoCtrl <> nil) then\n upIco = upIcoCtrl.GetIcon\nelse\n upIco = \"\"\nend\n'-------------------------------------------------------\nlistPath = strPath.AsTokens(strSlash) \nif (listPath.Count = 1) then\n Return N IL\nelse\n strTrim = listPath.Get(listPath.Count - 1)\n strPath = strPath.Substitute(strSlash + strTrim,\"\") \n if (strPath.Right(1) = \":\") then\n strPath = strPath + \"\\\"\n end\nend\n \nlistDirs = {} \nfor each f in strPath.AsFileName.Read(\"\")\n listDirs.Add({theFolder, f.GetBaseName})\nend\nif (upIco <> \"\") then\n listDirs.Insert(upIco)\nend\nlbxDirs.DefineFromList(listDirs)\nav.Run(\"Dlg.DirBrowser.ColWidth\",lbxDirs)'***\ntlnPath.SetText(icPlace+strPath)\n\n" ) (Script.265 Name: "MakeDir" SourceCode: "'--------------------------------------------------------------------------\n'Name: MakeDir\n'Written: 09-11-1999, Andy_Lyons. Adapted from script by \n' Andrew Williamson, http://www.geocities.com/SiliconValley/Haven/2295\n'Prepared at: GeoPlan Center, University of Florida\n'--------------------------------------------------------------------------\n'Description: Creates a new directory\n'Requires: \n'Calls: \n'It is called by: \n'Self: A directory string, without the final slash. Ex. c:\\temp\n'Returns: True if the directory already exists or the operation was successful. Else false\n'FileName: \n'--------------------------------------------------------------------------\n\nif (File.Exists(Self.AsFileName)) then\n Return True\nend\n\nkernelDLL = DLL.Make(FileName.FindInSystemSearchPath(\"kernel32.dll\"))\nMkDirProc = DLLProc.Make(kernelDLL, \"CreateDirectoryA\", #DLLPROC_TYPE_INT32, {#DLLPROC_TYPE_STR, #DLLPROC_TYPE_INT32})\n\nif (MkDir Proc.Is(DLLProc)) then\n ret = MkDirProc.Call({Self, 0})\n if (ret = 0) then\n MsgBox.Error (\"Could not make\" ++ Self, \"Can't Make Directory\")\n Return False\n else\n return True\n end\nelse\n MsgBox.Error(\"Can't find kernel32.dll\",\"\")\n return False\nend\n\n\n" ) (Nil.266 ) (Script.267 Name: "NS.CloseDialog" SourceCode: "'CALLED BY A DIALOG\n'CLOSES THE CALLING DIALOG\nSelf.GetDialog.Close\nreturn nil" ) (Script.268 Name: "NSAddShadedReliefImageDialog" SourceCode: "'NSAddShadedReliefImageDialog\n\n'PROMPT THE USER TO ADD A SHADED RELIEF IMAGE TO THE VIEW ONCE THE\n'MODEL HAS COMPLETED. \n\nsrDlog = av.GetProject.FindDialog(\"ShadedReliefDlog\")\naL1 = srDlog.FindByName(\"lstInstructions\")\nTL = {}\n\nTL.Add (\"You may wish to add a shaded relief image to your view\")\nTL.Add (\"to further enhance the display of the model results.\") \nTL.Add (\"\")\nTL.Add (\"To add a shaded relief image, follow these steps:\")\nTL.Add (\"1. Click on the 'Load Shaed Relief' button and navigate\")\nTL.Add (\"t o the Grid or image data source.\")\nTL.Add (\"\")\nTL.Add (\"2. Once added, move the new theme below any themes that\") \nTL.Add (\"you wish to display on top of the image.\")\nTL.Add (\"\")\nTL.Add (\"3. Set transparency on any polygon themes above the\")\nTL.Add (\"image, enabling the shaded relief image to be seen\")\nTL.Add (\"underneath. To set transparency, select the Fill \")\nTL.Add (\"Pallette on the Symbol Window and choose a stipple pattern\")\nTL.Add (\"with the background color set to transparent.\")\n\naL1.DefineFromLi st(TL)\n\nsrDlog.Open\nreturn nil" ) (Script.269 Name: "NSCellSizeUpdate" SourceCode: "'NSCellSizeUpdate'\n'SETS THE CELL SIZE FOR ALL DATA GENERATED DURING THE OVERLAY PROCESS\n' WHEN THE USER DRAGS THE SLIDER, UPDATE THE TEXT IN THE\n' CELL SIZE INPUT BOX. WHEN A NUMBER IS ENTERED IN THE TEXTBOX\n' UPDATE THE SLIDER\n\nsetupDlog = av.Run(\"NSFindSetupDialog\", nil)\ncellSlider = setupDlog.FindByName(\"sldCellSize\")\ncellText = setupDlog.FindByName(\"txtCellSize\")\n\nif (Self = cellSlider) then\n curValue = cellSlider.GetValue\n cellText.SetText(curValue.AsString)\nelse\n curValue = cellText.GetText.AsN umber\n cellSlider.SetValue(curValue)\nend\nreturn nil" ) (Script.270 Name: "NSCloseDialog" SourceCode: "'NSCloseDialog\n\nSelf.GetDialog.Close\nreturn nil" ) (Script.271 Name: "NSCombineGrids" SourceCode: "'NSCombineGrids\n'USE THE SPATIAL ANALYST COMBINE FUNCTION TO COMBINE A LIST OF GRIDS INTO A SINGLE OUTPUT\n' FOR EACH CELL, DETERMINE WHICH INPUT GRIDS HAD VALUES AT THAT CELL AND ADD A FIELD TO\n' THE VAT FOR EACH UNIQUE COMBINATION OF INPUT DATA SET AND VALUE. \n' THE RESULT IS A VALUE COLUMN WHICH HOLDS AN ARBITRARY ID THAT REFERENCES THAT UNIQUE \n' COMBINATION. BECAUSE OF THAT, THE ACTUAL TOTAL OF INPUT VALUES MUST BE CALCULATED\n' INTO A NEW 'TOTAL' FIELD\n\nGridList = Self 'ARGUMENT PASSED IN\nif (Gri dList.Is(List).Not) then\n MsgBox.Error(\"Expected a grid list to be passed in\", Script.The.GetName+\" Error\")\n exit\nend\ngridListMinusFirst = GridList.DeepClone\nfirstGrid = gridListMinusFirst.Get(0)\ngridListMinusFirst.Remove(0)\nstandardOverlayGrid = firstGrid.Combine(gridListMinusFirst)\noverlayVTab = standardOverLayGrid.GetVTab\nfldList = overlayVTab.GetFields.DeepClone\noverlayVTab.StartEditingWithRecovery\ntotalField = Field.Make(\"total\", #FIELD_BYTE, 3, 0)\noverlayVTab.StopEditingWithRecovery(True)\noverlayVTa b.StartEditingWithRecovery\noverlayVTab.AddFields({totalField})\nvalueList = {} 'A LIST OF TOTAL VALUES. THIS WILL BE USED TO DETERMINE HOW MANY UNIQUE VALUES ARE PRESENT\nfor each rec in overlayVTab\n sumVal = 0\n for each fld in fldList\n if ((fld.GetName = \"Value\") or (fld.GetName = \"Count\")) then\n continue\n end\n curVal = overlayVtab.ReturnValue(fld, rec)\n sumVal = sumVal + curVal\n end\n overlayVTab.SetValue(totalField, rec, sumVal)\n valueList.Add(sumVal)\nend\noverlayVTab.StopEditingWithRe covery(True)\nvalueList.RemoveDuplicates 'GET A LIST OF UNIQUE TOTAL VALUES\nvalueList.Sort(True) 'SORT IN ASCENDING ORDER\nreturn {standardOverlayGrid, valueList} 'RETURN THE COMBINED GRID AND THE UNIQUE LIST OF VALUES" ) (Script.272 Name: "NSCreateModelCategoriesTable" SourceCode: "'NSCreateModelCategoriesTable\n'CREATE THE MODEL CATEGORIES TABLE\ncatTabPath = Self.Get(0)\ncatTablename = Self.Get(1)\ncatTab = VTab.MakeNew(catTabPath.AsFileName, dBASE)\nif (nil = catTab) then\n MsgBox.Error(\"Unable to create the required categories table in this project's temp directory:\"++catTabPath,\n \"Directory Not Writeable\")\n return nil\nend\n'START EDITING THE TABLE AND CREATE FIELDS\n'FUTURE MODIFICATIONS TO THE TABLE STRUCTURE WILL HAVE TO BE MADE HERE\n'THE CATEGORY TABLE IS POPULATED WITH ALL KNOWN MODEL CATEGORIES AND CAN\n'BE MODIFIED HERE\ncatTab.SetEditable(True)\ncaFld = Field.Make(\"Category\", #FIELD_CHAR, 75, 0)\nabFld = Field.Make(\"Abbrev\", #FIELD_CHAR, 75, 0)\ncatTab.AddFields({caFld, abFld})\nrec = catTab.AddRecord\ncatTab.SetValue(caFld, rec, \"Cultural Resources\")\ncatTab.SetValue(abFld, rec, \"cul\")\nrec = catTab.AddRecord\ncatTab.SetValue(caFld, rec, \"Visitor Use\")\ncatTab.SetValue(abFld, rec, \"vis\")\nrec = catTab.AddRecord\ncatTab.SetValue(caFld, rec, \"Sensitive Habitat\")\ncatTab.SetValue(abFld, rec, \" sen\")\nrec = catTab.AddRecord\ncatTab.SetValue(caFld, rec, \"Wilderness\")\ncatTab.SetValue(abFld, rec, \"wil\")\nrec = catTab.AddRecord\ncatTab.SetValue(caFld, rec, \"----------Undefined----------\")\ncatTab.SetValue(abFld, rec, \"und\")\ncatTab.SetEditable(False)\n'MAKE A NEW TABLE DOCUMENT AND ADD IT TO THE PROJECT\nnewCatTable = Table.Make(catTab)\nnewCatTable.SetName(catTableName)\nav.GetProject.AddDoc(newCatTable)\nreturn catTab 'RETURN THE CATEGORIES VTAB TO THE CALLING SCRIPT" ) (Script.273 Name: "NSCreateSetupTable" SourceCode: "'NSCreateSetupTable\n'IF THE TABLE DOES NOT EXIST, CREATE IT AND LOAD INTO PROJECT\n\nsetupTabPath = Self.Get(0)\nsetupTableName = Self.Get(1)\nsetupTab = VTab.MakeNew(setupTabPath.AsFileName, dBASE)\nif (nil = setupTab) then\n MsgBox.Error(\"Unable to create the required setup table in this project's temp directory:\"++setupTabPath,\n \"Directory Not Writeable\")\n return nil\nend\n'START EDITING THE TABLE AND CREATE FIELDS\n'FUTURE MODIFICATIONS TO THE TABLE STRUCTURE WILL HAVE TO BE MADE HERE\nsetupTab.SetEditable(T rue)\ntnFld = Field.Make(\"ThemeName\", #FIELD_CHAR, 75, 0)\nprFld = Field.Make(\"Process\", #FIELD_CHAR, 3, 0)\nbdFld = Field.Make(\"Bufferdist\", #FIELD_CHAR, 16, 0)\ncaFld = Field.Make(\"Category\", #FIELD_CHAR, 50, 0)\nsnFld = Field.Make(\"Short_nam\", #FIELD_CHAR, 8, 0)\nshFld = Field.Make(\"Shape\", #FIELD_CHAR, 16, 0)\nweFld = Field.Make(\"Weight\", #FIELD_CHAR, 4, 0)\nsetupTab.AddFields({tnFld, prFld, bdFld, caFld, snFld, shFld, weFld})\nsetupTab.SetEditable(False)\n'MAKE A NEW TABLE DOCUMENT AND ADD IT TO THE PROJECT\nnewS etupTable = Table.Make(setupTab)\nnewSetupTable.SetName(setupTableName)\nav.GetProject.AddDoc(newSetupTable)\nreturn setupTab 'RETURN THE VTAB TO THE CALLING SCRIPT" ) (Script.274 Name: "NSEnableWeightedOverlay" SourceCode: "'NSEnableWeightedOverlay\n'\n'ENABLE THE WEIGHTED OVERLAY FUNCTIONS\n'\nsetupDlog = av.Run(\"NSFindSetupDialog\", nil)\nweightedOverlayCTL = setupDlog.FindByName(\"lblWeightedOverlay\")\nchkWeightedOverlayCTL = setupDlog.FindByName(\"chkWeightedOverlay\")\nstatusMsgCTl = setupDlog.FindByName(\"txtWeightStatus\")\nstatusIconCTl = setupDlog.FindByName(\"icoWeightStatus\")\nif ((weightedOverlayCTL = nil) or (statusMsgCTL = nil) or (statusIconCTL = nil)) then\n MsgBox.Error(\"Unable to locate the weighted overlay controls\",\n \"U nable to process\")\n return nil\nend\nIf (chkWeightedOverlayCTL.IsSelected) then\n weightedOverlayCTL.SetEnabled(True)\n statusMsgCTL.SetLabel(\"Weights will be used\")\n statusIconCTL.SetIcon(Icon.MakeFromResName(\"Icons.DiamondGreen\"))\nelse\n weightedOverlayCTL.SetEnabled(False)\n statusMsgCTL.SetLabel(\"Weights will be ignored\")\n statusIconCTL.SetIcon(Icon.MakeFromResName(\"Icons.DiamondRed\"))\nend\nreturn nil" ) (Script.275 Name: "NSExportTable" SourceCode: "'NSExportTable\n'\n'EXPORT A TABLE TO THE MODEL DIRECTORY FOR ARCHIVING PURPOSES\ndirPath = Self.Get(0) 'GET THE DIRECTORY FROM THE CALLING SCRIPT\nnameString = Self.Get(1) 'NAME OF THE TABLE TO BE WRITTEN\nTableName = av.Run(\"NSGetNames\", nameString)\nexportedTabPath = dirPath+\"\\\"+TableName\nif (nameString = \"setup\") then\n theVTabToExport = av.Run(\"NSFindSetupTable\", nil)\nelse\n theVTabToExport = av.Run(\"NSLoadSelectionTable\", nil)\nend\ntheVTabToExport.Export(exportedTabPath.AsFileName, dBASE, False)\nreturn nil" ) (Script.276 Name: "NSExtensionGetScriptNames" SourceCode: "'GENERATES A LIST OF SCRIPT NAMES FOR USE IN CREATING THE EXTENSION\n'\nscriptDocList = av.GetProject.GetDocs\nscriptList = {}\nfor each sc in scriptDocList\n if (sc.Is(sed)) then\n scriptList.Add(sc.GetName)\n end\nend\nscrString = \"\"\nfor each scr in scriptList\n scrString = scrString + scr.Quote + \", \"\nend\nnewSED = SED.makeFromSource(scrString, \"ListOfScriptNames\")\nreturn nil" ) (Script.277 Name: "NSFindCategoryTable" SourceCode: "'NSFindCategoryTable\n'\n'LOCATES THE MODEL CATEGORIES TABLE\n'\ntableName = av.Run(\"NSGetNames\", \"category\")\ncategoryTable = av.GetProject.FindDoc(tableName)\nif (nil = categoryTable) then\n currentWorkDir = av.Run(\"NStempDir.Get\", nil)\n catTableName = av.Run(\"NSGetNames\", \"category\")\n catTabPath = currentWorkDir.AsString+\"\\\"+catTableName\n catTab = av.Run(\"NSCreateModelCategoriesTable\", {catTabPath, catTableName})\n categoryTable = av.GetProject.FindDoc(tableName)\nelse\n catTab = categoryTable.GetVTab\nend\nif (nil = categoryTable) then\n msgBox.Error(\"Expected a table called modelCategories.dbf\", \"Unable to continue\")\n exit\nelse\n return catTab\nend" ) (Script.278 Name: "NSFindSetupDialog" SourceCode: "'NSFindSetupDialog\n'\n'LOCATES THE SETUP DIALOG\n\nsetupDlog = av.GetProject.FindDialog(\"NSModelSetup\")\nif (setupDlog = nil) then\n MsgBox.Error(\"Expected a dialog called 'NSModelSetup'\", \"Unable to continue\")\n exit\nelse\n return setupDlog\nend" ) (Script.279 Name: "NSFindSetupTable" SourceCode: "'NSFindSetupTable\n'\n'LOCATES THE SETUP TABLE\n'CALLED BY ANY SCRIPT THAT REFERENCES THE TABLE\n'\nsetupTableDoc = av.GetProject.FindDoc(\"nsmodelsetup.dbf\")\nif (nil = setupTableDoc) then\n currentWorkDir = av.Run(\"NStempDir.Get\", nil)\n setupTableName = av.Run(\"NSGetNames\", \"setup\")\n setupTabPath = currentWorkDir.AsString+\"\\\"+setupTableName\n setupTab = av.Run(\"NSCreateSetupTable\", {setupTabPath, setupTableName})\nelse\n setupTab = setupTableDoc.GetVTab\nend\nif (setupTab = nil) then\n MsgBox.Error(\"Expected a ta ble called 'nsmodelsetup.dbf'. Please load this table\", \"Unable to Continue\")\n exit\nelse\n return setupTab\nend" ) (Script.280 Name: "NSFindSetupView" SourceCode: "'NSFindSetupView\n'\n'LOCATES THE DATA SETUP VIEW\n'CALLED BY ANY SCRIPT THAT USES THIS VIEW\n'\nsdView = av.GetProject.FindDoc(\"Sensitive Areas Model (SAM) Source Data\")\nif (sdView = nil) then\n msgBox.Error(\"Expeced a view called 'Sensitive Areas Model (SAM) Source Data'\", \"Unable to continue\")\n exit\nelse\n return sdView\nend" ) (Script.281 Name: "NSGetControlList" SourceCode: "'NSGetControlList\n'\n'RETURN A LIST OF ALL LISTBOXES TO THE CALLING SCRIPT\n\nsetupDlog = av.Run(\"NSFindSetupDialog\", nil)\nsdThemeCtl = setupDlog.FindByName(\"lstTheme\")\nsdShapeCtl = setupDlog.FindByName(\"lstShape\")\nsdCategoryCtl = setupDlog.FindByName(\"lstCategory\")\nsdModelThemeCtl = setupDlog.FindByName(\"lstModelTheme\")\nsdBufferDistCtl = setupDlog.FindByName(\"lstBufferDist\")\nsdProcessCtl = setupDlog.FindByName(\"lstProcess\")\nreturn nil" ) (Script.282 Name: "NSGetDataDir" SourceCode: "'-------------------------------------------------------\n'Name: NSGetDataDir\n'Author/Date: \n'Updated_by/Date: \n'Prepared at: \n'-------------------------------------------------------\n'Description: GETS THE DIRECTORY CONTAINING DATA THAT HAS\n' BEEN PREPROCESSED AND IS READY TO BE USED \n' BY THE OVERLAY PROCESSES\n'Calls: \n'Called by: NSStandardOverlay\n'Returns: PATH TO SOURCE DATA AS STRING\n'Self: \n'Objec t Tags: EVALUATES OT STORED WITH PREPROCESS BUTTON\n' WHICH CONTAINS THE PATH THE THE LAST DATA\n'--------------------------------------------------------\n'\nsetupDlog = av.Run(\"NSFindSetupDialog\", nil)\nconvertCTL = setupDlog.FindByName(\"lblStandardOverlay\")\nif (convertCTL = nil) then\n MsgBox.Error(\"Unable to locate the data conversion button\", \"Unable to process\")\n return nil\nend\n\n'GET THE OBJECT TAG AND FIND THE LAST DIRECTORY\nlastDir = convertCTL.GetObjectTag\nif (lastDir = nil) then\n if (Self = \"Standard\") then\n 'IF STANDARD OVERLAY AND IF DIRECTORY NOT SET, RETURN\n return nil\n end\nelse\n if (lastDir.AsFileName.IsDir) then\n 'OPEN THE FILE AND VERIFY ITS EXISTENCE\n doneFileName = (lastDir+\"\\completed.mdl\").AsFileName\n doneFile = textFile.Make(doneFileName, #FILE_PERM_READ)\n if (doneFile <> nil) then\n doneFile.Close\n 'IF WEIGHTED, ALLOW THE USER TO SELECT MOST RECENT OR ANOTHER DIRECTORY\n if (Self = \"Weighted\") then\n 'ASK THE USER IF THIS DIRECTO RY SHOULD BE USED\n useLast = MsgBox.YesNo(lastDir, \"Use data from the most recent data conversion process?\", True)\n 'IF SO, RETURN THIS DIRECTORY TO THE CALLING SCRIPT\n if (useLast) then\n return lastDir\n end\n else\n 'IF STANDARD OVERLAY, RETURN THE DIRECTORY CREATED DURING PREPROCESSING\n return lastdir\n end\n else\n 'COMPLETED FILE NOT FOUND IN DIR, PREPROCESS NOT COMPLETED\n if (self = \"standard\") then\n return nil\n end\n en d\n end\nend\n'IF WE HAVE GOTTEN THIS FAR WITHOUT RETURNING, THE SYSTEM HAS NO REFERENCE TO THE LAST COMPLETED MODEL AND USER MUST SELECT ONE.\n'OTHERWISE, ASK FOR A DIRECTORY\n'MUST SELECT A FILE CALLED completed.mdl, WHICH INDICATES A DIRECTORY WITH VALID\n' PREPROCESSED DATA. \ntoBrowse = MsgBox.YesNo(\"Unable to locate last completed model. Hit 'YES' to browse to the last completed model's 'reclassed' dir containing 'completed.mdl' file. or 'NO' to exit\", \"Locate last completed model\", True)\nif (toBrowse) th en \n validFile = FileDialog.Show(\"*.mdl\", \"Completed Standard Overlay Model\", \"Browse to a completed Standard Overlay Model\")\nelse\n validFile = nil\nend\nif (validFile = nil) then\n return nil\nelse\n 'REMOVE THE FILENAME AND RETURN THE DIRECTORY CONTAINING COMPLETED PREPROCESSED DATA.\n strippedDir = validFile.AsString.Substitute(\"\\completed.mdl\", \"\")\n 'SET THE PREPROCESS BUTTON'S OBJECTTAG TO THE PREPROCESSED DATA'S PATH (RECLASS DIR)\n 'SO FURTHER WEIGHTED OVERLAYS WILL NOT PROMPT THE USER\n convertCTL.S etObjectTag(strippedDir)\n return strippedDir\nend\n" ) (Script.283 Name: "NSGetNames" SourceCode: "'NSGetNames\n\n'RETURN THE NAME OF THE TABLE. ALL TABLES USED IN THIS EXTENSION WILL\n' BE NAMED HERE SO FUTURE CHANGES TO THE APPLICATION CAN BE EASILY MADE\n\n'Self IS THE TYPE OF TABLE BEING REQUESTED\n\nif (Self = \"category\") then\n return \"modelCategories.dbf\"\nelseIf (Self = \"setup\") then\n return \"nsmodelsetup.dbf\"\nelseIf (Self = \"stats\") then\n return \"modelstats.dbf\"\nelseIf (Self = \"selection\") then\n return \"themeselections.dbf\" \nelse\n return nil\nend" ) (Script.284 Name: "NSGetShapeType" SourceCode: "'NSGetShapeType\n\n'GET THE THEME'S SHAPE TYPE\nthm = Self\nif (thm.Is(FTheme)) then\n sdShape = thm.GetFTab.GetShapeClass.GetClassName\nelseIf (thm.Is(GTheme)) then\n sdShape = \"Grid\"\nelse\n sdShape = \"Invalid Shape Type\"\nend\nreturn sdShape\n" ) (Script.285 Name: "NSHelp.DistanceUnits" SourceCode: "'NSHelp.DistanceUnits\n'HELP FOR BUFFER DISTANCE UNITS FUNCTIONS\n\naMsg = \"Source data for this model is stored in specific Map Units, such as meters, and can be identified in the View -- properties menu. \" +\n \"By default, all distances are expressed in your data's native map units, but this can be changed. Below are some typical scenarios:\" +\n NL + NL +\n \"1. Map Units are unknown or are not set in View -- Properties. In this case, select 'Other' and it will be assumed that user-defined buffer distances are expressed in the same units as the map units. \" +\n \"For example, data is in decimal degrees, so buffer distances must be entered in degrees. \" +\n NL + NL +\n \"2. Map Units are feet or meters. In this case, buffer distance units can be entered in either feet or meters and units will be converted to map units. \"+\n NL + NL +\n \"If the wrong combination of map/distance units is used (map units = unknown, distance units = feet), a warning message will prompt the user to modify these settings.\"\nMsgBox.Report(aMsg, \"Buffer Distance Units Help\")\nreturn nil" ) (Script.286 Name: "NSHelp.Main" SourceCode: "'NSHelp.Main\n'GENERAL HELP FOR THE MAIN DIALOG\n\naMsg = \"The Model Setup and Administration menu is where the entire model process is managed, from data setup to the final overlay analysis. The menu consists of six functional areas, each of which can be interacted with during the model process. \" +\n \"The setup steps (1 - 3) must be run before the Standard Overlay function can be used. Once this is completed, an unlimited number of Weighted Overlays can be run. \" +\n NL + NL +\n \"Details S ection (empty area at top of the menu): All of the theme-based settings are displayed in this section, which consists of one row for each theme present in the SAM Source Data View and one column for each type of setting. Starting on the left side of the Details Section, the columns are Theme Name, Category, Buffer Distance, Process, Weight, and Shape. \" +\n NL + NL +\n \"Load Theme Settings From: This section provides functionality to load the list of themes from the Data Setup View, load from Settings Table (only if previously saved), and save to Settings Table. Each theme's inclusion status as well as how it is treated within the model can be toggled here. This is the first step that must be completed. \" +\n NL + NL +\n \"Buffer Distance Units: Any buffer distances specified in the Details Section for a particular theme would normally be expressed in the same units as the default map units. This section allows the user to express buffer distances as either the default map units, f eet, or meters for added flexibility\" +\n NL + NL +\n \"Output Data Settings: This part of the menu sets parameters for the output data created the model process. Each of these settings is required before the model can be run.\" +\n NL + NL +\n \"Standard Overlay: Once all of the settings have been specified (steps 1 - 3) and the setup table saved, the Standard Overlay function can be run. This runs the data conversion and preprocessing steps and create the standard overlay output theme (non-weighted).\" +\n NL + NL +\n \"Weighted Overlay: This step is necessary if the user wishes to assign weights to specific themes, causing the model to value themes with higher weights more than those with lover weights. The process is exactly the same as the Standard Overlay, but allows values (weights) other than 1. This can be used to evaluate seasonal and other changes that may vary over time. This functionality is disabled until the data conversion and standard overlay steps have been r un.\"\n \nMsgBox.Report(aMsg, \"Model Setup and Administration Menu Help\")\nreturn nil\n" ) (Script.287 Name: "NSHelp.OutputDataSettings" SourceCode: "'NSHelp.OutputDataSettings\n'HELP FOR OUTPUT DATA SETTINGS FUNCTIONS\n\naMsg = \"The Output Data Settings part of the menu sets parameters for the output data created the model process. Each of these settings is required before the model can be run. \" + \n NL + NL +\n \"Working Directory: All data created for the purpose of generating the final output model is written to the working directory. By clicking on this button, the user can navigate to an existing directory or create a new directory to fu nction as the top level working directory. During the model process, several subdirectories will be created. To guarantee uniqueness, a new subdirectory will be created each time a model is created and is composed of a combination of date and time values. When sorted chronologically, the most recent model will appear at the bottom of the list of subdirectories. Within each model subdirectory, directories named converted, buffered, reclassed, and final will be created to hold data generated during variou s stages of the modeling process. They have been named logically such that the user knows which directory contains which type of data. Data initially converted from vector to grid will be put in converted. Themes with a buffer distance specified will be buffered and put in the buffered directory. All converted and buffered data will be reclassified to ensure that values are either 0 or 1. All reclassified data will then be combined to form the final model output. \" +\n NL + NL +\n \"Overlay E xtent Theme: Each time the model is run, themes of different spatial extents can be included. To limit the analysis extent, a theme representing the park boundary or any other logical spatial extent can be used to define this setting. The overlay extent theme must be present in the Data Setup view and the Details Section of the menu, but can have a Process setting of no to be excluded from the model. \" +\n NL + NL +\n \"Resolution (Cell Size): Each theme converted during the modeling process i s converted to a GRID, which is a cell-based raster data format. The output cell size must be set before running the model so each output data set has the same cell size. The cell size is in map units, so if using data in State Plane feet, the cell size will also be in feet. If a cell size of 100 feet is entered, each cell in the output data sets will be 100ft by 100ft. The cell size can be set by moving the slider, using the left and right buttons, or typing a number in the input box and hitting enter on the keyboard. The smaller the cell size, the higher the resolution; the larger the cell size, the lower the resolution. Increasing the resolution also increases the amount of storage space and computation time required. Reducing the cell size can improve the resolution, but the output theme will not be more accurate than the maximum cell size of the input themes.\"\nMsgBox.Report(aMsg, \"Output Data Settings Help\")\nreturn nil" ) (Script.288 Name: "NSHelp.StandardOverlay" SourceCode: "'NSHelp.StandardOverlay\n'PROVIDES HELP WITHT STANDARD OVERLAY FUNCTIONS\n\naMsg = \"The Standard Overlay function applies all of the settings currently displayed in the list. Data will be converted and preprocessed before calling the standard overlay function. \" +\n \"The output is a location by location combination of input data, expressed as a single raster (Grid) data set representing all combined input data. \" +\n \"The value for each location is an additive summary if input values. For example , if a given XY location is covered by two input data sets (Grizzly Bear Habitat and Bald Eagle Nesting Areas), the value for this location would be 2. \" +\n \"This can only be run after the previous steps have been completed. The system will not create the standard overlay model if steps have been skipped. \"+\n \"At least one Standard Overlay must be completed before running a Weighted Overlay Model. \"\nMsgBox.Report(aMsg, \"Standard Overlay Help\")\nreturn nil" ) (Script.289 Name: "NSHelp.ThemeSettings" SourceCode: "'NSHelp.ThemeSettings\n'HELP FOR THE THEME SETTINGS AREA\n\naMsg = \"Model settings for each theme can be initally loaded from the Data Setup View. \" +\n \"If a model has previously been completed, settings can be loaded automatically from the last completed model or an archived model.\" +\n NL + NL +\n \"Data Setup View: Theme names and shape types will automatically be read from the view. Individual themes can be included or excluded from the model once this has been done.\" +\n NL + NL +\n \"Last Completed Model: Each time a model is completed, a reference to its saved settings is created, enabling them to be reloaded at any time. \" +\n NL + NL +\n \"Archived Model: The settings for each completed model are written to the ouput directory and can be reloaded at any time by navigating to the appropriate directory\" +\n NL + \"When a standard overlay model is run, a date/time stamped (unique) directory is created. Inside this directory, subdirectories named buffered, convert ed, reclassed, and final are created to hold data created during various stages of the model process. To load an archived table, navigate to the final directory of the desired archived model and load nsmodelsetup.dbf. Since the archived directories are only represented by unique date and time, you may wish to rename it to something more meaningful or document the goals of this specific model so it can be located later. \" +\n NL + NL +\n \"Save Settings: Settings can be saved at any time by pres sing this button, but they will be saved automatically each time the model is run. Settings are saved to a file called nsmodelsetup.dbf in the system's temp directory\"\nMsgBox.Report(aMsg, \"Theme Settings Help\")\nreturn nil" ) (Script.290 Name: "NSHelp.WeightedOverlay" SourceCode: "'NSHelp.WeightedOverlay\n'HELP FOR WEIGHTED OVERLAY FUNCTIONS\n\naMsg = \"These steps are necessary if the user wishes to assign weights to specific themes, causing the model to value themes with higher weights more than those with lover weights. The process is exactly the same as the Standard Overlay, but allows values other than 1. This functionality is disabled until the data conversion and standard overlay steps have been run. \" +\n NL + NL +\n \"Enable Weighted Overlay: Enables the Run Weighted Overlay button and tells the model to honor the values in the Weight column of the menu's Details Section. By default, and when this is not checked, the Weight column is displayed, but the values are not used. The status message immediately below the checkbox will change and the icon will change from red to green when the Weighted Overlay functionality has been enabled. \" +\n NL + NL +\n \"Run Weighted Overlay: This takes data converted during the Standard Overlay process and using the assigne d weights, creates a single Weighted Overlay theme. Each time a Weighted Overlay GRID is created, the user must select a directory containing a completed Standard Overlay GRID and its associated input data. Since the same input data may be used to generate multiple Weighted Overlay GRIDs, this process can be run more than once in the same directory and creates a user-named output GRID in the Final directory. By default, the first Weighted Overlay GRID is called Weighted01. The user is free to continue t his naming convention with additional Weighted Overlays or can use any other unique name. The GRID data format has a 13-character name limit and does not allow spaces or some special characters. To change one or more input themes or to alter buffers, the Basic Steps must be run again.\"\nMsgBox.Report(aMsg, \"Weighted Overlay Help\")\nreturn nil" ) (Script.291 Name: "NSInit" SourceCode: "'NSInit\n'\n'RUN WHEN PROJECT IS OPENED\n'THIS SCRIPT ENSURES THAT THE TWO TABLES USED BY THIS APPLICATION HAVE BEEN CREATED.\n'IF NOT PRESENT, THEY WILL BE CREATED IN THE SYSTEM TEMP DIRECTORY\n\n\n'GET THE PROJECT'S CURRENT WORKING DIRECTORY\ncurrentWorkDir = av.Run(\"NStempDir.Get\", nil)\nsetupTableName = av.Run(\"NSGetNames\", \"setup\")\nsetupTabPath = currentWorkDir.AsString+\"\\\"+setupTableName\ncatTableName = av.Run(\"NSGetNames\", \"category\")\ncatTabPath = currentWorkDir.AsString+\"\\\"+catTableName\nstatsTableName = av.Ru n(\"NSGetNames\", \"stats\")\nstatTabPath = currentWorkDir.AsString+\"\\\"+statsTableName\n\n'VERIFY THAT THE SETUP TABLE EXISTS. IF NOT, THIS MAY BE THE FIRST TIME THE USER\n'HAS RUN THE MODEL OR THE TEMP DIRECTORY MAY HAVE CHANGED\n\nif (File.Exists(setupTabPath.AsFileName)) then\n 'NOTHING TO DO YET\nelse\n 'CREATE THE SETUP TABLE\n av.Run(\"NSCreateSetupTable\", {setupTabPath, setupTableName})\nend\n\n'VERIFY THAT THE MODEL CATEGORIES TABLE EXISTS. IF NOT, CREATE IT\nif (File.Exists(catTabPath.AsFileName)) then\n 'NOTHING TO DO YET\nelse\n 'CREATE THE MODEL CATEGORIES TABLE\n av.Run(\"NSCreateModelCategoriesTable\", {catTabPath, catTableName})\nend\nreturn nil " ) (Script.292 Name: "NSLoadSelectionTable" SourceCode: "'NSLoadSelectionTable\n'GENERATE A NEW TABLE TO RECORD INFORMATION ABOUT EACH THEME USED IN THE MODEL\n' EACH THEME'S NUMBER OF SELECTED FEATURES, TOTAL FEATURES, AND THEME DEFINITION WILL BE RECORDED\n\ncurrentWorkDir = av.Run(\"NStempDir.Get\", nil)\nselectionTableName = av.Run(\"NSGetNames\", \"selection\")\nselectionTabPath = currentWorkDir.AsString+\"\\\"+selectionTableName\nif (File.Exists(selectionTabPath.AsFileName)) then\n selectionTab = VTab.Make(selectionTabPath.AsFileName, True, False)\n if (nil = selectionTab) then\n MsgBox.Error(\"Unable to locate the required selection table in this project's temp directory:\"++selectionTabPath,\n \"Unable to load table\")\n return nil\n else\n 'CLEAR ANY EXISTING RECORDS\n numRecs = selectionTab.GetNumRecords - 1\n 'IF NO RECORDS IN TABLE, DON'T ATTEMPT TO DELETE ANYTHING\n if (numRecs > 0) then\n selectionTab.SetEditable(True)\n for each p in 0..numRecs\n selectionTab.RemoveRecord(p)\n end\n selectionTab.SetEditable(False)\n end\n end\nelse\n 'CREATE THE SELECTION TABLE\n selectionTab = VTab.MakeNew(selectionTabPath.AsFileName, dBASE)\n if (nil = selectionTab) then\n MsgBox.Error(\"Unable to create the required selection table in this project's temp directory:\"++selectionTabPath,\n \"Directory Not Writeable\")\n return nil\n end\n 'START EDITING THE TABLE AND CREATE FIELDS\n 'FUTURE MODIFICATIONS TO THE TABLE STRUCTURE WILL HAVE TO BE MADE HERE\n tnFld = Field.Make(\"ThemeName\", #FIELD_CHAR, 75, 0)\n sfFld = Field.Make(\"Selected\", #FIELD_CH AR, 20, 0) 'SELECTED FEATURE COUNT\n tfFld = Field.Make(\"Tot_feat\", #FIELD_CHAR, 20, 0) 'TOTAL FEATURE COUNT\n tpFld = Field.Make(\"theme_path\", #FIELD_CHAR, 240, 0) 'FULL DISK PATH TO SOURCE DATA\n tdFld = Field.Make(\"theme_def\", #FIELD_CHAR, 240, 0) 'THEME DEFINITION\n selectionTab.AddFields({tnFld, sfFld, tfFld, tpFld, tdFld})\n selectionTab.SetEditable(False)\n 'MAKE A NEW TABLE DOCUMENT AND ADD IT TO THE PROJECT\n' newselectionTable = Table.Make(selectionTab)\n' newselectionTable.SetName(\"Theme Propert ies\")\n' av.GetProject.AddDoc(newselectionTable)\nend\nreturn selectionTab" ) (Script.293 Name: "NSLoadSetupParametersFromArchivedTable" SourceCode: "'NSLoadSetupParametersFromArchivedTable\n\n'ALLOW USER TO NAVIGATE TO A PREVIOUSLY GENERATED VERSION OF THE SETUP TABLE.\n'THIS WOULD HAVE BEEN CREATED AND SAVED DURING A PREVIOUS MODEL RUN.\n\ncurTempDir = av.Run(\"NStempDir.Get\", nil)\nsetupTableName = av.Run(\"NSGetNames\", \"setup\")\ndefaultSetupTablePath = curTempDir+\"\\\"+setupTableName\nselectedFile = FileDialog.Show(setupTableName, \"Archived Setup Table\",\n \"Select an Archived Model Setup Parameters Table\")\n\n'IF THE USER HIT CANCEL OR FILE NOT FOUND FOR ANY REASON, INFORM \nif (nil = selectedFile) then\n MsgBox.Info(\"Archived table not loaded\", \"No file selected\")\n return nil\nend\n\n'FIND AND REMOVE THE CURRENT SETUP TABLE\nsetupTab = av.GetProject.FindDoc(setupTableName)\nif (nil <> setupTab) then\n av.GetProject.RemoveDoc(setupTab)\n setupTab = nil\nend\n\n'COPY THE SELECTED ARCHIVED SETUP TABLE TO THE TEMP DIR\nFile.Copy(selectedFile, defaultSetupTablePath.AsFileName)\n\nsetupTab = VTab.Make(defaultSetupTablePath.AsFileName, False, False)\nnewSet upTable = Table.Make(setupTab)\nnewSetupTable.SetName(setupTableName)\nav.GetProject.AddDoc(newSetupTable)\n\n'ONCE THE ARCHIVED TABLE HAS BEEN COPIED AND LOADED INTO THIS PROJECT, \n' CALL THE SCRIPT THAT LOADS SETTINGS FROM THE TABLE\nav.Run(\"NSLoadSetupParametersFromTable\", nil)\nreturn nil" ) (Script.294 Name: "NSLoadSetupParametersFromCurrentView" SourceCode: "'NSLoadSetupParametersFromCurrentView\n'LOADS REFERENCES TO ALL THEMES IN THE SETUP VIEW INTO THE DETAILS SECTION OF MODEL\n'ADMIN MENU.\n'\n'\n'SET UP SOME BASIC VARIABLES\naPrj = av.GetProject\nsetupDlog = av.Run(\"NSFindSetupDialog\", nil)\nsdView = av.Run(\"NSFindSetupView\", nil)\nsetupTab = av.Run(\"NSFindSetupTable\", nil)\nsetupList = setupDlog.FindByName(\"lstModelSetup\")\ntotalRows = sdView.GetThemes.Count + 2 'NUMBER OF ROWS TO ADD, LEAVING ROOM FOR HEADING AND BLANK LINE\nlistOfFields = setupList.GetTag.AsTokens( \" \") 'FIELD NAMES STORED IN THE TAG OF THE LISTBOX\ntotalColumns = listOfFields.Count\nlastColumnPos = listOfFields.Count - 1\n\n'DETERMINE IF THE LIST OF THEMES SHOULD BE EMPTIED AND RELOADED FROM THE VIEW OR IF\n' ONLY NEW THEMES SHOULD BE LOADED\nnumExistingRows = setupList.GetRowCount\nif (numExistingRows > 0) then\n choice1 = \"Empty current list and reload from view\"\n choice2 = \"Load only new themes into current list\"\n whatToLoad = MsgBox.ListAsString({choice1, choice2}, \"Which themes should be loaded?\", \" Load From View\")\n if (nil = whatToLoad) then\n return nil\n elseIf (whatToLoad = choice1) then\n loadMethod = \"All\"\n else\n loadMethod = \"New\"\n end \nelse\n loadMethod = \"All\"\nend\n\nif (loadMethod = \"All\") then\n 'CLEAR THE LISTBOX BEFORE ADDING ANYTHING\n setupList.GoRowColumn(0,0)\n setupList.DeleteRows(setupList.GetRowCount)\n setupList.DeleteColumns(setupList.GetColumnCount)\n setupList.Empty\n \n curColumnPos = 0 'A COUNTER\n curRowPos = 0\n \n 'ADD A COLUMN TO THE LISTBOX FOR EACH FIELD AND A ROW FOR EACH THEME IN THE SETUP VIEW \n setupList.InsertColumns(totalColumns)\n setupList.InsertRows(totalRows) 'ADD 2 EXTRA TO HOLD THE HEADING AND A BLANK ROW BENEATH\n \n 'INSERT THE FIELD NAMES FROM THE LISTBOX TAG PROPERTY\n for each g in listOfFields\n setupList.GoRowColumn(curRowPos, curColumnPos)\n setupList.SetCurrentValue(g)\n curColumnPos = curColumnPos + 1\n end\n 'ADD AN EMPTY ROW UNDER THE COLUMN HEADING\n curRowPos = 1\n curColumnPos = 0\n for each t in listOfFields\n setupList.GoRowC olumn(curRowPos, curColumNPos)\n setupList.SetCurrentValue(\" \")\n curColumnPos = curColumnPos + 1\n end\n listOfThemesToUse = sdView.GetThemes 'IF LOADING ALL THEMES, SET A VARIABLE REFERENCING THE ENTIRE LIST OF THEMES\nelse 'IF LOADING \"NEW\" THEMES ONLY\n 'DETERMINE WHICH THEMES ARE NEW\n listOfNewThemes = {}\n curListOfLists = setupList.GetList 'THIS ACTUALLY RETURNS A LIST FOR EACH ROW, SO THEY MUST BE ADDED TO FORM ONE LIST\n curListOfThemes = {}\n for each val in curListOfLists\n curListOfThemes = curListOfThemes + val\n end\n for each t in sdView.GetThemes\n listPosition = curListOfThemes.FindByValue(t.GetName)\n if (listPosition = -1) then\n listOfNewThemes.Add(t)\n end\n end\n 'IF NO NEW THEMES TO ADD, INFORM THE USER THAT NOTHING WILL BE DONE\n if (listOfNewThemes.Count = 0) then\n MsgBox.Info(\"No new themes to add\", \"\")\n return nil\n else\n 'INSERT NEW ROWS AND POSITION THE CURSOR JUST ABOVE THE NEW ROWS\n curRowPos = 1\n setupList.GoRowColumn(curRowPos, 0)\n setupList.I nsertRows(listOfNewThemes.Count)\n listOfThemesToUse = listOfNewThemes\n end\nend 'if (loadMethod = \"All\")\n\ncurRowPos = curRowPos + 1\nfor each thm in listOfThemesToUse\n setupList.GoRowColumn(curRowPos, 0) \n sdTheme = thm.GetName 'GET THE THEME'S NAME\n setupList.SetCurrentValue(sdTheme) 'THEME NAME\n setupList.GoRowColumn(curRowPos, 1)\n setupList.SetCurrentValue(\"----------Undefined----------\") 'CATEGORY\n setupList.GoRowColumn(curRowPos, 2) \n setupList.SetCurrentValue(\"Do Not Buffer\") 'BUFFER\n setu pList.GoRowColumn(curRowPos, 3) \n setupList.SetCurrentValue(\"no\") 'PROCESS\n 'SET A DEFAULT WEIGHT OF 1 FOR EACH THEME\n setupList.GoRowColumn(curRowPos, 4)\n setupList.SetCurrentValue(\"1\")\n 'GET THE THEME'S SHAPE TYPE\n sdShape = av.Run(\"NSGetShapeType\", thm)\n setupList.GoRowColumn(curRowPos, 5) \n setupList.SetCurrentValue(sdShape)\n curRowPos = curRowPos + 1 'INCREMENT ROW NUMBER BY 1\nend\n\n'MAKE THE COLUMNS FIT WITHIN THE LISTBOX DISPLAY\nsetupList.FitColumns(0..LastColumnPos, False)\n\n'ENABLE THE ' SAVE SETTINGS' BUTTON\nav.Run(\"NSSaveSettingsUpdate\", True)\n'ENABLE THE 'DATA CONVERSION' BUTTON\nav.Run(\"NSStandardOverlayUpdate\", True)\n'DISABLE THE WEIGHTED OVERLAY FUNCTION. SINCE THE SETTINGS HAVE JUST BEEN LOADED FROM\n' THE CURRENT VIEW, THE DATA CONVERSION AND STANDARD OVERLAY STEP MUST BE RUN FIRST.\nwoCtl = setupDlog.FindByName(\"chkWeightedOverlay\")\nav.Run(\"NSEnableWeightedOverlay\", woCtl)\nwoCtl.SetEnabled(False)\nreturn nil\n" ) (Script.295 Name: "NSLoadSetupParametersFromTable" SourceCode: "'NSLoadSetupParametersFromTable\n'\n'LOAD SAVED PARAMETERS FROM A TABLE\n\n'MAKE SURE THE DATA VIEW CAN BE FOUND\ndataView = av.GetProject.FindDoc(\"Sensitive Areas Model (SAM) Source Data\")\n'VERIFY THAT THE DATA VIEW IS PRESENT\nif (dataView = nil) then\n MsgBox.Error(\"All data must be in a view titled: Sensitive Areas Model (SAM) Source Data\",\n \"Unable to verify data\")\n exit\nend\n\n'SET SOME BASIC VARIABLES TO BE USED THROUGHOUT THE SCRIPT\nsetupDlog = av.Run(\"NSFindSetupDialog\", nil)\nsdView = av.Ru n(\"NSFindSetupView\", nil)\nsetupTab = av.Run(\"NSFindSetupTable\", nil)\nsetupList = setupDlog.FindByName(\"lstModelSetup\")\ntotalRows = setupTab.GetNumRecords + 2\nlistOfFields = setupList.GetTag.AsTokens(\" \") 'FIELD NAMES STORED IN THE TAG OF THE LISTBOX\nlistOfFieldObjects = {} 'FIELD OBJECT REFERENCES USED BELOW\nlastColumnPos = listOfFields.Count - 1\nmissingThmList = {} 'USED TO COMPILE A LIST OF ANY THEMES THAT ARE REFERENCED IN THE TABLE, BUT CAN'T BE LOCATED IN THE VIEW\nrowsToDelete = {} 'A LIST TO RECORD ALL ROWS WITH INVALID THEMES. USER WILL BE ABLE TO LOAD ALL OTHER THEMES\n\n'CLEAR THE LISTBOX BEFORE ADDING ANYTHING\nsetupList.GoRowColumn(0,0)\nsetupList.DeleteRows(setupList.GetRowCount)\nsetupList.DeleteColumns(setupList.GetColumnCount)\nsetupList.Empty\n\n'VERIFY THAT EACH FIELD STORED IN THE LISTBOX TAG PROPERTY CAN BE FOUND IN THE SETUP TABLE\nfor each fldName in listOfFields\n 'SHAPE IS NOT STORED IN THE TABLE, SO DON'T ATTEMPT TO LOAD IT\n if (fldName = \"Shape\") then\n continue\n end\n srcFld = setupTa b.FindField(fldName)\n 'MAKE SURE FIELD EXISTS IN TABLE\n if (srcFld = nil) then\n MsgBox.Error(\"Unable to find \"+fldName.Quote+\"in nsmodelsetup.dbf\", \"\")\n exit\n end\n listOfFieldObjects.Add(srcFld) 'ADD EACH FIELD TO A NEW LIST, WHICH WILL BE USED TO LOAD RECORDS FROM THE VTAB\nend\n\n\n'ADD A COLUMN TO THE LISTBOX FOR EACH FIELD AND A ROW FOR EACH RECORD IN THE SETUP TABLE \nsetupList.InsertColumns(ListOfFields.Count)\nsetupList.InsertRows(totalRows) 'ADD 2 EXTRA TO HOLD THE HEADING AND A BLANK ROW BENEAT H\n\n'INSERT THE FIELD NAMES FROM THE LISTBOX TAG PROPERTY\ncurColumnPos = 0 'A COUNTER\ncurRowPos = 0\nfor each g in listOfFields\n setupList.GoRowColumn(curRowPos, curColumnPos)\n setupList.SetCurrentValue(g)\n curColumnPos = curColumnPos + 1\nend\n'ADD AN EMPTY ROW UNDER THE COLUMN HEADING\ncurRowPos = 1\ncurColumnPos = 0\nfor each t in listOfFields\n setupList.GoRowColumn(curRowPos, curColumNPos)\n setupList.SetCurrentValue(\" \")\n curColumnPos = curColumnPos + 1\nend\n\n'LOOP THROUGH THE SETUP TABLE AND LOAD ALL R ECORDS INTO THE LISTBOX\nfor each rec in setupTab\n curColumnPos = 0\n curRowPos = curRowPos + 1\n for each fld in listOfFieldObjects\n val = setupTab.ReturnValue(fld, rec)\n setupList.GoRowColumn(curRowPos, curColumnPos)\n setupList.SetCurrentValue(val)\n curColumnPos = curColumnPos + 1\n end\nend\n \n'LOOP THROUGH ALL OF THE THEMES IN THE TABLE AND VERIFY THAT THEY ARE PRESENT\nTotalRowsMinus1 = totalRows - 1\nfor each aRow in 0..totalRowsMinus1\n if (aRow < 2) then\n continue\n end\n setupList.GoR owColumn(aRow, 0) 'FIRST GET THE THEME NAME\n thmName = setupList.GetCurrentValue\n thm = dataView.FindTheme(thmName)\n if (thm = nil) then\n missingThmList.Add(thmName)\n rowsToDelete.Add(aRow)\n else\n 'GET THE THEME'S SHAPE TYPE AND ADD IT TO THE LISTBOX UNDER THE SHAPE HEADING\n sdShape = av.Run(\"NSGetShapeType\", thm)\n if (sdShape = \"Invalid Shape Type\") then\n missingThmList.Add(thmName)\n rowsToDelete.Add(aRow)\n else\n setupList.GoRowColumn(aRow, lastColumnPos)\n setupLi st.SetCurrentValue(sdShape)\n end\n end\nend\n'IF ANY THEMES ARE MISSING OR HAVE AN INVALID SHAPE TYPE, INFORM THE USER\nif (missingThmList.Count > 0) then\n MsgBox.ListAsString(missingThmList, \"These themes included in the saved setup parameters are missing from the view or have an invalid shape type. All other themes will be loaded\", \n \"Unable to find all themes\")\n 'SORT THE rowsToDelete LIST SO THE BAD ROWS CAN BE DELETED\n rowsToDelete.Sort(False)\n for each rowNum in rowsToDelete\n setup List.GoRowColumn(rowNum, 0)\n setupList.DeleteRows(1)\n end\nend\n\n'MAKE THE COLUMNS FIT WITHIN THE LISTBOX DISPLAY\nsetupList.FitColumns(0..LastColumnPos, False)\n\n'ENABLE THE 'SAVE SETTINGS' BUTTON\nav.Run(\"NSSaveSettingsUpdate\", True)\n'ENABLE THE 'DATA CONVERSION' BUTTON\nav.Run(\"NSStandardOverlayUpdate\", True)\n'ENABLE THE WEIGHTED OVERLAY FUNCTION. WHEN SETTINGS ARE LOADED FROM TABLE\nwoCtl = setupDlog.FindByName(\"chkWeightedOverlay\")\nav.Run(\"NSEnableWeightedOverlay\", woCtl)\nwoCtl.SetEnabled(True) \n\nreturn nil\n " ) (Script.296 Name: "NSModelChoiceList" SourceCode: "'NSModelChoiceList\n'\n'THIS SCRIPT IS CALLED WHEN THE USER CLICKS ON A FIELD THAT REQUIRES\n' SELECTING A VALUE FROM A PREDEFINED LIST.\n\n\nsetupDlog = av.Run(\"NSFindSetupDialog\", nil)\nlastColumn = Self.GetColumnCount - 1\ntheCheckBox = setupDlog.FindByName(\"chkWeightedOverlay\") 'WEIGHTED OVERLAY CHECKBOX\nnewVal = nil 'INITIALIZE THE VARIABLE\n\n'EXIT IF ONE OF THE FIRST TWO ROWS WERE SELECTED. THE FIELD NAMES AND A BLANK SPACE ARE HERE\nif (Self.GetCurrentRow < 2) then\n return nil\nend\ncurVal = Self.GetCurrentVa lue\n\n'IF A THEME NAME IS SELECTED, EXIT -- NOTHING TO DO HERE\nif ((Self.GetCurrentColumn = 0) or (Self.GetCurrentColumn = 5)) then 'THEME NAMES IN FIRST COLUMN AND SHAPE IN THE LAST\n return nil\nend\n\n'IF THE WEIGHTED OVERLAY CHECKBOX IS CHECKED, DON'T ALLOW ANY COLUMNS TO BE CHANGED\n' OTHER THAN THE WEIGHTED COLUMN\nif (theCheckBox.IsSelected.Not) then\n\n 'IF A YES/NO COLUMN, SET THE OPPOSITE VALUE\n if ((curVal = \"Yes\") or (curVal = \"No\")) then\n if (curVal = \"yes\") then\n newVal = \"no\"\n else\n newVal = \"yes\"\n end\n 'IF THE USER CHOSE THE THEME COLUMN, DON'T LET IT BE CHANGED\n elseIf (Self.GetCurrentColumn = 0) then\n return nil\n 'IF CHOOSING CATEGORY, LOAD VALUES FROM TABLE.\n 'TO INCLUDE ADDITIONAL CATEGORIES, ADD RECORDS TO TABLE\n elseIf (Self.GetCurrentColumn = 1) then 'CATEGORY COLUMN\n categoryTab = av.Run(\"NSFindCategoryTable\", nil)\n catFld = categoryTab.FindField(\"Category\")\n catList = {}\n for each rec in categoryTab\n catVal = categoryTab.ReturnValue(catFld, rec) \n catList.Add(catVal)\n end\n newVal = MsgBox.ListAsString(catList, \"\", \"Choose a category\")\n elseIf (Self.GetCurrentColumn = 2) then 'BUFFER\n newVal = msgBox.Input(\"\", \"Set a distance to buffer all features by\", \"\")\n if (newVal = nil) then\n return nil\n end\n if (newVal.IsNumber.Not) then\n MsgBox.Error(\"Entered value is not a number\", \"\")\n return nil\n end\n end\nend 'if (theCheckBox,IsSelected.Not) then\n\n\nIf (Self.GetCurrentColumn = 4) then 'WEIGHTS\n 'VERIFY THAT THE W EIGHTED OVERLAY FUNCTION HAS BEEN ENABLED\n if (theCheckBox.IsSelected) then\n newVal = msgBox.Input(\"\", \"Enter a numeric weight to be applied to this theme\", \"\")\n if (newVal = nil) then\n return nil\n end\n if (newVal.IsNumber.Not) then\n MsgBox.Error(\"Entered value is not a number\", \"\")\n return nil\n end\n else\n return nil\n end \nend\n\n'UPDATE THE DIALOG WITH THE CATEGORY CHOICE\nif (newVal <> nil) then\n Self.SetCurrentValue(newVal)\nend\nreturn nil" ) (Script.297 Name: "NSModelOpenSetupDialog" SourceCode: "'NSModelOpenSetupDialog\n'\n'OPEN THE EMPTY MENU\n'\n\n\nsetupDlog = av.Run(\"NSFindSetupDialog\", nil)\n'CLEAR THE DIALOG BEFORE IT IS POPULATED\nfor each lst in setupDlog.FindByClass(ListBox)\n lst.Empty\nend\n\n'UNCHECK ANY CHECKBOXES THAT ENABLE ADDITIONAL FUNCTIONALITY\nfor each checkBoxCTL in setupDlog.FindByClass(CheckBox)\n checkboxCTL.SetSelected(False)\n checkboxCTL.Click\nend\n\n'IF THE DISTANCE UNITS = FEET RADIO BUTTON, SET THIS AS DEFAULT\nfor each rad in setupDlog.FindByClass(RadioButton)\n if (rad.GetTag = \"F eet\") then\n rad.Select\n end\nend\n\n'VERIFY THE EXISTENCE OF THE SETUP AND CATEGORIES TABLES\n'IF THEY DON'T EXIST, CREATE THEM\nsetupTab = av.Run(\"NSFindSetupTable\", nil)\ncatTab = av.Run(\"NSFindCategoryTable\", nil)\n\n\n'CENTER THE MENU ON THE SCREEN\nAVUpperLeft = av.ReturnOrigin\nAVCenter = avUpperLeft + (av.ReturnExtent / (2@2))\nhalfDialogWidthHeight = SetupDlog.ReturnExtent.ReturnSize / (2@2)\nMovePoint = AVCenter - halfDialogWidthHeight\nSetupDlog.MoveTo(MovePoint.GetX, MovePoint.GetY) \n\n'ENABLE THE 'SAVE SETTINGS' BUTTON\nav.Run(\"NSSaveSettingsUpdate\", False)\n\n'INITIALIZE THE CELL SIZE SLIDER AND TEXT INPUT\ncellSlider = setupDlog.FindByName(\"sldCellSize\")\nav.Run(\"NSCellSizeUpdate\", cellSlider)\n\n'DISABLE OTHER CONTROLS\nav.Run(\"NSStandardOverlayUpdate\", False)\n\n'DISABLE THE WEIGHTED OVERLAY CHECKBOX\nwoCtl = setupDlog.FindByName(\"chkWeightedOverlay\")\nav.Run(\"NSEnableWeightedOverlay\", woCtl)\nwoCtl.SetEnabled(False)\n\nSetupDlog.MoveTo(0,0)\nSetupDlog.Open\nreturn nil" ) (Script.298 Name: "NSPreProcess" SourceCode: "'NSPreProcess\n'\n'PREPROCESSES ALL DATA USED IN THE MODEL BY FIRST CONVERTING TO GRID, BUFFERING, \n' RECLASSIFYING, AND ULTIMATELY ADDING TOGETHER.\n'FIRST, FORCE A SAVE OF CURRENT SETTINGS TO THE SETUP TABLE\nav.Run(\"NSSaveSetupParameters\", nil)\n'\nsetupDlog = av.Run(\"NSFindSetupDialog\", nil)\nconvertCTL = setupDlog.FindByName(\"lblStandardOverlay\")\nsdView = av.Run(\"NSFindSetupView\", nil)\nsetupTab = av.Run(\"NSFindSetupTable\", nil)\nsetupList = setupDlog.FindByName(\"lstModelSetup\")\n'REFERENCE THE SETUP TABLE AND K EY FIELDS\nprocFld = setupTab.FindField(\"process\")\nthmFld = setupTab.FindField(\"ThemeName\")\nbufFld = setupTab.FindField(\"BufferDist\")\nshortFld = setupTab.FindField(\"short_nam\")\nshpFld = setupTab.FindField(\"Shape\")\nfor each t in {setupTab, procFld, thmFld, bufFld, shortFld, shpFld}\n if (t = nil) then\n MsgBox.Error(\"Unable to locate a field in the nsmodelsetup.dbf\", Script.The.GetName++\"Error\")\n return nil\n end\nend\n\n'ENSURE THAT THE BOUNDARY THEME HAS BEEN SPECIFIED\nbndCtl = setupDlog.FindByName(\"txtBo undaryTheme\")\nbndVal = bndCtl.GetLabel\nbndThm = sdView.FindTheme(bndVal)\nif (bndThm = nil) then\n MsgBox.Error(\"Select a boundary theme before continuing\", \"Unable to process\")\n return nil\nend\n\n'GET A COUNT OF THE NUMBER OF RECORDS TO PROCESS\nNumRecords = setupList.GetList.Count - 2\n\n'ENSURE THAT THE WORKING DIRECTORY WAS SPECIFIED\nstrWorkDirRoot = setupDlog.FindByName(\"txtWorkingDirectory\").GetLabel\nif (strWorkDirRoot = nil) then\n MsgBox.Error(\"No working directory selected\", \"Unable to create data\")\n r eturn nil\nend\n'CHECK FOR SPACES IN THE DIRECTORY PATH. IF ANY EXIST, INFORM THE USER AND EXIT\n'FUNCTIONS THAT PROCESS GRIDS DO NOT LIKE SPACES\nif (strWorkDirRoot.Contains(\" \")) then\n MsgBox.Error(\"Please select a working directory with no spaces in the path\", \"Invalid Working Directory\")\n return nil\nend\n\n'CHECK VIEW'S MAP AND DISTANCE UNITS. ALLOW USER TO CHOOSE EITHER FOR BUFFER DISTANCE\ncurMapUnitEnum = sdView.GetUnits.AsString\ncurMapUnits = curMapUnitEnum.Substitute(\"UNITS_LINEAR_\", \"\")\ndistCPA = set upDlog.FindByName(\"cpaDistanceUnits\")\nselectedUnits = distCPA.GetSelected.GetTag\nif (selectedUnits = \"Other\") then\n 'MAP UNITS AND DISTANCE UNITS ARE THE SAME, BUT NOT NECESSARILY FEET OR METERS\n conversionFactor = 1\nElseIf (selectedUnits = curMapUnits) then\n 'USER SELECTED UNITS THAT MATCH MAP UNITS\n conversionFactor = 1\nElseIf (((selectedUnits = \"Feet\") or (selectedUnits = \"Meters\")) and ((curMapUnits = \"Feet\") or (curmapUnits = \"Meters\"))) then\n 'CONVERT BETWEEN FEET AND METERS\n conversionFactor = Units.Convert(1, sdView.GetUnits, (\"#UNITS_LINEAR_\"+selectedUnits).AsEnum)\nElse\n 'INFORM THE USER THAT CORRECT COMBINATION OF MAP AND DISTANCE UNITS MUST BE SPECIFIED.\n aMsg = \"Not enough info to interpret map units. Please set the map units in View -- Properties and select the appropriate distance units on the Model Setup and Administration menu.\"\n aTitle = \"Cannot proceed until Map and Distance units are set\"\n MsgBox.Warning(aMsg, aTitle)\n return nil\nend\n \n'FORCE A SAVE OF THE SETTINGS TABLE\nav.Run (\"NSSaveSetupParameters\", nil)\n\n'IF CALLED BY THE SETUP DIALOG, CHECK FOR SELECTED FEATURES\n'IF CALLED BY SELECTED FEATURE DIALOG, DO NOT CALL IT AGAIN\nif (self.GetDialog = setupDlog) then\n 'SEE IF THEMES HAVE SELECTED FEATURES. IF SO, GIVE THE USER A CHANCE TO EXIT AND CHANGE SELECTION\n av.Run(\"NSSelectedFeatureCount\", nil)\n return nil 'EXIT AFTER INITIALIZING THE DIALOG\nelse\n 'CLOSE THE THEME STATUS DIALOG, WHICH IS CALLED AT THE START OF THE\n ' MODEL PREPROCESSING STEP\n theListBoxes = Self.GetDi alog.FindByClass(ListBox)\n for each l in theListBoxes\n l.Empty\n end\n Self.GetDialog.Close\n if (Self.GetTag = \"Exit\") then 'USER CHOSE TO STOP THE MODEL AND EVALUATE SELECTIONS\n return nil\n end\nend\n\n'GET THE DATE AND CREATE A UNIQUE DIRECTORY NAME BASED ON IT. EACH TIME THE USER RUNS THE MODEL\n' A NEW DIRECTORY WILL BE CREATED TO HOLD DATA. THIS WAY, SEVERAL OUTPUTS FROM THE MODEL CAN\n' BE VIEWED\n\ncurDate = Date.Now\ncurFormat = \"yyMMddhhhhms\"\ncurDate.SetFormat(curFormat)\n\n'VERIFY THE WORKING DIR ECTORY AND CREATE A SUBDIRECTORY FOR THE CURRENT DATE AND TIME\ncurWorkDir = av.Run(\"NSWorkingDir.Get\", setupDlog)\ncurWorkDirWithDate = curWorkDir+\"\\\"+curDate.AsString\ncreatedDir = av.Run(\"MakeDir\", curWorkDirWithDate)\n'IF DIRECTORY WAS NOT CREATED, THE USER WAS INFORMED IN THE MAKEDIR SCRIPT, SO EXIT\nif (createdDir.Not) then\n return nil\nend\n\n'CREATE DIRECTORIES FOR CONVERTED DATA, BUFFERED, RECLASSIFIED, AND FINAL OUTPUT\nconvertedDir = curWorkDirWithDate+\"\\converted\"\nbuffDir = curWorkDirWithDate+\"\\buffered \"\nreclassDir = curWorkDirWithDate+\"\\reclassed\"\nfinalDir = curWorkDirWithDate+\"\\final\"\nweightedInputDir = curWorkDirWithDate+\"\\final\\weighted_grids\"\nfor each dir in {convertedDir, buffDir, reclassDir, finalDir, weightedInputDir}\n createdDir = av.Run(\"MakeDir\", dir)\n if (createdDir = False) then\n MsgBox.Error(\"Unable to create all directories required for processing\", \"\")\n return nil\n end\nend\n\n'SET THE ANALYSIS EXTENT AND CELL SIZE FOR DATA CONVERSIONS\n' NOT CURRENTLY SETTING ANALYSIS MASK -- REQUIRE S CONTINUOUS GRID THEME, SUCH AS PARK BOUNDARY\ncellSlider = setupDlog.FindByName(\"sldCellSize\")\ncurCellSize = cellSlider.GetValue\ncurAnalysisExtent = bndThm.ReturnExtent\ntheAE = sdView.GetExtension(AnalysisEnvironment)\ntheAE.SetCellSize(#ANALYSISENV_VALUE, curCellSize)\ntheAE.SetExtent(#ANALYSISENV_VALUE, bndThm.ReturnExtent)\ntheAE.Activate\n\n'INITIALIZE THE STATUS MESSAGE\nav.Run(\"NSWorkingMessage\", {\"open\"})\n\n\n'EVALUATE THEMES TO BE INCLUDED IN MODEL (LISTED IN DIALOG) AND DETERMINE WHICH ONES SHOULD\n' BE CO NVERTED FROM VECTOR TO GRID\n'\n'QUERY THE SETUP TABLE FOR THEMES TO BE PROCESSED, IGNORING THE OTHERS\nboolVal = \"yes\"\nqString = \"([process] = \"+boolVal.Quote+\")\"\nsetupTab.Query(qString, setupTab.GetSelection, #VTAB_SELTYPE_NEW)\n'PROCESS EACH THEME IN THE SELECTED SET AND CONVERT DATA\nfor each rec in setupTab.GetSelection\n thmName = setupTab.ReturnValue(thmFld, rec)\n 'UPDATE THE MESSAGE WITH THE CURRENT THEME'S NAME\n av.Run(\"NSWorkingMessage\", {\"update\", \"Currently processing \"+thmName})\n 'DETERMINE IF TH E DATA SHOULD BE BUFFERED\n bufferVal = setupTab.ReturnValue(bufFld, rec)\n if (bufferVal.IsNumber) then\n toBuffer = True\n 'CONVERT THE BUFFER DISTANCE UNITS IF USER CHOSE OTHER UNITS\n bufferVal = bufferVal.AsNumber / conversionFactor\n else\n toBuffer = False\n bufferVal = 0\n end\n 'GET THE THEME'S ABBREVIATED NAME -- TO BE USED FOR OTHER DATA SETS CREATED FROM THIS SOURCE THEME\n shortVal = setupTab.ReturnValue(shortFld, rec)\n 'DETERMINE THE SHAPE TYPE. IF GRID, THE INITIAL CONVERSION CAN BE SKIPPED\n shpVal = setupTab.ReturnValue(shpFld, rec)\n 'FIND THE THEME IN THE VIEW\n curThm = sdView.FindTheme(thmName)\n if (curThm = nil) then\n MsgBox.Error(\"Unable to locate \"+thmName++\"in the view\", \"Unable to continue\")\n av.DelayedRun(\"NSWorkingMessage\", {\"close\"}, 2) 'REMOVE THE MESSAGE DIALOG FROM THE SCREEN\n return nil\n end\n thmSrcFile = curThm.GetSrcName.GetFileName\n '#####################################\n 'CONVERT THE DATA TO GRID FORMAT. IF GRID ALREADY, COPY TO CONVERTED DIRECT ORY\n if (shpVal = \"Grid\") then\n 'DETERMINE IF THE GRID HAS SELECTED FEATURES\n if (curThm.CanSelect) then\n 'IF SELECTED FEATURES, EXTRACT THE SELECTED CELLS ONLY\n themeBasedGrid = curThm.Clone.GetGrid.ExtractSelection\n else\n 'OTHERWISE, CONVERT THE ENTIRE GRID\n themeBasedGrid = curThm.Clone.GetGrid\n end\n 'IF SOURCE DATA IS GRID, RECLASSIFY SO THAT ALL VALUES ARE 0, 1, AND NODATA\n convertedGrid = av.Run(\"NSReclassify\", {themeBasedGrid, convertedDir, shortVal})\n if (co nvertedGrid.Is(Grid).Not) then\n MsgBox.Error(\"Problem reclassifying \"+thmName, \"Unable to continue\")\n av.DelayedRun(\"NSWorkingMessage\", {\"close\"}, 2) 'REMOVE THE MESSAGE DIALOG FROM THE SCREEN\n return nil\n end\n 'IF ANY OTHER VECTOR FORMAT, CONVERT TO GRID\n else\n curFTab = curThm.GetFTab\n valueFld = nil 'curFTab.FindField(\"NSModel\")\n convertedGrid = Grid.MakeFromFTab(curThm.GetFTab, Prj.MakeNull, valueFld, {curCellSize, curAnalysisExtent})\n convertedGrid.SaveDataSet(FileName.M ake(convertedDir+\"\\\"+shortVal+\"grd\"))\n end\n 'IF A BUFFER DISTANCE HAS BEEN SPECIFIED, BUFFER THE GRID\n if (toBuffer = True) then\n 'ENSURE THAT ALL VALUES ARE EITHER 1 OR NODATA\n nullGrid = (convertedGrid <> 1.AsGrid).SetNull(convertedGrid)\n 'GENERATE A NEW FILENAME FOR THE BUFFERED GRID\n buffGrid = nullGrid.EucAllocation(nil, nil, bufferVal)\n buffGrid.SaveDataSet(FileName.Make(buffDir+\"\\\"+shortVal+\"buf\"))\n else\n buffGrid = (convertedGrid <> 1.AsGrid).SetNull(convertedGrid)\n end\n 'REC LASSIFY GRIDS SO THAT ALL VALUES ARE 0, 1, AND NODATA\n reclassGrid = av.Run(\"NSReclassify\", {buffGrid, reclassDir, shortVal})\n if (reclassGrid.Is(Grid).Not) then\n MsgBox.Error(\"Problem reclassifying \"+thmName, \"Unable to continue\")\n av.DelayedRun(\"NSWorkingMessage\", {\"close\"}, 2) 'REMOVE THE MESSAGE DIALOG FROM THE SCREEN\n return nil\n end\nend 'for each rec in setupTab.GetSelection\n'CLOSE THE STATUS MESSAGE\nav.Run(\"NSWorkingMessage\", {\"close\"})\n'\n'SET THE PREPROCESS BUTTON'S OBJECTTAG TO THE PR EPROCESSED DATA'S PATH\n' ONCE THE DATA HAS BEEN PROCESSED THE USER WILL MOST LIKELY WANT TO USE\n' THE MOST RECENT DATA. \nconvertCTL.SetObjectTag(reclassDir)\n'\n'WRITE A FILE INTO THE FOLDER CONTAINING THE PREPROCESSED DATA INDICATING THAT\n' IT FINISHED SUCCESSFULLY. THIS WILL BE USED IN THE OVERLAY SCRIPTS TO DETERMINE\n' IF THE SELECTED DIRECTORY CONTAINS VALID PREPROCESSED DATA\ndoneFileName = (reclassDir+\"\\completed.mdl\").AsFileName\ndoneFile = textFile.Make(doneFileName, #FILE_PERM_WRITE)\ndoneFile.Close\n'E XPORT A SNAPSHOT OF THE SETUP TABLE TO THIS DIRECTORY AS WELL\nexportFN = (reclassDir+\"\\nsmodelsetup.dbf\").AsFileName\nsetupTab.Export(exportFN, dBASE, False)\n'NOW THAT THE DATA CONVERSION HAS COMPLETED, RUN THE STANDARD OVERLAY FUNCTION\nav.Run(\"NSStandardOverlay\", Self)\n\nreturn nil" ) (Script.299 Name: "NSReclassify" SourceCode: "'NSReclassify\n'\n'RECLASSIFY ALL GRID THEMES SO ONLY VALUES ARE 0, 1, AND NODATA, WITH NOTHING INSIDE PARK\n' BOUNDARY HAVING NODATA. ALL RELCASSIFIED GRIDS ARE PUT INTO A NEW DIRECTORY. THE FINAL \n' OVERLAY PROCESS WILL LOAD GRIDS FROM THIS DIRECTORY.\n'RECLASS 1 AND NODATA TO 1 AND 0\n'FIRST GET VALUES PASSED IN BY CALLING SCRIPT\n'REQUIRES A LIST OF THREE ITEMS AS ARGUMENTS (INPUT GRID, OUTPUT DIRECTORY, AND ABBREVIATED VALUE\ninputGrid = Self.Get(0)\nreclassDir = Self.Get(1)\nshortVal = Self.Get(2)\n\nif (input Grid.Is(Grid).Not) then\n MsgBox.Error(\"Input Grid parameter passed in is a \"+inputGrid.GetClass.GetClassName, \"\")\n return nil\nend\n'\ntempGridThm = GTheme.Make(inputGrid)\naClassList = tempGridThm.GetLegend.GetClassifications\ntheClassList = aClassList.DeepClone\nfor each c in theClassList\n if (c.IsNoData) then\n c.SetLabel(\"0\") 'CHANGE NODATA AREAS TO ZERO. OTHERWISE THEY WILL MASK OTHER DATA\n elseIf (c.GetLabel = \"0\") then\n c.SetLabel(\"0\")\n else\n c.SetLabel(\"1\") 'THE ONLY OTHER VALUE SHOULD BE 1, SO LEAVE IT AS 1\n end\nend\nreclassGrid = inputGrid.ReclassByClassList(\"Value\", theClassList, False)\nreclassGrid.SaveDataSet(FileName.Make(reclassDir+\"\\\"+shortVal+\"recl\"))\nreturn reclassGrid 'RETURN THE RECLASSIFIED GRID TO THE CALLING SCRIPT\n" ) (Script.300 Name: "NSSaveSettingsUpdate" SourceCode: "'NSSaveSettingsUpdate\n'\n'ENABLE AND DISABLE THE SAVE SETTINGS BUTTON\n'SELF IS True (Enabled) or False (disabled)\n'\nsetupDlog = av.Run(\"NSFindSetupDialog\", nil)\nsaveCTL = setupDlog.FindByName(\"lblSaveParameters\")\nif (saveCTL = nil) then\n MsgBox.Error(\"Unable to locate the save settings button\", \"Unable to process\")\n return nil\nend\nsaveCTL.SetEnabled(Self)\nreturn nil" ) (Script.301 Name: "NSSaveSetupParameters" SourceCode: "'NSSaveSetupParameters\n'\n'SAVE SETUP PARAMETERS TO A TABLE FOR LATER USE\n\n\nsetupDlog = av.Run(\"NSFindSetupDialog\", nil)\nsdView = av.Run(\"NSFindSetupView\", nil)\nsetupTab = av.Run(\"NSFindSetupTable\", nil)\ncategoriesTab = av.GetProject.FindDoc(\"modelcategories.dbf\").GetVTab\nsetupList = setupDlog.FindByName(\"lstModelSetup\")\nlistOfFields = setupList.GetTag.AsTokens(\" \") 'FIELD NAMES STORED IN THE TAG OF THE LISTBOX\n\nif (setupTab.StartEditingWithRecovery) then\n 'CLEAR THE TABLE OF ALL EXISTING RECORDS\n numRecs = setupTab.GetNumRecords - 1\n 'IF NO RECORDS IN TABLE, DON'T ATTEMPT TO DELETE ANYTHING\n if (numRecs > 0) then\n for each p in 0..numRecs\n setupTab.RemoveRecord(p)\n end\n setupTab.StopEditingWithRecovery(True)\n setupTab.StartEditingWithRecovery\n end\n 'GET A COUNT OF THE NUMBER OF RECORDS TO INSERT\n NumRecords = setupList.GetList.Count - 2\n for each g in 1..NumRecords\n setupTab.AddRecord\n end\n\n curColumnPos = 0 'START WITH THE FIRST COLUMN\n for each thmName in listOfFields\n 'IF THE SHAPE COLUMN, SKIP THIS PART\n' if (thmName = \"Shape\") then\n' continue\n' end\n aCounter = 0\n curFld = setupTab.FindField(thmName)\n curRowPos = 2\n for each rec in setupList.GetList\n setupList.GoRowColumn(curRowPos, curColumnPos)\n curVal = setupList.GetCurrentValue\n if (curVal <> nil) then\n setupTab.SetValue(curFld, aCounter, curVal.Trim)\n end\n aCounter = aCounter + 1\n curRowPos = curRowPos + 1\n end\n curColumnPos = curColumnPos + 1\n end\nels e\n MsgBox.Error(\"Unable to edit nsmodelsetup.dbf and save parameters\", \"\")\n return nil\nend\n\n'NOW THAT THE TABLE HAS BEEN POPULATED, ENTER THE ABBREVIATED NAMES TO BE USED\n' FOR NEW DATA. CATEGORIES.DBF HAS EACH CATEGORY FULL NAME AND ABBREVIATED NAME. \n' SINCE GRID DATA SET NAMES ARE LIMITED IN LENGTH, AN ABBREVIATED NAME WILL BE USED \n' AND INCREMENTED BY 1. FOR EXAMPLE, VISITOR USE THEMES WILL BE ABBREVIATED AS\n' VIS1, VIS2, VIS3, AND SO ON. \n'\n'FIRST FIND FIELDS AND JOIN THE TWO TABLES\nsetupCatFld = setupTab.FindField(\"Category\")\ncategoriesCatFld = categoriesTab.FindField(\"Category\")\nabbrevFld = categoriesTab.FindField(\"Abbrev\")\nshortFld = setupTab.FindField(\"short_nam\")\nsetupTab.Join(setupCatFld, categoriesTab, categoriesCatFld)\n\n\n'SELECT EACH CATEGORY AND ASSIGN NAMES BASED ON THE NUMBER SELECTED\n'LOOP THROUGH THE CATEGORIES TABLE TO FIND UNIQUE VALUES\nfor each g in categoriesTab\n catVal = categoriesTab.ReturnValue(categoriesCatFld, g)\n abbrevVal = categoriesTab.ReturnValue(abbrevFld, g)\n 'SELECT RECORDS IN THE SETUP TABLE BASED ON THE CURRENT CATEGORY VALUES\n catQstring = \"[category] = \"+catVal.Quote\n setupTab.Query(catQstring, setupTab.GetSelection, #VTAB_SELTYPE_NEW)\n 'FOR EACH SELECTED RECORD IN THIS CATEGORY, ASSIGN THE ABBREVIATED NAME\n ' WITH A NUMERIC VALUE INCREMENTED BY 1 ADDED AT THE END\n aCounter = 1\n for each p in setupTab.GetSelection\n shortVal = abbrevVal+aCounter.AsString\n setupTab.SetValue(shortFld, p, shortVal)\n aCounter = aCounter + 1\n end\nend\n\n'REMOVE THE JOIN ON THE SETUP TABLE\nsetupTab.UnjoinAll\n'REMOVE THE SELECTION\nsetupTab.GetSelection.ClearAll\n\n'STOP EDITING WHEN DONE\nsetupTab.StopEditingWithRecovery(True)\nreturn nil" ) (Script.302 Name: "NSSelectedFeatureCount" SourceCode: "'NSSelectedFeatureCount\n'\n'SHOWS THE NUMBER OF SELECTED FEATURES FOR EACH THEME IN THE SETUP VIEW\n'ADDITIONALLY, SHOWS OTHER THEME PROPERTIES SO THE USER HAS A COMPLETE\n'PICTURE OF WHAT THE THEME REPRESENTS\n\ntsDlog = av.GetProject.FindDialog(\"ThemeStatusDlog\") 'SELECTION DIALOG\ntsListBox = tsDlog.FindByName(\"lstThemeStatus\")\n\nsdView = av.Run(\"NSFindSetupView\", nil)\nsetupTab = av.Run(\"NSFindSetupTable\", nil)\nselectionsTab = av.Run(\"NSLoadSelectionTable\", nil) 'TABLE TO RECORD SELECTION INFORMATION\nif (nil = selectionsTab) then\n return nil\nend\n'MAKE SURE AN EDIT SESSION HAS BEEN STARTED\nselectionsTab.SetEditable(True)\n'FIND FIELDS IN THE SELECTION TABLE\ntnFld = selectionsTab.FindField(\"Themename\")\nsfFld = selectionsTab.FindField(\"Selected\")\ntfFld = selectionsTab.FindField(\"Tot_feat\")\ntdFld = selectionsTab.FindField(\"theme_def\")\ntpFld = selectionsTab.FindField(\"theme_path\")\n'SET THE TABLE UP FOR DISPLAY IN THE DIALOG\nrec = selectionsTab.AddRecord 'PUT FIELD NAMES IN THE FIRST ROW FOR DISPLAY IN THE DIALOG\nselec tionsTab.SetValue(tnFld, rec, \"THEME\")\nselectionsTab.SetValue(sfFld, rec, \"# SELECTED\")\nselectionsTab.SetValue(tfFld, rec, \"TOTAL AVAIL\")\nselectionsTab.SetValue(tpFld, rec, \"DATA SOURCE PATH\")\nselectionsTab.SetValue(tdFld, rec, \"THEME DEFINITION\")\nselectionsTab.AddRecord 'PLACE AN EMPTY ROW AFTER THE FIELD NAMES\n'FIND FIELDS IN SETUP TABLE\nprFld = setupTab.FindField(\"Process\")\nthmList = {}\n'LOOP THROUGH EACH THEME IN THE VIEW AND DETERMINE IF IT IS PART OF THIS MODEL\nfor each thm in sdView.GetThemes.DeepClo ne\n if ((thm.Is(FTheme)) or (thm.Is(GTheme))) then\n if (thm.Is(FTheme)) then\n curTab = thm.GetFTab\n else\n curTab = thm.GetVTab 'GRIDS HAVE A VTAB, NOT AN FTAB\n end\n 'QUERY THE SETUP TABLE TO DETERMINE IF THIS THEME IS BEING USED IN THE MODEL\n aQString = \"([ThemeName] = \"+thm.GetName.Quote+\")\"\n setupTab.Query(aQString, setupTab.GetSelection, #VTAB_SELTYPE_NEW)\n if (setupTab.GetSelection.Count = 1) then\n curRec = setupTab.GetSelection.GetNextSet(-1)\n 'IF THIS THEME IS INCLUDED IN THE MODEL AND HAS SELECTED FEATURES, GET OTHER INFORMATION\n ' AND WRITE INTO THE SELECTION TABLE\n if (setupTab.ReturnValue(prFld, curRec) = \"yes\") then\n 'RECORD SELECTIONS, TOTAL FEATURES, THEME DEFINITIONS FOR THE THEME\n rec = selectionsTab.AddRecord\n val = curTab.GetSelection.Count\n selectionsTab.SetValue(sfFld, rec, val.AsString) 'RECORD NUMBER OF SELECTED FEATURES\n val = curTab.GetNumRecords\n selectionsTab.SetValue(tfFld, rec, val.AsStrin g) 'RECORD TOTAL NUMBER OF FEATURES\n val = curTab.GetDefinition\n selectionsTab.SetValue(tdFld, rec, val) 'RECORD THEME DEFINITION\n val = curTab.GetBaseTableFileName.AsString\n selectionsTab.SetValue(tpFld, rec, val) 'RECORD THE THEME SOURCE'S FULL PATH \n val = thm.GetName \n selectionsTab.SetValue(tnFld, rec, val) 'RECORD THEME NAME \n end\n end\n end\nend\nselectionsTab.SetEditable(False)\n'GIVE THE USER A CHANCE TO EXAMINE THE THEME'S SPECIFICS AND BAIL O UT IF NECESSARY\n'OPEN A DIALOG WITH THE THEME SPECIFIC INFO\ntsListBox.DefineFromVTab(selectionsTab, selectionsTab.GetFields, False)\ntsListBox.FitColumns(0..8, False)\ntsDlog.MoveTo(0,0)\ntsDlog.Open\nreturn nil" ) (Script.303 Name: "NSSetBoundaryTheme" SourceCode: "'NSSetBoundaryTheme\n'\n'SETS THE BOUNDARY THEME AS THE EXTENT FOR ANALYSIS\n'\nsetupDlog = av.Run(\"NSFindSetupDialog\", nil)\nsetupDlog = Self.GetDialog\nsetupList = setupDlog.FindByName(\"lstModelSetup\")\n'EXIT IF ONE OF THE FIRST TWO ROWS WERE SELECTED. THE FIELD NAMES AND A BLANK SPACE ARE HERE\nif (setupList.GetCurrentRow < 2) then\n return nil\nend\ncurVal = setupList.GetCurrentValue\n\n'IF A THEME NAME SELECTED, SET THE BOUNDARY THEME\n' THIS IS THE THEME THAT ALL ANALYSIS PROCESSES WILL BE CLIPPED TO\nif (setupLi st.GetCurrentColumn = 0) then 'THEME NAMES IN FIRST COLUMN\n bndThmCtl = setupDlog.FindByName(\"txtBoundaryTheme\")\n if (bndThmCtl = nil) then\n MsgBox.Error(\"Unable to find the boundary theme text box\", \"Unable to set boundary theme\")\n return nil\n end\n bndThmCtl.SetLabel(curVal) 'SET THE LABEL OF THIS TEXTLINE = THE THE SELECTED THEME NAME\n MsgBox.Info(curVal++\"set as boundary theme. All analysis results will be clipped to the extent of this boundary\", \"Boundary Theme Selected\")\nelse\n MsgBox.Erro r(\"A theme name must be selected to use this tool\", \"Unable to set boundary theme\")\n return nil\nend\nreturn nil" ) (Script.304 Name: "NSSetWorkingDir" SourceCode: "'NSSetWorkingDir\n'\n'SET THE WORKING DIRECTORY. ALL DATA GENERATED BY THE MODEL CODE WILL BE LOCATED HERE.\n\nworkFN = Self 'PASSED FROM CALLING SCRIPT: dlg.DirBrowser.Driver\nif (workFN <> nil) then\n pathCtl = av.GetProject.FindDialog(\"NSModelSetup\").FindByName(\"txtWorkingDirectory\")\n if (pathCtl = nil) then\n MsgBox.Error(\"Unable to locate path text control\", \"\")\n else\n pathCtl.SetLabel(workFN.AsString)\n end\nend\nreturn nil" ) (Script.305 Name: "NSStandardOverlay" SourceCode: "'NSStandardOverlay\n'\n'TAKE ALL OF THE PREPROCESSED DATA AND OVERLAY, RESULTING IN A SINGLE OUTPUT THEME\n'\n'\n'FIRST, FORCE A SAVE OF CURRENT SETTINGS TO THE SETUP TABLE\nav.Run(\"NSWorkingMessage\", {\"Open\"}) 'INITIALIZE THE MESSAGE DIALOG\nav.Run(\"NSSaveSetupParameters\", nil)\n'\n'SET A REFERENCE TO THE SETUP TABLE\nsetupDlog = av.Run(\"NSFindSetupDialog\", nil)\nsdView = av.Run(\"NSFindSetupView\", nil)\nsetupTab = av.Run(\"NSFindSetupTable\", nil)\nsnFld = setupTab.FindField(\"Short_nam\")\nwtFld = setupTab.FindField(\"Weigh t\")\n'\n'DETERMINE WHICH CONTROL CALLED THIS SCRIPT -- STANDARD OR WEIGHTED OVERLAY\n'CHECK THE TAG VALUE OF THE BUTTON\n'FIND THE DIRECTORY CONTAINING THE PREPROCESSED DATA TO USE\ninputDataDir = av.Run(\"NSGetDataDir\", nil)\nif (inputDataDir = nil) then\n MsgBox.Warning(\"No valid data directory. Unable to create overlay\", \"Exiting...\")\n av.DelayedRun(\"NSWorkingMessage\", {\"close\"}, 2) 'REMOVE THE MESSAGE DIALOG FROM THE SCREEN\n return nil\nend\n'MAKE SURE THE GRID HAS NOT BEEN CREATED\nif (Self.GetTag = \"Standar d\") then\n standardOverlayFN = inputDataDir.SubStitute(\"reclassed\", \"final\\standard\")\n 'EXPORT THE SETUP TABLE TO THE 'Final' GRID DIRECTORY FOR ARCHIVING PURPOSES\n 'TABLE WRITTEN TOT HE SAME DIR AS THE FINAL OUTPUT GRID\n baseDirPath = standardOverlayFN.Substitute(\"\\standard\", \"\")\n av.Run(\"NSExportTable\", {baseDirPath, \"setup\"}) \n av.Run(\"NSExportTable\", {baseDirPath, \"selection\"})\nelse\n 'SINCE MORE THAN ONE WEIGHTED OVERLAY GRID CAN BE CREATED,\n 'CHECK THE DEFAULT NAME FIRST\n standardOverlayFN = in putDataDir.SubStitute(\"reclassed\", \"final\\weighted01\")\nend\n\nif (standardOverlayFN.AsFileName.IsDir) then\n 'IF STANDARD OVERLAY ALREADY EXISTS, INFORM THE USER AND EXIT\n if (Self.GetTag = \"Standard\") then\n MsgBox.Error(\"Output data already exists. Re-run the preprocessing steps before running this overlay function\", \"Unable to create standard overlay\")\n av.DelayedRun(\"NSWorkingMessage\", {\"close\"}, 2) 'REMOVE THE MESSAGE DIALOG FROM THE SCREEN\n return nil\n end\n 'FORCE THE USER TO CHOOSE A UNIQU E NAME FOR EHT WEIGHTED OVERLAY\n toContinue = True\n while (toContinue)\n 'OPEN AN INPUT BOX FOR THE USER TO ENTER A NAME\n weightedName = MsgBox.Input(\"Choose an output name\", \"Weighted Overlay\", \"\")\n if ((weightedName = nil) or (weightedName = \"\")) then 'IF CANCELLED, EXIT THE SCRIPT\n av.DelayedRun(\"NSWorkingMessage\", {\"close\"}, 2) 'REMOVE THE MESSAGE DIALOG FROM THE SCREEN\n return nil\n else\n 'IF A STRING ENTERED, CHECK FOR UNIQUENESS\n standardOverlayFN = inputDataDir.SubSt itute(\"reclassed\", \"final\\\"+weightedName)\n 'IF THE ENTERED NAME EXISTS -- ALREADY A DIRECTORY, RERUN THE LOOP UNTIL USER ENTERS A UNIQUE NAME OR CANCELS\n if (standardOverlayFN.AsFileName.IsDir) then\n toContinue = True\n else\n toContinue = False\n end\n end\n end 'While \nelse\n 'IF THE DEFAULT NAME WORKS, SET A VARIABLE FOR THE CREATE NEW DIRECTORY CODE BELOW\n weightedName = \"Weighted01\" \nend\n\n'CREATE A NEW DIRECTORY TO HOLD THE WEIGHTED GRIDS, WHICH ARE CREATED BY MULT IPLYING\n' EACH RECLASSED GRID BY THE WEIGHT SUPPLIED BY THE USER\nif (Self.GetTag = \"Weighted\") then\n weightedGridDir = standardOverlayFN.Substitute(\"final\\\", \"final\\weighted_grids\\\")\n createdDir = av.Run(\"MakeDir\", weightedGridDir)\n if (createdDir = False) then\n MsgBox.Error(\"Unable to create the weighted grids directory required for processing\", \"\")\n av.DelayedRun(\"NSWorkingMessage\", {\"close\"}, 2) 'REMOVE THE MESSAGE DIALOG FROM THE SCREEN\n return nil\n end\nend\n\n'UPDATE THE MESSAGE DIALOG\nav.R un(\"NSWorkingMessage\", {\"update\", \"Performing Overlay\"})\n'FIND ALL GRIDS IN THE PREPROCESS DIRECTORY\nsourceFN = inputDataDir.AsFileName\nsourceDataNameList = sourceFN.Read(\"\")\n'EVALUATE EACH DIRECTORY AND DETERMINE IF VALID DATA SET\n' REMOVE THE INFO DIRECTORY FROM THE LIST\nGridList = {}\ntrimmedList = {} 'A LIST TO HOLD ALL PATHS MINUS THE INFO DIR\nfor each g in sourceDataNameList\n if (g.AsString.Right(4) = \"info\") then\n continue\n else\n trimmedList.Add(g)\n 'BUILD A LIST OF GRIDS\n validGridSRC = Grid.MakeSrcName(g.AsString)\n validGrid = Grid.Make(validGridSRC)\n GridList.Add(validGrid)\n end\nend\n'LOOP THROUGH THE LIST OF GRIDS AND BUILD A COMBINE EXPRESSION\n'IF STANDARD OVERLAY, JUST ADD THEM TOGETHER\nif (Self.GetTag = \"Standard\") then\n returnList = av.Run(\"NSCombineGrids\", gridList)\nelse\n 'IF WEIGHTED OVERLAY, THE ORIGINAL TABLE WITH WEIGHTS MUST BE ACCESSED\n weightList = {} 'BUILD A LIST TO HOLD THE WEIGHTS\n for each grdPath in trimmedList\n 'OBTAIN THE SHORT_NAME FROM THE PATH, SO TH E MATCHING RECORD CAN BE FOUND IN THE SETUP TABLE\n shortValList = grdPath.AsString.AsTokens(\"\\\")\n lastOne = shortValList.Get(shortValList.Count - 1)\n shortVal = lastOne.Substitute(\"recl\", \"\")\n 'QUERY THE SETUP TABLE FOR THE ROW REPRESENTING THIS GRID\n aQString = \"([short_nam] = \"+shortVal.Quote+\")\"\n setupTab.Query(aQString, setupTab.GetSelection, #VTAB_SELTYPE_NEW)\n if (setupTab.GetSelection.Count > 1) then\n MsgBox.Error(\"Unable to find the matching record in the setup table\", \"Pro blem with theme name\")\n av.DelayedRun(\"NSWorkingMessage\", {\"close\"}, 2) 'REMOVE THE MESSAGE DIALOG FROM THE SCREEN\n return nil\n end\n weightVal = setupTab.ReturnValue(wtFld, setupTab.GetSelection.GetNextSet(-1))\n 'VERIFY THAT A NUMERIC WEIGHT WAS SET\n if (weightVal <> nil) then\n if (weightVal.IsNumber.Not) then\n MsgBox.Error(\"Numeric weight not set\", \"Unable to complete weighted overlay\")\n av.DelayedRun(\"NSWorkingMessage\", {\"close\"}, 2) 'REMOVE THE MESSAGE DIALOG FR OM THE SCREEN\n return nil\n end\n else\n 'IF A NULL VALUE, EXIT\n MsgBox.Error(\"Numeric weight not set\", \"Unable to complete weighted overlay\")\n av.DelayedRun(\"NSWorkingMessage\", {\"close\"}, 2) 'REMOVE THE MESSAGE DIALOG FROM THE SCREEN\n return nil\n end\n 'ADD EACH VALID WEIGHT TO THE WEIGHT LIST\n 'WHEN DONE, EACH GRID IN GRIDLIST WILL HAVE A MATCHING WEIGHT IN WEIGHTLIST\n weightList.Add(weightVal)\n end 'for each grdPath\n curGridNum = 0 'COUNTER FOR LOOPING THROUG H GRID AND WEIGHT LIST\n weightedGridList = {} 'LIST TO HOLD EACH WEIGHTE GRID\n for each grd in gridList\n 'CREATE EACH WEIGHTED INPUT GRID BASED ON THE RECLASSIFIED SOURCE AND THE WEIGHT VALUE\n weightedOutputGrid = grd * weightList.Get(curGridNum).AsNumber.AsGrid\n sourceGridName = grd.GetSRCName.GetName\n weightedGridName = sourceGridName.Substitute(\"recl\", \"wgt\")\n fullWeightPath = weightedGridDir+\"\\\"+weightedGridName\n weightedOutputGrid.SaveDataSet(fullWeightPath.AsFileName)\n weighted GridList.Add(weightedOutputGrid)\n curGridNum = curGridNum + 1\n end\n returnList = av.Run(\"NSCombineGrids\", WeightedGridList)\n 'EXPORT THE SETUP TABLE TO THE WEIGHTED GRID DIRECTORY FOR ARCHIVING PURPOSES\n av.Run(\"NSExportTable\", {weightedGridDir, \"Setup\"}) '\nend\n'THE COMBINE SCRIPT RETURNED THE OVERLAY GRID AND A LIST CONTAINING A COUNT OF UNIQUE VALUES\n'REFERENCE THE INDIVIDUAL COMPONENTS OF THE GRID HERE\nstandardOverlayGrid = returnList.Get(0)\nuniqueValueList = returnList.Get(1) 'UNIQUE VALUES IN THE OUTPUT GRID\nif (standardOverlayGrid.Is(Grid)) then\n standardOverlayGrid.SaveDataSet(standardOverlayFN.AsFileName)\nelse\n MsgBox.Error(\"Unable to create overlay grid\", \"Exiting\")\n av.DelayedRun(\"NSWorkingMessage\", {\"close\"}, 2) 'REMOVE THE MESSAGE DIALOG FROM THE SCREEN\n return nil\nend\n\n'CALCULATE THE NUMBER OF UNIQUE VALUES IN THE TOTAL COLUMN\n\n''CONVERT OVERLAY GRID TO A SHAPEFILE TO FACILITATE CARTOGRAPHIC PROCESSES\n'THIS INVOLVES CONVERTING THE GRID TO SHAPEFILE, WHICH USES THE VALUE COLUMN.\n'THE MEANINGFUL DATA IS ACTUALLY IN THE 'TOTAL' COLUMN SINCE RECORDING EACH INPUT\n'CELL'S VALUE WAS DESIRED. BECAUSE OF THIS, THE UNIQUE IDENTIFIER FOR THE COMBINATION IS\n'CREATED IN THE VALUE COLUMN INSTEAD OF A MEANINGFUL TOTAL. TO COPY THIS TO THE OUTPUT SHAPEFILE,\n'THE GRID'S VAT MUST BE JOINED ONTO THE SHAPEFILE AND THE TOTAL VALUE CALCULATED OVER.\nif (Self.GetTag = \"Standard\") then\n outputShpName = standardOverlayFN.Substitute(\"standard\", \"stan_shp.shp\")\nelse\n outputShpName = standardOverlayFN+\".shp\"\n end\n'FIRST, CONVERT THE GRID TO SHAPEFILE\noutputShpFTab = standardOverlayGrid.AsPolygonFTab(outputShpName.AsFileName,TRUE,Prj.MakeNull)\ngridVTab = standardOverlayGrid.GetVTab\ngridValFld = gridVTab.FindField(\"Value\")\noutShpGCFld = outputShpFTab.FindField(\"Gridcode\")\n'MAKE SURE THE JOIN FIELDS CAN BE FOUND\nif ((nil <> gridValFld) and (nil <> outShpGCFld)) then\n outputShpFTab.Join(outShpGCFld, gridVTab, gridValFld)\n 'START EDITING THE NEW SHAPEFILE AND CALCULATE THE 'TOTAL' FIELD INTO A NEW FIELD\n outputShp FTab.StartEditingWithRecovery\n newTotalFld = Field.Make(\"Total_Val\", #FIELD_BYTE, 4, 0)\n outputShpFTab.AddFields({newTotalFld})\n joinedTotalFld = outputShpFTab.FindField(\"Total\")\n 'LOOP THROUGH EACH RECORD AND COPY THE TOTAL VALUES\n for each rec in outputShpFTab\n totalVal = outputShpFTab.ReturnValue(joinedTotalFld, rec)\n outputShpFTab.SetValue(newTotalFld, rec, totalVal)\n end\n outputShpFTab.UnjoinAll\n outputShpFTab.StopEditingWithRecovery(True)\nelse\n MsgBox.Warning(\"Model completed, but conve rsion to shapefile encountered errors\", \n \"Problem finalizing output shapefile\")\nend\n\n'WHEN THE STANDARD OVERLAY HAS COMPLETED, ENABLE THE WEIGHTED OVERLAY\nwoCtl = setupDlog.FindByName(\"chkWeightedOverlay\")\nav.Run(\"NSEnableWeightedOverlay\", woCtl)\nwoCtl.SetEnabled(True) \n\n'ADD FINAL GRID AND SHAPEFILE THEMES TO A VIEW\naddDataToView = MsgBox.YesNo(\"Add \"+Self.GetTag+\" Overlay results to a view?\", \"Processing Complete\", True)\nif (addDataToView) then\n 'CREATE THE THEME AND MODIFY ITS LEGEND TO USE THE 'TOTAL' FIELD\n standardGThm = GTheme.Make(standardOverlayGrid)\n standardFThm = FTheme.Make(outputShpFTab) 'OVERLAY RESULTS CONVERTED TO SHAPEFILE\n standardFThm.SetName(\"Overlay Results Shapefile\")\n for each thm in {standardGThm, standardFThm}\n if (thm.Is(GTheme)) then\n val_field = \"total\"\n data_path = standardOverlayFN+\".avl\"\n else\n val_field = \"total_val\"\n data_path = outputShpName.Substitute(\".shp\", \".avl\")\n end\n gridLeg = thm.GetLegend.Clone\n gridLeg.SetLegendTy pe(#LEGEND_TYPE_COLOR)\n if (Self.GetTag = \"standard\") then\n totalClasses = uniqueValueList.Count\n else\n totalClasses = uniqueValueList.Count + 1\n end\n gridLeg.Interval(thm, val_field, totalClasses)\n gridLeg.SetFieldNames({val_field})\n theColorRamp = SymbolList.GetPreDefined(#SYMLIST_TYPE_COLORRAMP).Get(0)\n gridLeg.GetSymbols.RampSavedColors(theColorRamp)\n 'NO NEED TO DISPLAY VALUES OF 0 -- fill or outline = transparent\n transColor = Color.Make\n transColor.SetTranspare nt(True)\n gridLeg.GetSymbols.Get(0).SetColor(transColor)\n gridLeg.GetSymbols.Get(0).SetOLColor(transColor)\n if (thm.Is(GTheme)) then\n gridLeg.DisplayNoDataClass(True)\n gridLeg.GetSymbols.Get(gridLeg.GetSymbols.Count - 1).SetColor(transColor)\n end\n thm.SetLegend(gridLeg)\n thm.UpdateLegend\n 'ONCE THE LEGEND IS CREATED, SAVE IT TO A LEGEND FILE SO EACH TIME THE THEME IS RELOADED,\n ' THE CORRECT FIELD WILL BE USED TO DISPLAY VALUES.\n didSave = gridLeg.Save(data_path.asFileNa me) 'SAVE THE LEGEND FOR FUTURE USE. EACH TIME THE THEME IS RELOADED, USE THE SAME SYMBOLOGY AND FIELDS\n end\n viewList = {}\n for each aDoc in av.GetProject.GetDocs\n if (aDoc.Is(View)) then\n viewList.Add(aDoc.GetName)\n end\n end\n 'PRESENT THE LIST OF VIEWS TO THE USER\n viewStringToUse = MsgBox.ListAsString(viewList, \"Choose a view to add \"+Self.GetTag+\" overlay theme to\",\n \"Views\")\n if (viewStringToUse <> nil) then\n 'ADD THE GRID AND CONVERTED SHAPEFILE THEME TO THE SELECTED VIEW\n viewToUse = av.GetProject.FindDoc(viewStringToUse)\n viewToUse.AddTheme(standardGThm)\n viewToUse.AddTheme(standardFThm)\n standardGThm.SetVisible(True)\n viewToUse.GetWin.Open\n end\n 'PROMPT THE USER TO ADD A SHADED RELIEF IMAGE TO FURTHER ENHANCE THE DISPLAY OF THE MODEL RESULTS\n av.Run(\"NSAddShadedReliefImageDialog\", nil)\nend\nav.Run(\"NSWorkingMessage\", {\"close\"}) 'REMOVE THE MESSAGE DIALOG FROM THE SCREEN\nreturn nil" ) (Script.306 Name: "NSStandardOverlayUpdate" SourceCode: "'NSStandardOverlayUpdate\n\n'NSDataConversionUpdate\n'\n'ENABLE OR DISABLE THE 'STANDARD OVERLAY' BUTTON\n'\n'VERIFY THAT THE SELF OBJECT PASSED IN IS A BOOLEAN\nif (Self.GetClass.GetClassName <> \"Boolean\") then\n MsgBox.Error(\"Object passed from calling script must be a Boolean\", \"Unable to continue\")\n return nil\nend\nsetupDlog = av.Run(\"NSFindSetupDialog\", nil)\nconvertCTL = setupDlog.FindByName(\"lblStandardOverlay\")\nif (convertCTL = nil) then\n MsgBox.Error(\"Unable to locate the Data Conversion/Standard Overlay button\", \"Unable to process\")\n return nil\nend\nconvertCTL.SetEnabled(Self)\nreturn nil" ) (Script.307 Name: "NSTempDir.Get" SourceCode: "'NSTempDir.Get\n'GETS THE CURRENT TEMP DIRECTORY AND RETURNS IT AS A STRING\n\ncurrentWorkDir = FileName.GetTmpDir\nreturn currentWorkDir.AsString" ) (Script.308 Name: "NSThemeStatusDlog.Close" SourceCode: "'CLOSE THE THEME STATUS DIALOG, WHICH IS CALLED AT THE START OF THE\n' MODEL PREPROCESSING STEP\ntheListBoxes = Self.GetDialog.FindByClass(ListBox)\nfor each l in theListBoxes\n l.Empty\nend\nSelf.GetDialog.Close\nreturn nil" ) (Script.309 Name: "NSWorkingDir.Get" SourceCode: "'NSWorkingDir.Get\n'\n'GET THE CURRENT WORKING DIRECTORY.\n'\n'FIRST, VERIFY THE CONTROL ON THE DIALOG\nsetupDlog = av.Run(\"NSFindSetupDialog\", nil)\ncurWorkDirCTL = setupDlog.FindByName(\"txtWorkingDirectory\")\nif (curWorkDirCTL = nil) then\n MsgBox.Error(\"Unable to locate the Working Directory control\", \"Unable to verify working directory\")\n exit\nend\n'VERIFY THAT A WORKING DIRECTORY HAS BEEN SET\ncurWorkDir = curWorkDirCTL.GetLabel\nif (curWorkDir = nil) then\n MsgBox.Error(\"A working directory must be specified b efore continuing\", \"No working directory set\")\n exit\nend\n'VERIFY THAT IT IS A VALID DIRECTORY\nif (curWorkDir.AsFileName.IsDir) then\n return curWorkDir\nelse\n MsgBox.Error(\"Working directory is not valid\", \"Unable to locate working directory\")\n exit\nend\n" ) (Script.310 Name: "NSWorkingMessage" SourceCode: "'NSWorkingMessage\n'\n'PROVIDE A MESSAGE INDICATING THE STATUS OF THE MODEL\n'THE USER WILL BE TOLD WHICH THEME IS CURRENTLY BEING PROCESSED\n'\nstatusDlog = av.GetProject.FindDialog(\"statusDialog\")\nmessageCTL = statusDlog.FindByName(\"txtWorking\")\nif (Self.Get(0) = \"Open\") then\n 'CENTER THE MENU ON THE SCREEN\n AVUpperLeft = av.ReturnOrigin\n AVCenter = avUpperLeft + (av.ReturnExtent / (2@2))\n halfDialogWidthHeight = statusDlog.ReturnExtent.ReturnSize / (2@2)\n MovePoint = AVCenter - halfDialogWidthHeight\n st atusDlog.MoveTo(MovePoint.GetX, MovePoint.GetY)\n \n messageCTL.SetLabel(\"Preparing data\")\n statusDlog.Open\nelseIf (Self.Get(0) = \"close\") then\n statusDlog.Close\nelse\n curMessage = Self.Get(1)\n if (curMessage = nil) then\n return nil\n else\n messageCTL.SetLabel(curMessage)\n end\nend\nreturn nil" ) (Script.311 Name: "NSCloseModelSetupDialog" SourceCode: "'NSCloseModelSetupDialog\n\n'TRIGGERED EACH TIME THE DIALOG IS CLOSED. \n'THE PURPOSE OF THIS SCRIPT IS TO ENSURE THAT THE SPATIAL ANALYST\n'ANALYSIS ENVIRONMENT IS CHANGED BACK TO DEFAULT. THIS APP REQUIRES\n'A USER SPECIFIED CELL SIZE, BUT IF THIS REFERENCE IS SAVED WITH THE PROJECT\n'THERE COULD BE PROBLEMS. \n\nsdView = av.Run(\"NSFindSetupView\", nil)\ntheAE = sdView.GetExtension(AnalysisEnvironment)\ntheAE.SetCellSize(#ANALYSISENV_MINOF, nil)\ntheAE.SetExtent(#ANALYSISENV_MINOF, nil)\ntheAE.Activate\nreturn nil" ) (Script.312 Name: "SAM.Install" SourceCode: "'DO NOT EDIT!!!\n\nif (av.getproject=nil) then return(nil) end\n\n\ntheDocs = SELF.get(0)\ntheDialogs = SELF.get(1)\ntheControlList = SELF.get(2)\ntheMenuList = SELF.get(3)\ntheToolMenuList=SELF.Get(4)\ntheProject=Av.getproject\n\n\n'Add the Docs\n'\ntoAdd = True 'BY DEFAULT, ADD THE VIEW CONTAINED WITHIN THE EXTENSION\n projDocs = theProject.GetDocs\n for each d in projDocs\n if (d.Is(View)) then\n if (d.GetName = \"Sensitive Areas Model (SAM) Source Data\") then\n toAdd = False\n end\n end\n end\n'IF THE VIEW IS ALREADY PRESENT (SAVED WITH PROJECT) DON'T CREATE ONE\nif (toAdd) then\n newView = View.Make\n newView.SetName(\"Sensitive Areas Model (SAM) Source Data\")\nend\n\n'Add the Dialogs\n'\nfor each adialog in theDialogs\n theProject.addDialog(adialog)\nend\n\n'Add the Controls\n'\nfor each totalControl in theControlList\n 'The Control list\n acontrol=totalControl.get(0)\n \n 'The physical control\n theControl = totalControl.get(1)\n \n 'The control Index\n theCindex=totalControl.get(2)\n\n 'Find the DocGUI\n theCont rolDoc=av.getproject.findGUI(aControl.get(0))\n if (theControlDoc=NIL) then \n MsgBox.Warning(\"The GUI \"+aControl.get(0)+\" cannot be found in the current project.\",\"Script Eror\")\n return(nil)\n end\n \n 'This finds the control set \n thecommand=\"av.getproject.findGUI(\"\"\"+aControl.get(0)+\"\"\").Get\"+acontrol.get(1)\n thescript1=Script.Make(thecommand)\n thecontrolset=thescript1.doit(\"\")\n \n 'Add the control to the control set\n theControlSet.Add(theControl,theCindex)\nend\n\n\n'Add the menus \nfor each totalcontrol in theMenuList\n \n 'The Control list\n acontrol=totalControl.get(0)\n mDoc=acontrol.get(0)\n mMenu=acontrol.get(1)\n mMenuItem=acontrol.get(2)\n\n 'The physical control\n theControl = totalControl.get(1)\n \n 'The control Index\n theCindex=totalControl.get(2)\n\n 'Find the DocGUI\n theControlDoc=av.getproject.findGUI(aControl.get(0))\n if (theControlDoc=NIL) then \n MsgBox.Warning(\"The GUI \"+aControl.get(0)+\" cannot be found in the current project.\",\"Scri pt Eror\")\n return(nil)\n end\n \n theMbar=av.getproject.findGUI(mDoc).GetMenuBar\n themenu=theMbar.findbylabel(mMenu)\n if (themenu=NiL) then\n themenu=menu.make\n themenu.setlabel(mMenu)\n theMbar.add(themenu,999)\n end\n \n themenu.add(thecontrol, theCindex)\nend\n \n'Add the Tool Menus\n\nfor each totalControl in theToolMenuList\n 'The Control list\n acontrol=totalControl.get(0)\n \n 'The physical control\n theControl = totalControl.get(1)\n \n 'The control Index\n theCindex=to talControl.get(2)\n\n 'Find the DocGUI\n theControlDoc=av.getproject.findGUI(aControl.get(0))\n if (theControlDoc=NIL) then \n MsgBox.Warning(\"The GUI \"+aControl.get(0)+\" cannot be found in the current project.\",\"Script Eror\")\n return(nil)\n end\n \n 'This finds the control set \n thecommand=\"av.getproject.findGUI(\"\"\"+aControl.get(0)+\"\"\").Get\"+acontrol.get(1)\n thescript1=Script.Make(thecommand)\n thecontrolset=av.getproject.findGUI(aControl.get(0)).GetToolBar\n \n 'Add the control to the control set\n theControlSet.Add(theControl,theCindex)\nend\n\n\nav.getproject.setmodified(true)\n\n'And the scripts add themselves\n" ) (Script.313 Name: "SAM.Uninstall" SourceCode: "'DO NOT EDIT!!!\n\n'The SELF is the Extension\n\ntheDocs = SELF.get(0)\ntheDialogs = SELF.get(1)\ntheControlList = SELF.get(2)\ntheMenuList = SELF.get(3)\ntheToolMenuList=SELF.get(4)\ntheProject=Av.getproject\n\n'LEAVE THE VIEW INTACT\n'Remove the Docs\n'\n'for each adoc in theDocs\n' If (theProject.finddoc(adoc.getname)<>NIL) then \n' theAnswer=msgbox.yesno(\"Remove the Document \"+adoc.getname+\"?\",\"Remove Document?\",TRUE)\n' if (theAnswer=TRUE) then theProject.RemoveDoc(adoc) end\n' end\n'end\n\n'Remove the Dialogs\n'\nfor each adialog in theDialogs\n theProject.RemoveDialog(adialog.AsString)\nend\n\n'Removethe Controls\n'\nfor each totalControl in theControlList\n 'Get the control list from the Ext\n acontrol=totalControl.get(0)\n \n 'Get the physical Control\n theControl = totalControl.get(1)\n \n 'Get the Controls Index\n theCindex=totalControl.get(2)\n\n 'Find the DocGUI for the Control\n theControlDoc=av.getproject.findGUI(aControl.get(0))\n if (theControlDoc=NIL) then \n MsgBox.Warning(\"The GUI \"+aControl.get( 0)+\" cannot be found in the current project.\",\"Script Eror\")\n return(nil)\n end\n \n 'This sequence finds the appropiate control set\n thecommand=\"av.getproject.findGUI(\"\"\"+aControl.get(0)+\"\"\").Get\"+acontrol.get(1)\n thescript1=Script.Make(thecommand)\n thecontrolset=thescript1.doit(\"\")\n\n 'See if the control is in the set , if so remove it\n if (theControlSet.GetControls.find(theControl)<>NIL) then\n theControlSet.remove(theControl)\n if (thecontrol = \"ToolBar\") then\n theCon trolSet.selectdefault\n end\n end\nend\n\n\n'Remove the Menus\n'\nfor each totalcontrol in theMenuList\n \n 'The Control list\n acontrol=totalControl.get(0)\n mDoc=acontrol.get(0)\n mMenu=acontrol.get(1)\n mMenuItem=acontrol.get(2)\n\n 'The physical control\n theControl = totalControl.get(1)\n \n 'The control Index\n theCindex=totalControl.get(2)\n\n 'Find the DocGUI\n theControlDoc=av.getproject.findGUI(aControl.get(0))\n if (theControlDoc=NIL) then \n MsgBox.Warning(\"The GUI \"+aControl.get(0)+\" cannot be found in the current project.\",\"Script Eror\")\n return(nil)\n end\n \n theMbar=av.getproject.findGUI(mDoc).GetMenuBar\n themenu=theMbar.findbylabel(mMenu)\n if (themenu=NiL) then\n MsgBox.Warning(\"The menu named \"+mMenu+\" is not here.\",\"Script Eror\")\n 'return(nil)\n else\n \n thething=themenu.getcontrols.find(thecontrol)\n if (thething<>NIL) then \n themenu.remove(thecontrol) \n end\n 'msgbox.info(themenu.GetControls.count.asstring,\"\")\n if (the menu.GetControls.count<1) then\n theMbar.remove(themenu)\n end\n end\nend\n \nfor each totalControl in theToolMenuList\n 'Get the control list from the Ext\n acontrol=totalControl.get(0)\n \n 'Get the physical Control\n theControl = totalControl.get(1)\n \n 'Get the Controls Index\n theCindex=totalControl.get(2)\n\n 'Find the DocGUI for the Control\n theControlDoc=av.getproject.findGUI(aControl.get(0))\n if (theControlDoc=NIL) then \n MsgBox.Warning(\"The GUI \"+aControl.get(0)+\" canno t be found in the current project.\",\"Script Eror\")\n return(nil)\n end\n \n 'This sequence finds the appropiate control set\n thecontrolset=av.getproject.findGUI(aControl.get(0)).GetToolBar\n\n \n 'See if the control is in the set , if so remove it\n if (theControlSet.GetControls.find(theControl)<>NIL) then\n \n theControlSet.remove(theControl)\n theControlSet.selectdefault\n end\n\nend\n \n\n'And the scripts delete themselves\n\n\nav.getproject.setmodified(true)\n" )