/3.2 (Extension.1 Name: "StatMod Zone" Dependencies: "$AVBIN/avdlog.dll\n$AVEXT/spatial.avx\n" FirstRootClassName: "PMenu" Roots: 2 Roots: 27 Roots: 43 Roots: 71 Roots: 99 Roots: 140 Roots: 157 Roots: 201 Roots: 224 Roots: 261 Roots: 317 Roots: 420 Roots: 435 Roots: 466 Roots: 481 Roots: 565 Roots: 606 Roots: 642 Roots: 669 Roots: 694 Roots: 731 Roots: 754 Roots: 804 Roots: 839 Roots: 898 Roots: 915 Roots: 924 Roots: 1022 Roots: 1037 Roots: 1078 Roots: 1103 Roots: 1145 Roots: 1172 Roots: 1254 Roots: 1313 Roots: 1378 Roots: 1379 Roots: 1380 Roots: 1381 Roots: 1382 Roots: 1383 Roots: 1384 Roots: 1385 Roots: 1386 Roots: 1387 Roots: 1388 Roots: 1389 Roots: 1390 Roots: 1391 Roots: 1392 Roots: 1393 Roots: 1394 Roots: 1395 Roots: 1396 Roots: 1397 Roots: 1398 Roots: 1399 Roots: 1400 Roots: 1401 Roots: 1402 Roots: 1403 Roots: 1404 Roots: 1405 Roots: 1406 Roots: 1407 Roots: 1408 Roots: 1409 Roots: 1410 Roots: 1411 Roots: 1412 Roots: 1413 Roots: 1414 Roots: 1415 Roots: 1416 Roots: 1417 Roots: 1418 Roots: 1419 Roots: 1420 Roots: 1421 Roots: 1422 Roots: 1423 Roots: 1424 Roots: 1425 Roots: 1426 Roots: 1427 Roots: 1428 Roots: 1429 Roots: 1430 Roots: 1431 Roots: 1432 Roots: 1433 Roots: 1434 Roots: 1435 Roots: 1436 Roots: 1437 Roots: 1438 Roots: 1439 Roots: 1440 Roots: 1441 Roots: 1442 Roots: 1443 Roots: 1444 Roots: 1445 Roots: 1446 Roots: 1447 Roots: 1448 Roots: 1449 Roots: 1450 Roots: 1451 Roots: 1452 Roots: 1453 Roots: 1454 Roots: 1455 Roots: 1456 Roots: 1457 Roots: 1458 Roots: 1459 Roots: 1460 Roots: 1461 Roots: 1462 Roots: 1463 Roots: 1464 Roots: 1465 Roots: 1466 Roots: 1467 Roots: 1468 Roots: 1469 Roots: 1470 Roots: 1471 Roots: 1472 Roots: 1473 Roots: 1474 Roots: 1475 Roots: 1476 Roots: 1477 Roots: 1478 Roots: 1479 Roots: 1480 Roots: 1481 Roots: 1482 Roots: 1483 Roots: 1484 Roots: 1485 Roots: 1486 Roots: 1487 Roots: 1488 Roots: 1489 Roots: 1490 Roots: 1491 Roots: 1492 Roots: 1493 Roots: 1494 Roots: 1495 Roots: 1496 Roots: 1497 Roots: 1498 Roots: 1499 Roots: 1500 Roots: 1501 Roots: 1502 Roots: 1503 Roots: 1504 Roots: 1505 Roots: 1506 Roots: 1507 Roots: 1508 Roots: 1509 Roots: 1510 Roots: 1511 Roots: 1512 Roots: 1513 Roots: 1514 Roots: 1515 Roots: 1516 Roots: 1517 Roots: 1518 Roots: 1519 Roots: 1520 Roots: 1521 Roots: 1522 Roots: 1523 Roots: 1524 Roots: 1525 Roots: 1526 Roots: 1527 Roots: 1528 Roots: 1529 Roots: 1530 Roots: 1531 Roots: 1532 Roots: 1533 Roots: 1534 Roots: 1535 Roots: 1536 Roots: 1537 Roots: 1538 Roots: 1539 Roots: 1540 Roots: 1541 Roots: 1542 Roots: 1543 Roots: 1544 Roots: 1545 Roots: 1546 Roots: 1547 Roots: 1548 Roots: 1549 Roots: 1550 Roots: 1551 Roots: 1552 Roots: 1553 Roots: 1554 Roots: 1555 Roots: 1556 Roots: 1557 Roots: 1558 Roots: 1559 Roots: 1560 Roots: 1561 Roots: 1562 Roots: 1563 Roots: 1564 Roots: 1565 Roots: 1566 Roots: 1567 Roots: 1568 Roots: 1569 Roots: 1570 Roots: 1571 Roots: 1572 Roots: 1573 Roots: 1574 Roots: 1575 Roots: 1576 Roots: 1577 Roots: 1578 Roots: 1579 Roots: 1580 Roots: 1581 Roots: 1582 Roots: 1583 Roots: 1584 Roots: 1585 Roots: 1586 Roots: 1587 Roots: 1588 Roots: 1589 Roots: 1590 Roots: 1591 Roots: 1592 Roots: 1593 Roots: 1594 Roots: 1595 Roots: 1596 Roots: 1597 Roots: 1598 Roots: 1599 Roots: 1600 Roots: 1601 Roots: 1602 Roots: 1603 Roots: 1604 Roots: 1605 Roots: 1606 Roots: 1607 Roots: 1608 Roots: 1609 Roots: 1610 Roots: 1611 Roots: 1612 Roots: 1613 Version: 32 About: "Extends ArcView to support logistic regression and classification & regression tree models using SAS and S-Plus. Requires Spatial Analyst. UNIX version, May 12, 2003" LoadScript: 1614 CanUnloadScript: 1615 UnloadScript: 1616 InstallScript: 1617 UninstallScript: 1618 ProjectSaveScript: 1619 ExtVersion: 1 ) (PMenu.2 InternalName: "StatMod" Child: 3 Child: 4 Child: 5 Child: 6 Child: 7 Child: 8 Child: 9 Child: 10 Child: 11 Child: 12 Child: 13 Child: 14 Child: 15 Child: 16 Child: 17 Child: 18 Child: 19 Child: 20 Child: 21 Child: 22 Child: 23 Child: 24 Child: 25 Child: 26 Label: "Stat&Mod" ) (Choice.3 InternalName: "Logistic" Disabled: 1 Help: "Create a logistic regression model to run in SAS" Update: "SM.Menu.Update" Label: "&Logistic Regression (SAS)..." Click: "SM.Menu.Logistic" Shortcut: "Keys.None" ) (Choice.4 InternalName: "Tree" Disabled: 1 Help: "Create a classification or regression tree model to run in S-Plus" Update: "SM.Menu.Update" Label: "&Tree Models (S-PLUS)..." Click: "SM.Menu.Tree" Shortcut: "Keys.None" ) (Choice.5 InternalName: "Import" Help: "Import StatMod output from SAS or S-Plus" Label: "&Import Model..." Click: "SM.Menu.Import" Shortcut: "Keys.None" ) (Choice.6 InternalName: "Specify" Disabled: 1 Help: "Specify your own parameters for a model" Update: "SM.Menu.Update" Label: "Specify &Model..." Click: "SM.Menu.Specify" Shortcut: "Keys.None" ) (Choice.7 Help: "Edit an existing tree model" Label: "E&dit Tree..." Click: "SM.Menu.EditTree" Shortcut: "Keys.None" ) (Choice.8 Help: "Create rules based on a text file" Label: "Create R&ules..." Click: "SM.Menu.Rules" Shortcut: "Keys.None" ) (Space.9 ) (Choice.10 InternalName: "Sample" Disabled: 1 Help: "Sample polygon and grid themes based on a point theme" Update: "SM.Menu.Update" Label: "&Sample..." Click: "SM.Menu.Sample" Shortcut: "Keys.None" ) (Choice.11 InternalName: "ZoneSample" Disabled: 1 Help: "Sample grid themes based on a polygon theme" Update: "SM.Menu.Update" Label: "&Zone Sample..." Click: "SM.Menu.ZoneSample" Shortcut: "Keys.None" ) (Choice.12 InternalName: "Random" Disabled: 1 Help: "Generate a random sample of points" Update: "SM.Menu.Update" Label: "&Random Sample..." Click: "SM.Menu.RandomSample" Shortcut: "Keys.None" ) (Choice.13 InternalName: "Kappa" Disabled: 1 Help: "Compute Cohen's Kappa" Update: "SM.Menu.Update" Label: "Compute &Kappa..." Click: "SM.Menu.Kappa" Shortcut: "Keys.None" ) (Space.14 ) (Choice.15 InternalName: "Intersect" Disabled: 1 Help: "Intersect multiple polygon themes" Update: "SM.Menu.Update" Label: "I&ntersect Themes..." Click: "SM.Menu.Intersect" Shortcut: "Keys.None" ) (Choice.16 InternalName: "Convert" Disabled: 1 Help: "Convert the active theme to a grid" Update: "SM.Menu.Update" Label: "&Convert to Grid..." Click: "SM.Menu.PolyGrid" Shortcut: "Keys.None" ) (Choice.17 InternalName: "Resample" Disabled: 1 Help: "Resample the active grid theme" Update: "SM.Menu.Update" Label: "R&esample..." Click: "SM.Menu.GridResample" Shortcut: "Keys.None" ) (Choice.18 InternalName: "Combine" Disabled: 1 Help: "Combine two or more adjacent grid themes" Update: "SM.Menu.Update" Label: "Combine &Grids..." Click: "SM.Menu.Combine" Shortcut: "Keys.None" ) (Space.19 ) (Choice.20 InternalName: "Info" Disabled: 1 Help: "Show StatMod model information for the active theme" Update: "SM.Menu.Update" Label: "Theme In&formation" Click: "SM.Menu.Info" Shortcut: "Keys.None" ) (Space.21 ) (Choice.22 InternalName: "Properties" Help: "Set StatMod properties" Label: "&Properties..." Click: "SM.Menu.Properties" Shortcut: "Keys.None" ) (Space.23 ) (Choice.24 InternalName: "Help" Help: "Open StatMod help" Label: "&Help" Click: "SM.Help" Shortcut: "Keys.None" ) (Space.25 ) (Choice.26 InternalName: "About" Help: "Show the StatMod copyright statement" Label: "&About StatMod..." Click: "SM.Menu.About" Shortcut: "Keys.None" ) (AVDLog.27 Name: "SM.About" X: 76 Y: 100 W: 387 H: 279 ConstrainedControlNames: 28 Constraints: 29 Server: 30 ControlPanel: 31 ObjectTag: 33 Title: "About StatMod" EscapeEnabled: 1 Modal: 1 AlwaysOnTop: 1 HasTitleBar: 1 Closeable: 1 DefaultButton: 36 ) (AVStr.28 S: "lbtOK" ) (Numb.29 N: 85.00000000000000 ) (Nil.30 ) (CPanel.31 Child: 32 Child: 34 Child: 35 Child: 36 Child: 37 ResBox: 38 ResBox: 39 ResBox: 40 ResBox: 41 ResBox: 42 Listening: 1 ) (TextLabel.32 InternalName: "aTextLabel2" ObjectTag: 33 Constraints: 0x55 Label: "Permission is hereby granted to any individual or\ninstitution for use, copying, modification, or\nredistribution of the StatMod Avenue scripts and\ncomponents, and associated documentation, provided\nsuch code and documentation are not sold for profit\nand this copyright notice is retained in the code and\ndocumentation." Listening: 1 ) (Nil.33 ) (TextLabel.34 InternalName: "aTextLabel3" ObjectTag: 33 Constraints: 0x55 Label: "Copyright (c) 2002 Christine M. Garrard" Listening: 1 ) (TextLabel.35 InternalName: "aTextLabel4" ObjectTag: 33 Constraints: 0x55 Label: "StatMod Zone" Listening: 1 ) (LButn.36 InternalName: "lbtOK" ObjectTag: 33 Label: "OK" Click: "SM.About.Click" ) (TextLabel.37 InternalName: "txtDate" ObjectTag: 33 Constraints: 0x55 Label: "May 12, 2003" Listening: 1 ) (RectD.38 Left: 23.00000000000000 Top: 256.00000000000000 Right: 383.00000000000000 Bottom: 119.00000000000000 ) (RectD.39 Left: 23.00000000000000 Top: 108.00000000000000 Right: 305.00000000000000 Bottom: 84.00000000000000 ) (RectD.40 Left: 23.00000000000000 Top: 37.00000000000000 Right: 123.00000000000000 Bottom: 21.00000000000000 ) (RectD.41 Left: 315.00000000000000 Top: 42.00000000000000 Right: 354.00000000000000 Bottom: 19.00000000000000 ) (RectD.42 Left: 23.00000000000000 Top: 78.00000000000000 Right: 321.00000000000000 Bottom: 50.00000000000000 ) (AVDLog.43 Name: "SM.ChooseDir" X: 385 Y: 285 W: 247 H: 259 ConstrainedControlNames: 44 ConstrainedControlNames: 45 ConstrainedControlNames: 46 ConstrainedControlNames: 47 Constraints: 48 Constraints: 49 Constraints: 50 Constraints: 51 Server: 52 ControlPanel: 53 ObjectTag: 33 Title: "Choose Directory" Modal: 1 Resizable: 1 AlwaysOnTop: 1 HasTitleBar: 1 Close: "SM.ChooseDir.Close" Open: "SM.ChooseDir.Open" DefaultButton: 62 ) (AVStr.44 S: "lbtOK" ) (AVStr.45 S: "lbtCancel" ) (AVStr.46 S: "lbtHelp" ) (AVStr.47 S: "btnGoDir" ) (Numb.48 N: 86.00000000000000 ) (Numb.49 N: 86.00000000000000 ) (Numb.50 N: 86.00000000000000 ) (Numb.51 N: 86.00000000000000 ) (Nil.52 ) (CPanel.53 Child: 54 Child: 56 Child: 58 Child: 62 Child: 63 Child: 64 ResBox: 65 ResBox: 66 ResBox: 67 ResBox: 68 ResBox: 69 ResBox: 70 Listening: 1 ) (TextLine.54 InternalName: "txlDir" ObjectTag: 33 Text: "/home/chrisg/statmod" Constraints: 0x53 Listening: 1 TextType: 55 Apply: "SM.ChooseDir.Apply" Changed: "SM.ChooseDir.Changed" NextControl: 52 ) (AVEnum.55 Name: "TEXTLINE_TYPE_ALL" ) (Butn.56 InternalName: "btnGoDir" Disabled: 1 ObjectTag: 33 Icon: 57 Click: "SM.ChooseDir.Click" ) (AVIcon.57 Name: "Star" Res: "Icons.Star" ) (AVLBox.58 InternalName: "lbxDir" ObjectTag: 33 Update: "SM.ChooseDir.Update" NextControl: 52 ContentKind: 4 Value: 59 Value: 60 Constraints: 0x33 ColumnCount: 1 Listening: 1 VerticalScroll: 1 Select: "SM.ChooseDir.Select" SelectionStyle: 61 Apply: "SM.ChooseDir.Apply" ) (AVStr.59 S: ".." ) (AVStr.60 S: "info" ) (AVEnum.61 Name: "LISTBOX_SELECTION_SINGLECELL" ) (LButn.62 InternalName: "lbtOK" Disabled: 1 ObjectTag: 33 Update: "SM.ChooseDir.Update" Label: "OK" Click: "SM.ChooseDir.Click" ) (LButn.63 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.ChooseDir.Click" ) (LButn.64 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.ChooseDir.Click" ) (RectD.65 Left: 3.00000000000000 Top: 32.00000000000000 Right: 209.00000000000000 Bottom: 12.00000000000000 ) (RectD.66 Left: 215.00000000000000 Top: 33.00000000000000 Right: 236.00000000000000 Bottom: 13.00000000000000 ) (RectD.67 Left: 11.00000000000000 Top: 248.00000000000000 Right: 176.00000000000000 Bottom: 41.00000000000000 ) (RectD.68 Left: 183.00000000000000 Top: 85.00000000000000 Right: 236.00000000000000 Bottom: 58.00000000000000 ) (RectD.69 Left: 183.00000000000000 Top: 127.00000000000000 Right: 236.00000000000000 Bottom: 100.00000000000000 ) (RectD.70 Left: 183.00000000000000 Top: 169.00000000000000 Right: 236.00000000000000 Bottom: 142.00000000000000 ) (AVDLog.71 Name: "SM.dlgEditNode" X: 53 Y: 100 W: 471 H: 110 ConstrainedControlNames: 72 ConstrainedControlNames: 73 Constraints: 74 Constraints: 75 Server: 76 ControlPanel: 77 ObjectTag: 33 Title: "Edit Node" EscapeEnabled: 1 Modal: 1 AlwaysOnTop: 1 HasTitleBar: 1 Open: "SM.EditNode.Open" DefaultButton: 88 ) (AVStr.72 S: "lbtOK" ) (AVStr.73 S: "lbtCancel" ) (Numb.74 N: 85.00000000000000 ) (Numb.75 N: 85.00000000000000 ) (Nil.76 ) (CPanel.77 Child: 78 Child: 79 Child: 80 Child: 81 Child: 82 Child: 84 Child: 86 Child: 88 Child: 89 ResBox: 90 ResBox: 91 ResBox: 92 ResBox: 93 ResBox: 94 ResBox: 95 ResBox: 96 ResBox: 97 ResBox: 98 Listening: 1 ) (TextLabel.78 InternalName: "txtIf" ObjectTag: 33 Constraints: 0x55 Label: "If:" Listening: 1 ) (TextLabel.79 InternalName: "txtThen" ObjectTag: 33 Constraints: 0x55 Label: "Then:" Listening: 1 ) (AVCBBox.80 InternalName: "cbxThemes" ObjectTag: 33 NextControl: 76 ContentKind: 4 Constraints: 0x55 Listening: 1 Select: "SM.EditNode.Select" ) (AVCBBox.81 InternalName: "cbxRelation" ObjectTag: 33 Update: "SM.EditNode.Update" NextControl: 76 ContentKind: 4 Constraints: 0x55 Listening: 1 Select: "SM.EditNode.Select" ) (TextLine.82 InternalName: "txlValue" ObjectTag: 33 Update: "SM.EditNode.Update" Constraints: 0x55 Listening: 1 TextType: 83 Changed: "SM.EditNode.Changed" NextControl: 76 ) (AVEnum.83 Name: "TEXTLINE_TYPE_ALL" ) (AVLBox.84 InternalName: "lbxValues" Invisible: 1 ObjectTag: 33 Update: "SM.EditNode.Update" NextControl: 76 ContentKind: 4 Constraints: 0x55 ColumnCount: 1 Listening: 1 VerticalScroll: 1 Select: "SM.EditNode.Select" SelectionStyle: 85 ) (AVEnum.85 Name: "LISTBOX_SELECTION_MULTIROW" ) (TextLine.86 InternalName: "txlPrediction" ObjectTag: 33 Constraints: 0x55 Listening: 1 TextType: 87 Changed: "SM.EditNode.Changed" NextControl: 76 ) (AVEnum.87 Name: "TEXTLINE_TYPE_ALL" ) (LButn.88 InternalName: "lbtOK" ObjectTag: 33 Update: "SM.EditNode.Update" Label: "OK" Click: "SM.EditNode.Click" ) (LButn.89 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.EditNode.Click" ) (RectD.90 Left: 10.00000000000000 Top: 40.00000000000000 Right: 25.00000000000000 Bottom: 21.00000000000000 ) (RectD.91 Left: 9.00000000000000 Top: 80.00000000000000 Right: 51.00000000000000 Bottom: 62.00000000000000 ) (RectD.92 Left: 31.00000000000000 Top: 95.00000000000000 Right: 193.00000000000000 Bottom: 20.00000000000000 ) (RectD.93 Left: 201.00000000000000 Top: 97.00000000000000 Right: 261.00000000000000 Bottom: 20.00000000000000 ) (RectD.94 Left: 264.00000000000000 Top: 39.00000000000000 Right: 391.00000000000000 Bottom: 19.00000000000000 ) (RectD.95 Left: 264.00000000000000 Top: 95.00000000000000 Right: 391.00000000000000 Bottom: 19.00000000000000 ) (RectD.96 Left: 51.00000000000000 Top: 81.00000000000000 Right: 144.00000000000000 Bottom: 61.00000000000000 ) (RectD.97 Left: 404.00000000000000 Top: 44.00000000000000 Right: 458.00000000000000 Bottom: 19.00000000000000 ) (RectD.98 Left: 404.00000000000000 Top: 81.00000000000000 Right: 458.00000000000000 Bottom: 56.00000000000000 ) (AVDLog.99 Name: "SM.dlgEditTree" X: 52 Y: 73 W: 580 H: 494 ConstrainedControlNames: 100 ConstrainedControlNames: 101 ConstrainedControlNames: 102 ConstrainedControlNames: 103 ConstrainedControlNames: 104 ConstrainedControlNames: 105 ConstrainedControlNames: 106 ConstrainedControlNames: 107 Constraints: 108 Constraints: 109 Constraints: 110 Constraints: 111 Constraints: 112 Constraints: 113 Constraints: 114 Constraints: 115 Server: 116 ControlPanel: 117 ObjectTag: 33 Title: "Edit Tree" EscapeEnabled: 1 Modal: 1 Resizable: 1 AlwaysOnTop: 1 HasTitleBar: 1 Open: "SM.EditTree.Open" DefaultButton: 139 ) (AVStr.100 S: "lbtSave" ) (AVStr.101 S: "lbtCancel" ) (AVStr.102 S: "lbtDelete" ) (AVStr.103 S: "lbtEdit" ) (AVStr.104 S: "lbtInsert" ) (AVStr.105 S: "lbtUndo" ) (AVStr.106 S: "lbtGo" ) (AVStr.107 S: "lbtRules" ) (Numb.108 N: 86.00000000000000 ) (Numb.109 N: 86.00000000000000 ) (Numb.110 N: 86.00000000000000 ) (Numb.111 N: 86.00000000000000 ) (Numb.112 N: 86.00000000000000 ) (Numb.113 N: 86.00000000000000 ) (Numb.114 N: 86.00000000000000 ) (Numb.115 N: 86.00000000000000 ) (Nil.116 ) (CPanel.117 Child: 118 Child: 119 Child: 121 Child: 122 Child: 123 Child: 124 Child: 125 Child: 126 Child: 127 Child: 128 ResBox: 129 ResBox: 130 ResBox: 131 ResBox: 132 ResBox: 133 ResBox: 134 ResBox: 135 ResBox: 136 ResBox: 137 ResBox: 138 Listening: 1 ) (TextLabel.118 InternalName: "txtFN" ObjectTag: 33 Constraints: 0x53 Label: "File being edited:" Listening: 1 ) (AVLBox.119 InternalName: "lbxTree" ObjectTag: 33 NextControl: 116 ContentKind: 4 Constraints: 0x33 ColumnCount: 1 HorizontalScroll: 1 Listening: 1 VerticalScroll: 1 Select: "SM.EditTree.Select" SelectionStyle: 120 ) (AVEnum.120 Name: "LISTBOX_SELECTION_SINGLEROW" ) (LButn.121 InternalName: "lbtSave" ObjectTag: 33 Label: "Save" Click: "SM.EditTree.Click" ) (LButn.122 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.EditTree.Click" ) (LButn.123 InternalName: "lbtDelete" ObjectTag: 33 Update: "SM.EditTree.Update" Label: "Delete" Click: "SM.EditTree.Click" ) (LButn.124 InternalName: "lbtEdit" ObjectTag: 33 Update: "SM.EditTree.Update" Label: "Edit" Click: "SM.EditTree.Click" ) (LButn.125 InternalName: "lbtInsert" ObjectTag: 33 Update: "SM.EditTree.Update" Label: "Insert" Click: "SM.EditTree.Click" ) (LButn.126 InternalName: "lbtUndo" ObjectTag: 33 Update: "SM.EditTree.Update" Label: "Undo" Click: "SM.EditTree.Click" ) (LButn.127 InternalName: "lbtGo" ObjectTag: 33 Label: "Go..." Click: "SM.EditTree.Click" ) (LButn.128 InternalName: "lbtRules" ObjectTag: 33 Label: "Rules" Click: "SM.EditTree.Click" ) (RectD.129 Left: 18.00000000000000 Top: 29.00000000000000 Right: 476.00000000000000 Bottom: 11.00000000000000 ) (RectD.130 Left: 18.00000000000000 Top: 483.00000000000000 Right: 476.00000000000000 Bottom: 29.00000000000000 ) (RectD.131 Left: 503.00000000000000 Top: 57.00000000000000 Right: 561.00000000000000 Bottom: 34.00000000000000 ) (RectD.132 Left: 503.00000000000000 Top: 88.00000000000000 Right: 561.00000000000000 Bottom: 65.00000000000000 ) (RectD.133 Left: 503.00000000000000 Top: 130.00000000000000 Right: 561.00000000000000 Bottom: 109.00000000000000 ) (RectD.134 Left: 503.00000000000000 Top: 161.00000000000000 Right: 561.00000000000000 Bottom: 139.00000000000000 ) (RectD.135 Left: 503.00000000000000 Top: 190.00000000000000 Right: 561.00000000000000 Bottom: 168.00000000000000 ) (RectD.136 Left: 503.00000000000000 Top: 235.00000000000000 Right: 561.00000000000000 Bottom: 213.00000000000000 ) (RectD.137 Left: 503.00000000000000 Top: 278.00000000000000 Right: 561.00000000000000 Bottom: 257.00000000000000 ) (RectD.138 Left: 503.00000000000000 Top: 323.00000000000000 Right: 561.00000000000000 Bottom: 301.00000000000000 ) (Nil.139 ) (AVDLog.140 Name: "SM.dlgRules" X: 132 Y: 81 W: 387 H: 379 ConstrainedControlNames: 141 ConstrainedControlNames: 142 ConstrainedControlNames: 143 Constraints: 144 Constraints: 145 Constraints: 146 Server: 116 ControlPanel: 147 ObjectTag: 33 Title: "Rules" EscapeEnabled: 1 Modal: 1 Resizable: 1 AlwaysOnTop: 1 HasTitleBar: 1 DefaultButton: 156 ) (AVStr.141 S: "lbtClose" ) (AVStr.142 S: "lbtSave" ) (AVStr.143 S: "lbtPrint" ) (Numb.144 N: 86.00000000000000 ) (Numb.145 N: 86.00000000000000 ) (Numb.146 N: 86.00000000000000 ) (CPanel.147 Child: 148 Child: 149 Child: 150 Child: 151 ResBox: 152 ResBox: 153 ResBox: 154 ResBox: 155 Listening: 1 ) (TextBox.148 InternalName: "tbxRules" ObjectTag: 33 Listening: 1 ReadOnly: 1 Constraints: 0x33 VerticalScroll: 1 NextControl: 116 ) (LButn.149 InternalName: "lbtClose" ObjectTag: 33 Label: "Close" Click: "SM.Rules.Click" ) (LButn.150 InternalName: "lbtSave" ObjectTag: 33 Label: "Save" Click: "SM.Rules.Click" ) (LButn.151 InternalName: "lbtPrint" ObjectTag: 33 Label: "Print" Click: "SM.Rules.Click" ) (RectD.152 Left: 14.00000000000000 Top: 362.00000000000000 Right: 319.00000000000000 Bottom: 9.00000000000000 ) (RectD.153 Left: 335.00000000000000 Top: 53.00000000000000 Right: 379.00000000000000 Bottom: 26.00000000000000 ) (RectD.154 Left: 335.00000000000000 Top: 89.00000000000000 Right: 379.00000000000000 Bottom: 62.00000000000000 ) (RectD.155 Left: 335.00000000000000 Top: 125.00000000000000 Right: 379.00000000000000 Bottom: 98.00000000000000 ) (Nil.156 ) (AVDLog.157 Name: "SM.GridResample" X: 73 Y: 94 W: 349 H: 383 ConstrainedControlNames: 158 ConstrainedControlNames: 159 ConstrainedControlNames: 160 Constraints: 161 Constraints: 162 Constraints: 163 Server: 52 ControlPanel: 164 ObjectTag: 33 Title: "Resample Grid" Modal: 1 AlwaysOnTop: 1 HasTitleBar: 1 Open: "SM.GridResample.Open" DefaultButton: 193 ) (AVStr.158 S: "lbtNext" ) (AVStr.159 S: "lbtCancel" ) (AVStr.160 S: "lbtHelp" ) (Numb.161 N: 85.00000000000000 ) (Numb.162 N: 85.00000000000000 ) (Numb.163 N: 85.00000000000000 ) (CPanel.164 Child: 165 Child: 184 Child: 193 Child: 194 Child: 195 ResBox: 196 ResBox: 197 ResBox: 198 ResBox: 199 ResBox: 200 Listening: 1 ) (CPanel.165 InternalName: "cpaResample" ObjectTag: 33 Child: 166 Child: 167 Child: 168 Child: 169 Child: 170 Child: 171 Child: 172 Child: 173 Child: 174 Constraints: 0x55 ResBox: 175 ResBox: 176 ResBox: 177 ResBox: 178 ResBox: 179 ResBox: 180 ResBox: 181 ResBox: 182 ResBox: 183 Label: "Resample Method" VisibleBorder: 1 Listening: 1 ) (RButn.166 InternalName: "radNN" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Nearest neighbor" Click: "SM.GridResample.Click" ) (RButn.167 InternalName: "radBilinear" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Bilinear interpolation" Click: "SM.GridResample.Click" ) (RButn.168 InternalName: "radCubic" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Cubic convolution" Click: "SM.GridResample.Click" ) (RButn.169 InternalName: "radMax" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Max" Click: "SM.GridResample.Click" ) (RButn.170 InternalName: "radMean" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Mean" Click: "SM.GridResample.Click" ) (RButn.171 InternalName: "radMedian" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Median" Click: "SM.GridResample.Click" ) (RButn.172 InternalName: "radMin" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Min" Click: "SM.GridResample.Click" ) (RButn.173 InternalName: "radSum" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Sum" Click: "SM.GridResample.Click" ) (AVCBox.174 InternalName: "chkData" ObjectTag: 33 Update: "SM.GridResample.Update" Listening: 1 Label: "Set NODATA if there are missing values" Constraints: 0x55 ) (RectD.175 Left: 8.00000000000000 Top: 46.00000000000000 Right: 142.00000000000000 Bottom: 21.00000000000000 ) (RectD.176 Left: 8.00000000000000 Top: 67.00000000000000 Right: 163.00000000000000 Bottom: 42.00000000000000 ) (RectD.177 Left: 8.00000000000000 Top: 90.00000000000000 Right: 142.00000000000000 Bottom: 65.00000000000000 ) (RectD.178 Left: 8.00000000000000 Top: 123.00000000000000 Right: 142.00000000000000 Bottom: 97.00000000000000 ) (RectD.179 Left: 8.00000000000000 Top: 144.00000000000000 Right: 142.00000000000000 Bottom: 118.00000000000000 ) (RectD.180 Left: 8.00000000000000 Top: 166.00000000000000 Right: 142.00000000000000 Bottom: 141.00000000000000 ) (RectD.181 Left: 8.00000000000000 Top: 189.00000000000000 Right: 142.00000000000000 Bottom: 164.00000000000000 ) (RectD.182 Left: 8.00000000000000 Top: 212.00000000000000 Right: 142.00000000000000 Bottom: 187.00000000000000 ) (RectD.183 Left: 8.00000000000000 Top: 235.00000000000000 Right: 297.00000000000000 Bottom: 210.00000000000000 ) (CPanel.184 InternalName: "cpaInfo" ObjectTag: 33 Child: 185 Child: 186 Child: 187 Child: 188 Constraints: 0x55 ResBox: 189 ResBox: 190 ResBox: 191 ResBox: 192 Label: "Info" VisibleBorder: 1 Listening: 1 ) (TextLabel.185 InternalName: "txtTheme" ObjectTag: 33 Constraints: 0x55 Label: "Theme:" Listening: 1 ) (TextLabel.186 InternalName: "txtField" ObjectTag: 33 Constraints: 0x55 Label: "Field:" Listening: 1 ) (TextLabel.187 InternalName: "txtCellSize" ObjectTag: 33 Constraints: 0x55 Label: "Cell size:" Listening: 1 ) (TextLabel.188 InternalName: "txtTarget" ObjectTag: 33 Constraints: 0x55 Label: "Target cell size:" Listening: 1 ) (RectD.189 Left: 14.00000000000000 Top: 39.00000000000000 Right: 226.00000000000000 Bottom: 20.00000000000000 ) (RectD.190 Left: 14.00000000000000 Top: 58.00000000000000 Right: 226.00000000000000 Bottom: 40.00000000000000 ) (RectD.191 Left: 14.00000000000000 Top: 78.00000000000000 Right: 226.00000000000000 Bottom: 59.00000000000000 ) (RectD.192 Left: 14.00000000000000 Top: 98.00000000000000 Right: 226.00000000000000 Bottom: 79.00000000000000 ) (LButn.193 InternalName: "lbtNext" ObjectTag: 33 Label: "Next" Click: "SM.GridResample.Click" ) (LButn.194 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.GridResample.Click" ) (LButn.195 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.GridResample.Click" ) (RectD.196 Left: 18.00000000000000 Top: 371.00000000000000 Right: 328.00000000000000 Bottom: 127.00000000000000 ) (RectD.197 Left: 18.00000000000000 Top: 118.00000000000000 Right: 257.00000000000000 Bottom: 12.00000000000000 ) (RectD.198 Left: 274.00000000000000 Top: 44.00000000000000 Right: 328.00000000000000 Bottom: 16.00000000000000 ) (RectD.199 Left: 274.00000000000000 Top: 83.00000000000000 Right: 328.00000000000000 Bottom: 55.00000000000000 ) (RectD.200 Left: 274.00000000000000 Top: 123.00000000000000 Right: 328.00000000000000 Bottom: 95.00000000000000 ) (AVDLog.201 Name: "SM.GridSize" X: 43 Y: 98 W: 438 H: 169 ConstrainedControlNames: 202 ConstrainedControlNames: 203 ConstrainedControlNames: 204 Constraints: 205 Constraints: 206 Constraints: 207 Server: 52 ControlPanel: 208 ObjectTag: 33 Title: "Resample" Modal: 1 AlwaysOnTop: 1 HasTitleBar: 1 Close: "SM.GridSize.Close" Open: "SM.GridSize.Open" DefaultButton: 214 ) (AVStr.202 S: "lbtOK" ) (AVStr.203 S: "lbtCancel" ) (AVStr.204 S: "lbtHelp" ) (Numb.205 N: 85.00000000000000 ) (Numb.206 N: 85.00000000000000 ) (Numb.207 N: 85.00000000000000 ) (CPanel.208 Child: 209 Child: 210 Child: 211 Child: 213 Child: 214 Child: 215 Child: 216 ResBox: 217 ResBox: 218 ResBox: 219 ResBox: 220 ResBox: 221 ResBox: 222 ResBox: 223 Listening: 1 ) (AVCBBox.209 InternalName: "cbxField" ObjectTag: 33 NextControl: 52 ContentKind: 4 Constraints: 0x55 Listening: 1 Label: "Field:" ) (AVCBBox.210 InternalName: "cbxCellSize" ObjectTag: 33 NextControl: 52 ContentKind: 4 Constraints: 0x55 Listening: 1 Label: "Cell size:" ) (TextLine.211 InternalName: "txlCellSize" ObjectTag: 33 Label: "Cell size:" Constraints: 0x55 Listening: 1 TextType: 212 NextControl: 52 ) (AVEnum.212 Name: "TEXTLINE_TYPE_ALL" ) (AVCBBox.213 InternalName: "cbxExtent" ObjectTag: 33 NextControl: 52 ContentKind: 4 Constraints: 0x55 Listening: 1 Label: "Extent:" ) (LButn.214 InternalName: "lbtOK" ObjectTag: 33 Label: "OK" Click: "SM.GridSize.Click" ) (LButn.215 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.GridSize.Click" ) (LButn.216 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.GridSize.Click" ) (RectD.217 Left: 16.00000000000000 Top: 98.00000000000000 Right: 348.00000000000000 Bottom: 20.00000000000000 ) (RectD.218 Left: 16.00000000000000 Top: 137.00000000000000 Right: 348.00000000000000 Bottom: 59.00000000000000 ) (RectD.219 Left: 58.00000000000000 Top: 114.00000000000000 Right: 204.00000000000000 Bottom: 94.00000000000000 ) (RectD.220 Left: 16.00000000000000 Top: 209.00000000000000 Right: 348.00000000000000 Bottom: 130.00000000000000 ) (RectD.221 Left: 367.00000000000000 Top: 53.00000000000000 Right: 418.00000000000000 Bottom: 25.00000000000000 ) (RectD.222 Left: 367.00000000000000 Top: 88.00000000000000 Right: 418.00000000000000 Bottom: 60.00000000000000 ) (RectD.223 Left: 367.00000000000000 Top: 124.00000000000000 Right: 418.00000000000000 Bottom: 96.00000000000000 ) (AVDLog.224 Name: "SM.IntersectThemes" X: 56 Y: 105 W: 528 H: 242 ConstrainedControlNames: 225 ConstrainedControlNames: 226 ConstrainedControlNames: 227 ConstrainedControlNames: 228 ConstrainedControlNames: 229 Constraints: 230 Constraints: 231 Constraints: 232 Constraints: 233 Constraints: 234 Server: 52 ControlPanel: 235 ObjectTag: 33 Title: "Intersect Themes" AlwaysOnTop: 1 HasTitleBar: 1 Open: "SM.IntersectThemes.Open" DefaultButton: 247 ) (AVStr.225 S: "lbtAdd" ) (AVStr.226 S: "lbtRemove" ) (AVStr.227 S: "lbtOK" ) (AVStr.228 S: "lbtCancel" ) (AVStr.229 S: "lbtHelp" ) (Numb.230 N: 85.00000000000000 ) (Numb.231 N: 85.00000000000000 ) (Numb.232 N: 85.00000000000000 ) (Numb.233 N: 85.00000000000000 ) (Numb.234 N: 85.00000000000000 ) (CPanel.235 Child: 236 Child: 237 Child: 238 Child: 239 Child: 241 Child: 243 Child: 244 Child: 245 Child: 247 Child: 248 Child: 249 ResBox: 250 ResBox: 251 ResBox: 252 ResBox: 253 ResBox: 254 ResBox: 255 ResBox: 256 ResBox: 257 ResBox: 258 ResBox: 259 ResBox: 260 Listening: 1 ) (TextLabel.236 InternalName: "txtThemes" ObjectTag: 33 Constraints: 0x55 Label: "Available themes:" Listening: 1 ) (TextLabel.237 InternalName: "txtFields" ObjectTag: 33 Constraints: 0x55 Label: "Available fields:" Listening: 1 ) (TextLabel.238 InternalName: "txtIntersect" ObjectTag: 33 Constraints: 0x55 Label: "Themes/fields to be intersected:" Listening: 1 ) (AVLBox.239 InternalName: "lbxThemes" ObjectTag: 33 NextControl: 52 ContentKind: 4 Constraints: 0x55 Listening: 1 VerticalScroll: 1 Select: "SM.IntersectThemes.Select" SelectionStyle: 240 ) (AVEnum.240 Name: "LISTBOX_SELECTION_SINGLEROW" ) (AVLBox.241 InternalName: "lbxFields" ObjectTag: 33 Update: "SM.IntersectThemes.Update" NextControl: 52 ContentKind: 4 Constraints: 0x55 Listening: 1 VerticalScroll: 1 SelectionStyle: 242 Apply: "SM.IntersectThemes.Apply" ) (AVEnum.242 Name: "LISTBOX_SELECTION_MULTIROW" ) (LButn.243 InternalName: "lbtAdd" ObjectTag: 33 Label: ">" Click: "SM.IntersectThemes.Click" ) (LButn.244 InternalName: "lbtRemove" ObjectTag: 33 Label: "<" Click: "SM.IntersectThemes.Click" ) (AVLBox.245 InternalName: "lbxIntersect" ObjectTag: 33 NextControl: 52 ContentKind: 4 Constraints: 0x55 Listening: 1 VerticalScroll: 1 SelectionStyle: 246 Apply: "SM.IntersectThemes.Apply" ) (AVEnum.246 Name: "LISTBOX_SELECTION_SINGLEROW" ) (LButn.247 InternalName: "lbtOK" ObjectTag: 33 Update: "SM.IntersectThemes.Update" Label: "OK" Click: "SM.IntersectThemes.Click" ) (LButn.248 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.IntersectThemes.Click" ) (LButn.249 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.IntersectThemes.Click" ) (RectD.250 Left: 20.00000000000000 Top: 31.00000000000000 Right: 155.00000000000000 Bottom: 14.00000000000000 ) (RectD.251 Left: 20.00000000000000 Top: 137.00000000000000 Right: 153.00000000000000 Bottom: 120.00000000000000 ) (RectD.252 Left: 231.00000000000000 Top: 28.00000000000000 Right: 447.00000000000000 Bottom: 12.00000000000000 ) (RectD.253 Left: 20.00000000000000 Top: 113.00000000000000 Right: 173.00000000000000 Bottom: 34.00000000000000 ) (RectD.254 Left: 20.00000000000000 Top: 219.00000000000000 Right: 173.00000000000000 Bottom: 140.00000000000000 ) (RectD.255 Left: 187.00000000000000 Top: 172.00000000000000 Right: 216.00000000000000 Bottom: 150.00000000000000 ) (RectD.256 Left: 187.00000000000000 Top: 206.00000000000000 Right: 216.00000000000000 Bottom: 185.00000000000000 ) (RectD.257 Left: 231.00000000000000 Top: 221.00000000000000 Right: 446.00000000000000 Bottom: 31.00000000000000 ) (RectD.258 Left: 460.00000000000000 Top: 77.00000000000000 Right: 510.00000000000000 Bottom: 50.00000000000000 ) (RectD.259 Left: 460.00000000000000 Top: 121.00000000000000 Right: 510.00000000000000 Bottom: 94.00000000000000 ) (RectD.260 Left: 460.00000000000000 Top: 164.00000000000000 Right: 510.00000000000000 Bottom: 137.00000000000000 ) (AVDLog.261 Name: "SM.Kappa" X: 111 Y: 158 W: 489 H: 279 ConstrainedControlNames: 262 ConstrainedControlNames: 263 ConstrainedControlNames: 264 ConstrainedControlNames: 265 ConstrainedControlNames: 266 ConstrainedControlNames: 267 Constraints: 268 Constraints: 269 Constraints: 270 Constraints: 271 Constraints: 272 Constraints: 273 Server: 274 ControlPanel: 275 ObjectTag: 33 Title: "Kappa" EscapeEnabled: 1 Modal: 1 AlwaysOnTop: 1 HasTitleBar: 1 Open: "SM.Kappa.Open" DefaultButton: 316 ) (AVStr.262 S: "lbtOK" ) (AVStr.263 S: "lbtCancel" ) (AVStr.264 S: "lbtHelp" ) (AVStr.265 S: "btnKappa" ) (AVStr.266 S: "btnMatrix" ) (AVStr.267 S: "btnResult" ) (Numb.268 N: 85.00000000000000 ) (Numb.269 N: 85.00000000000000 ) (Numb.270 N: 85.00000000000000 ) (Numb.271 N: 85.00000000000000 ) (Numb.272 N: 85.00000000000000 ) (Numb.273 N: 85.00000000000000 ) (Nil.274 ) (CPanel.275 Child: 276 Child: 277 Child: 278 Child: 279 Child: 280 Child: 281 Child: 282 Child: 283 Child: 284 Child: 285 Child: 286 Child: 288 Child: 290 Child: 292 Child: 294 Child: 295 Child: 297 ResBox: 299 ResBox: 300 ResBox: 301 ResBox: 302 ResBox: 303 ResBox: 304 ResBox: 305 ResBox: 306 ResBox: 307 ResBox: 308 ResBox: 309 ResBox: 310 ResBox: 311 ResBox: 312 ResBox: 313 ResBox: 314 ResBox: 315 Listening: 1 ) (AVCBBox.276 InternalName: "cbxPredTheme" ObjectTag: 33 NextControl: 274 ContentKind: 4 Constraints: 0x55 Listening: 1 Label: "Prediction theme:" Select: "SM.Kappa.Select" ) (AVCBBox.277 InternalName: "cbxPredField" ObjectTag: 33 Update: "SM.Kappa.Update" NextControl: 274 ContentKind: 4 Constraints: 0x55 Listening: 1 Label: "Field:" Select: "SM.Kappa.Select" ) (AVCBBox.278 InternalName: "cbxRefTheme" ObjectTag: 33 NextControl: 274 ContentKind: 4 Constraints: 0x55 Listening: 1 Label: "Reference theme:" Select: "SM.Kappa.Select" ) (AVCBBox.279 InternalName: "cbxRefField" ObjectTag: 33 Update: "SM.Kappa.Update" NextControl: 274 ContentKind: 4 Constraints: 0x55 Listening: 1 Label: "Field:" Select: "SM.Kappa.Select" ) (AVCBox.280 InternalName: "chkSelected" ObjectTag: 33 Listening: 1 Label: "Use only selected records in reference theme" Constraints: 0x55 ) (LButn.281 InternalName: "lbtOK" ObjectTag: 33 Update: "SM.Kappa.Update" Label: "OK" Click: "SM.Kappa.Click" ) (LButn.282 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.Kappa.Click" ) (LButn.283 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.Kappa.Click" ) (AVCBox.284 InternalName: "chkMatrix" ObjectTag: 33 Listening: 1 Label: "Save error matrix to file" Click: "SM.Kappa.Click" Constraints: 0x55 ) (AVCBox.285 InternalName: "chkKappa" ObjectTag: 33 Listening: 1 Label: "Save Kappa info to file" Click: "SM.Kappa.Click" Constraints: 0x55 ) (Butn.286 InternalName: "btnKappa" ObjectTag: 33 Update: "SM.Kappa.Update" Icon: 287 Click: "SM.Kappa.Click" ) (AVIcon.287 Name: "Open" Res: "Icons.Open" ) (TextLine.288 InternalName: "txlKappa" ObjectTag: 33 Update: "SM.Kappa.Update" Constraints: 0x55 Listening: 1 ReadOnly: 1 TextType: 289 NextControl: 274 ) (AVEnum.289 Name: "TEXTLINE_TYPE_ALL" ) (TextLine.290 InternalName: "txlMatrix" ObjectTag: 33 Update: "SM.Kappa.Update" Constraints: 0x55 Listening: 1 ReadOnly: 1 TextType: 291 NextControl: 274 ) (AVEnum.291 Name: "TEXTLINE_TYPE_ALL" ) (Butn.292 InternalName: "btnMatrix" ObjectTag: 33 Update: "SM.Kappa.Update" Icon: 293 Click: "SM.Kappa.Click" ) (AVIcon.293 Name: "Open" Res: "Icons.Open" ) (AVCBox.294 InternalName: "chkResult" ObjectTag: 33 Listening: 1 Label: "Save result shapefile" Click: "SM.Kappa.Click" Constraints: 0x55 ) (TextLine.295 InternalName: "txlResult" ObjectTag: 33 Update: "SM.Kappa.Update" Constraints: 0x55 Listening: 1 ReadOnly: 1 TextType: 296 NextControl: 274 ) (AVEnum.296 Name: "TEXTLINE_TYPE_ALL" ) (Butn.297 InternalName: "btnResult" ObjectTag: 33 Update: "SM.Kappa.Update" Icon: 298 Click: "SM.Kappa.Click" ) (AVIcon.298 Name: "Open" Res: "Icons.Open" ) (RectD.299 Left: 33.00000000000000 Top: 120.00000000000000 Right: 377.00000000000000 Bottom: 20.00000000000000 ) (RectD.300 Left: 161.00000000000000 Top: 153.00000000000000 Right: 377.00000000000000 Bottom: 53.00000000000000 ) (RectD.301 Left: 33.00000000000000 Top: 186.00000000000000 Right: 377.00000000000000 Bottom: 86.00000000000000 ) (RectD.302 Left: 161.00000000000000 Top: 218.00000000000000 Right: 377.00000000000000 Bottom: 118.00000000000000 ) (RectD.303 Left: 24.00000000000000 Top: 172.00000000000000 Right: 355.00000000000000 Bottom: 151.00000000000000 ) (RectD.304 Left: 407.00000000000000 Top: 55.00000000000000 Right: 464.00000000000000 Bottom: 28.00000000000000 ) (RectD.305 Left: 407.00000000000000 Top: 90.00000000000000 Right: 464.00000000000000 Bottom: 63.00000000000000 ) (RectD.306 Left: 407.00000000000000 Top: 124.00000000000000 Right: 464.00000000000000 Bottom: 97.00000000000000 ) (RectD.307 Left: 24.00000000000000 Top: 230.00000000000000 Right: 196.00000000000000 Bottom: 209.00000000000000 ) (RectD.308 Left: 24.00000000000000 Top: 200.00000000000000 Right: 194.00000000000000 Bottom: 180.00000000000000 ) (RectD.309 Left: 441.00000000000000 Top: 200.00000000000000 Right: 463.00000000000000 Bottom: 180.00000000000000 ) (RectD.310 Left: 191.00000000000000 Top: 200.00000000000000 Right: 426.00000000000000 Bottom: 180.00000000000000 ) (RectD.311 Left: 191.00000000000000 Top: 229.00000000000000 Right: 426.00000000000000 Bottom: 209.00000000000000 ) (RectD.312 Left: 441.00000000000000 Top: 230.00000000000000 Right: 463.00000000000000 Bottom: 209.00000000000000 ) (RectD.313 Left: 24.00000000000000 Top: 259.00000000000000 Right: 185.00000000000000 Bottom: 238.00000000000000 ) (RectD.314 Left: 191.00000000000000 Top: 258.00000000000000 Right: 426.00000000000000 Bottom: 238.00000000000000 ) (RectD.315 Left: 441.00000000000000 Top: 259.00000000000000 Right: 463.00000000000000 Bottom: 238.00000000000000 ) (Nil.316 ) (AVDLog.317 Name: "SM.Log" X: 54 Y: 74 W: 671 H: 403 ConstrainedControlNames: 318 ConstrainedControlNames: 319 ConstrainedControlNames: 320 ConstrainedControlNames: 321 ConstrainedControlNames: 322 ConstrainedControlNames: 323 ConstrainedControlNames: 324 ConstrainedControlNames: 325 ConstrainedControlNames: 326 ConstrainedControlNames: 327 Constraints: 328 Constraints: 329 Constraints: 330 Constraints: 331 Constraints: 332 Constraints: 333 Constraints: 334 Constraints: 335 Constraints: 336 Constraints: 337 Server: 52 ControlPanel: 338 ObjectTag: 33 Title: "Logistic Regression in SAS" AlwaysOnTop: 1 HasTitleBar: 1 Close: "SM.Log.Close" Open: "SM.Log.Open" DefaultButton: 411 ) (AVStr.318 S: "lbtAddVar" ) (AVStr.319 S: "lbtRemoveVar" ) (AVStr.320 S: "lbtRemoveAll" ) (AVStr.321 S: "lbtChooseInt" ) (AVStr.322 S: "lbtClass" ) (AVStr.323 S: "lbtOutput" ) (AVStr.324 S: "lbtModel" ) (AVStr.325 S: "lbtOK" ) (AVStr.326 S: "lbtCancel" ) (AVStr.327 S: "lbtHelp" ) (Numb.328 N: 85.00000000000000 ) (Numb.329 N: 85.00000000000000 ) (Numb.330 N: 85.00000000000000 ) (Numb.331 N: 85.00000000000000 ) (Numb.332 N: 85.00000000000000 ) (Numb.333 N: 85.00000000000000 ) (Numb.334 N: 85.00000000000000 ) (Numb.335 N: 85.00000000000000 ) (Numb.336 N: 85.00000000000000 ) (Numb.337 N: 85.00000000000000 ) (CPanel.338 Child: 339 Child: 373 Child: 404 Child: 411 Child: 412 Child: 413 ResBox: 414 ResBox: 415 ResBox: 416 ResBox: 417 ResBox: 418 ResBox: 419 Listening: 1 ) (CPanel.339 InternalName: "cpaIndepVars" ObjectTag: 33 Child: 340 Child: 341 Child: 343 Child: 344 Child: 346 Child: 347 Child: 348 Child: 349 Child: 350 Child: 352 Child: 355 Child: 356 Child: 357 Child: 358 Constraints: 0x55 ResBox: 359 ResBox: 360 ResBox: 361 ResBox: 362 ResBox: 363 ResBox: 364 ResBox: 365 ResBox: 366 ResBox: 367 ResBox: 368 ResBox: 369 ResBox: 370 ResBox: 371 ResBox: 372 Label: "Independent Variables" VisibleBorder: 1 Listening: 1 ) (TextLabel.340 InternalName: "txtAvailableThemes" ObjectTag: 33 Constraints: 0x55 Label: "Available themes:" Listening: 1 ) (AVLBox.341 InternalName: "lbxThemes" ObjectTag: 33 NextControl: 52 ContentKind: 4 Constraints: 0x55 ColumnCount: 1 Listening: 1 VerticalScroll: 1 Select: "SM.Log.Select" SelectionStyle: 342 ) (AVEnum.342 Name: "LISTBOX_SELECTION_SINGLECELL" ) (TextLabel.343 InternalName: "txtAvailableFields" ObjectTag: 33 Constraints: 0x55 Label: "Available fields:" Listening: 1 ) (AVLBox.344 InternalName: "lbxFields" ObjectTag: 33 Update: "SM.Log.Update" NextControl: 52 ContentKind: 4 Constraints: 0x55 ColumnCount: 1 Listening: 1 VerticalScroll: 1 SelectionStyle: 345 Apply: "SM.Log.Apply" ) (AVEnum.345 Name: "LISTBOX_SELECTION_MULTIROW" ) (LButn.346 InternalName: "lbtAddVar" ObjectTag: 33 Label: ">" Click: "SM.Log.Click" ) (LButn.347 InternalName: "lbtRemoveVar" ObjectTag: 33 Label: "<" Click: "SM.Log.Click" ) (LButn.348 InternalName: "lbtRemoveAll" ObjectTag: 33 Label: "<<" Click: "SM.Log.Click" ) (TextLabel.349 InternalName: "txtIndependentVariables" ObjectTag: 33 Constraints: 0x55 Label: "Independent variables:" Listening: 1 ) (AVLBox.350 InternalName: "lbxIndepVars" ObjectTag: 33 NextControl: 52 ContentKind: 4 Constraints: 0x55 ColumnCount: 1 HorizontalScroll: 1 Listening: 1 VerticalScroll: 1 SelectionStyle: 351 Apply: "SM.Log.Apply" ) (AVEnum.351 Name: "LISTBOX_SELECTION_MULTIROW" ) (CPanel.352 InternalName: "cpaInt" ObjectTag: 33 Child: 353 Constraints: 0x55 ResBox: 354 Listening: 1 ) (LButn.353 InternalName: "lbtChooseInt" ObjectTag: 33 Update: "SM.Log.Update" Label: "Choose..." Click: "SM.Log.Click" ) (RectD.354 Left: 151.00000000000000 Top: 76.00000000000000 Right: 216.00000000000000 Bottom: 52.00000000000000 ) (RButn.355 InternalName: "radNoInt" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "No interactions" Click: "SM.Log.Click" ) (RButn.356 InternalName: "radAllInt" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "All two-way interactions" Click: "SM.Log.Click" ) (RButn.357 InternalName: "radChooseInt" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Choose interactions" Click: "SM.Log.Click" ) (LButn.358 InternalName: "lbtClass" ObjectTag: 33 Label: "Classes" Click: "SM.Log.Click" ) (RectD.359 Left: 13.00000000000000 Top: 49.00000000000000 Right: 147.00000000000000 Bottom: 29.00000000000000 ) (RectD.360 Left: 13.00000000000000 Top: 115.00000000000000 Right: 214.00000000000000 Bottom: 49.00000000000000 ) (RectD.361 Left: 13.00000000000000 Top: 146.00000000000000 Right: 147.00000000000000 Bottom: 126.00000000000000 ) (RectD.362 Left: 13.00000000000000 Top: 264.00000000000000 Right: 214.00000000000000 Bottom: 146.00000000000000 ) (RectD.363 Left: 228.00000000000000 Top: 179.00000000000000 Right: 256.00000000000000 Bottom: 154.00000000000000 ) (RectD.364 Left: 228.00000000000000 Top: 216.00000000000000 Right: 256.00000000000000 Bottom: 191.00000000000000 ) (RectD.365 Left: 228.00000000000000 Top: 252.00000000000000 Right: 256.00000000000000 Bottom: 227.00000000000000 ) (RectD.366 Left: 272.00000000000000 Top: 146.00000000000000 Right: 423.00000000000000 Bottom: 126.00000000000000 ) (RectD.367 Left: 272.00000000000000 Top: 265.00000000000000 Right: 478.00000000000000 Bottom: 147.00000000000000 ) (RectD.368 Left: 245.00000000000000 Top: 93.00000000000000 Right: 480.00000000000000 Bottom: 14.00000000000000 ) (RectD.369 Left: 244.00000000000000 Top: 40.00000000000000 Right: 378.00000000000000 Bottom: 18.00000000000000 ) (RectD.370 Left: 244.00000000000000 Top: 63.00000000000000 Right: 430.00000000000000 Bottom: 41.00000000000000 ) (RectD.371 Left: 244.00000000000000 Top: 87.00000000000000 Right: 394.00000000000000 Bottom: 65.00000000000000 ) (RectD.372 Left: 250.00000000000000 Top: 120.00000000000000 Right: 306.00000000000000 Bottom: 96.00000000000000 ) (CPanel.373 InternalName: "cpaDepVars" ObjectTag: 33 Update: "SM.Log.Update" Child: 374 Child: 375 Child: 376 Child: 377 Child: 378 Child: 379 Child: 380 Child: 381 Child: 382 Child: 383 Constraints: 0x55 ResBox: 394 ResBox: 395 ResBox: 396 ResBox: 397 ResBox: 398 ResBox: 399 ResBox: 400 ResBox: 401 ResBox: 402 ResBox: 403 Label: "Dependent Variable" VisibleBorder: 1 Listening: 1 ) (RButn.374 InternalName: "radSingleTrial" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Single-trial syntax" Click: "SM.Log.Click" ) (RButn.375 InternalName: "radEventsTrials" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Event/trial syntax" Click: "SM.Log.Click" ) (AVCBox.376 InternalName: "chkSelRecords" ObjectTag: 33 Listening: 1 Label: "Use selected records only" Click: "SM.Log.Click" Constraints: 0x55 ) (TextLabel.377 InternalName: "txtDepTheme" ObjectTag: 33 Constraints: 0x55 Label: "Theme:" Listening: 1 ) (AVCBBox.378 InternalName: "cbxDepTheme" ObjectTag: 33 NextControl: 52 ContentKind: 4 Constraints: 0x55 Listening: 1 Select: "SM.Log.Select" ) (TextLabel.379 InternalName: "txtResponse" ObjectTag: 33 Update: "SM.Log.Update" Constraints: 0x55 Label: "Response:" Listening: 1 ) (AVCBBox.380 InternalName: "cbxResponse" ObjectTag: 33 NextControl: 52 ContentKind: 4 Constraints: 0x55 Listening: 1 Select: "SM.Log.Select" ) (TextLabel.381 InternalName: "txtTrials" ObjectTag: 33 Constraints: 0x55 Label: "Trials:" Listening: 1 ) (AVCBBox.382 InternalName: "cbxTrials" ObjectTag: 33 Update: "SM.Log.Update" NextControl: 52 ContentKind: 4 Constraints: 0x55 Listening: 1 Select: "SM.Log.Select" ) (CPanel.383 InternalName: "cpaLevels" ObjectTag: 33 Update: "SM.Log.Update" Child: 384 Child: 385 Child: 386 Child: 387 Child: 388 Constraints: 0x55 ResBox: 389 ResBox: 390 ResBox: 391 ResBox: 392 ResBox: 393 Listening: 1 ) (TextLabel.384 InternalName: "txtResponseLevels" ObjectTag: 33 Constraints: 0x55 Label: "Response levels:" Listening: 1 ) (TextLabel.385 InternalName: "txtData" ObjectTag: 33 Constraints: 0x55 Label: "Data go here" Listening: 1 ) (TextLabel.386 InternalName: "txtLevel" ObjectTag: 33 Constraints: 0x55 Label: "Model occurrence of:" Listening: 1 ) (RButn.387 InternalName: "radLowValue" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Low" ) (RButn.388 InternalName: "radHighValue" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "High" ) (RectD.389 Left: 5.00000000000000 Top: 28.00000000000000 Right: 122.00000000000000 Bottom: 10.00000000000000 ) (RectD.390 Left: 5.00000000000000 Top: 50.00000000000000 Right: 119.00000000000000 Bottom: 28.00000000000000 ) (RectD.391 Left: 5.00000000000000 Top: 69.00000000000000 Right: 138.00000000000000 Bottom: 52.00000000000000 ) (RectD.392 Left: 5.00000000000000 Top: 92.00000000000000 Right: 61.00000000000000 Bottom: 70.00000000000000 ) (RectD.393 Left: 72.00000000000000 Top: 92.00000000000000 Right: 129.00000000000000 Bottom: 70.00000000000000 ) (RectD.394 Left: 17.00000000000000 Top: 45.00000000000000 Right: 169.00000000000000 Bottom: 18.00000000000000 ) (RectD.395 Left: 17.00000000000000 Top: 71.00000000000000 Right: 166.00000000000000 Bottom: 43.00000000000000 ) (RectD.396 Left: 18.00000000000000 Top: 95.00000000000000 Right: 210.00000000000000 Bottom: 68.00000000000000 ) (RectD.397 Left: 228.00000000000000 Top: 41.00000000000000 Right: 276.00000000000000 Bottom: 21.00000000000000 ) (RectD.398 Left: 298.00000000000000 Top: 118.00000000000000 Right: 478.00000000000000 Bottom: 20.00000000000000 ) (RectD.399 Left: 228.00000000000000 Top: 68.00000000000000 Right: 300.00000000000000 Bottom: 48.00000000000000 ) (RectD.400 Left: 298.00000000000000 Top: 145.00000000000000 Right: 478.00000000000000 Bottom: 47.00000000000000 ) (RectD.401 Left: 228.00000000000000 Top: 93.00000000000000 Right: 268.00000000000000 Bottom: 73.00000000000000 ) (RectD.402 Left: 298.00000000000000 Top: 171.00000000000000 Right: 478.00000000000000 Bottom: 73.00000000000000 ) (RectD.403 Left: 494.00000000000000 Top: 99.00000000000000 Right: 634.00000000000000 Bottom: 6.00000000000000 ) (CPanel.404 InternalName: "cpaOptions" ObjectTag: 33 Child: 405 Child: 406 Child: 407 Constraints: 0x55 ResBox: 408 ResBox: 409 ResBox: 410 Label: "Options" VisibleBorder: 1 Listening: 1 ) (LButn.405 InternalName: "lbtOutput" ObjectTag: 33 Label: "Output..." Click: "SM.Log.Click" ) (LButn.406 InternalName: "lbtModel" ObjectTag: 33 Label: "Model..." Click: "SM.Log.Click" ) (AVCBox.407 InternalName: "chkTable" ObjectTag: 33 Listening: 1 Label: "Make a table\nof sample data" Constraints: 0x55 ) (RectD.408 Left: 42.00000000000000 Top: 54.00000000000000 Right: 98.00000000000000 Bottom: 23.00000000000000 ) (RectD.409 Left: 42.00000000000000 Top: 91.00000000000000 Right: 98.00000000000000 Bottom: 59.00000000000000 ) (RectD.410 Left: 9.00000000000000 Top: 141.00000000000000 Right: 134.00000000000000 Bottom: 95.00000000000000 ) (LButn.411 InternalName: "lbtOK" ObjectTag: 33 Update: "SM.Log.Update" Label: "OK" Click: "SM.Log.Click" ) (LButn.412 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.Log.Click" ) (LButn.413 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.Log.Click" ) (RectD.414 Left: 14.00000000000000 Top: 285.00000000000000 Right: 505.00000000000000 Bottom: 9.00000000000000 ) (RectD.415 Left: 15.00000000000000 Top: 391.00000000000000 Right: 656.00000000000000 Bottom: 288.00000000000000 ) (RectD.416 Left: 518.00000000000000 Top: 285.00000000000000 Right: 656.00000000000000 Bottom: 140.00000000000000 ) (RectD.417 Left: 558.00000000000000 Top: 54.00000000000000 Right: 614.00000000000000 Bottom: 23.00000000000000 ) (RectD.418 Left: 558.00000000000000 Top: 92.00000000000000 Right: 614.00000000000000 Bottom: 62.00000000000000 ) (RectD.419 Left: 558.00000000000000 Top: 131.00000000000000 Right: 614.00000000000000 Bottom: 100.00000000000000 ) (AVDLog.420 Name: "SM.LogClass" X: 59 Y: 97 W: 322 H: 142 ConstrainedControlNames: 421 ConstrainedControlNames: 422 Constraints: 423 Constraints: 424 Server: 52 ControlPanel: 425 ObjectTag: 33 Title: "Classes" Resizable: 1 AlwaysOnTop: 1 HasTitleBar: 1 Close: "SM.LogClass.Close" Open: "SM.LogClass.Open" DefaultButton: 428 ) (AVStr.421 S: "lbtOK" ) (AVStr.422 S: "lbtCancel" ) (Numb.423 N: 86.00000000000000 ) (Numb.424 N: 86.00000000000000 ) (CPanel.425 Child: 426 Child: 428 Child: 429 Child: 430 ResBox: 431 ResBox: 432 ResBox: 433 ResBox: 434 Listening: 1 ) (AVLBox.426 InternalName: "lbxClass" ObjectTag: 33 Update: "SM.LogClass.Update" NextControl: 52 ContentKind: 4 Constraints: 0x33 ColumnCount: 1 Listening: 1 VerticalScroll: 1 SelectionStyle: 427 Apply: "SM.LogClass.Apply" ) (AVEnum.427 Name: "LISTBOX_SELECTION_SINGLEROW" ) (LButn.428 InternalName: "lbtOK" ObjectTag: 33 Label: "OK" Click: "SM.LogClass.Click" ) (LButn.429 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.LogClass.Click" ) (TextLabel.430 InternalName: "txlClass" ObjectTag: 33 Constraints: 0x55 Label: "Double-click to use as a class:" Listening: 1 ) (RectD.431 Left: 12.00000000000000 Top: 136.00000000000000 Right: 247.00000000000000 Bottom: 34.00000000000000 ) (RectD.432 Left: 258.00000000000000 Top: 73.00000000000000 Right: 313.00000000000000 Bottom: 46.00000000000000 ) (RectD.433 Left: 258.00000000000000 Top: 109.00000000000000 Right: 313.00000000000000 Bottom: 81.00000000000000 ) (RectD.434 Left: 12.00000000000000 Top: 29.00000000000000 Right: 216.00000000000000 Bottom: 11.00000000000000 ) (AVDLog.435 Name: "SM.LogEncode" X: 49 Y: 91 W: 399 H: 190 ConstrainedControlNames: 436 ConstrainedControlNames: 437 ConstrainedControlNames: 438 Constraints: 439 Constraints: 440 Constraints: 441 Server: 52 ControlPanel: 442 ObjectTag: 33 Title: "Class Encoding" EscapeEnabled: 1 Modal: 1 AlwaysOnTop: 1 HasTitleBar: 1 Open: "SM.LogEncode.Open" DefaultButton: 452 ) (AVStr.436 S: "lbtNext" ) (AVStr.437 S: "lbtCancel" ) (AVStr.438 S: "lbtHelp" ) (Numb.439 N: 85.00000000000000 ) (Numb.440 N: 85.00000000000000 ) (Numb.441 N: 85.00000000000000 ) (CPanel.442 Child: 443 Child: 444 Child: 445 Child: 446 Child: 447 Child: 448 Child: 449 Child: 451 Child: 452 Child: 453 Child: 454 ResBox: 455 ResBox: 456 ResBox: 457 ResBox: 458 ResBox: 459 ResBox: 460 ResBox: 461 ResBox: 462 ResBox: 463 ResBox: 464 ResBox: 465 Listening: 1 ) (TextLabel.443 InternalName: "txtTheme" ObjectTag: 33 Constraints: 0x55 Label: "Theme:" Listening: 1 ) (TextLabel.444 InternalName: "txtField" ObjectTag: 33 Constraints: 0x55 Label: "Field" Listening: 1 ) (RButn.445 InternalName: "radEffect" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Effect" Click: "SM.LogEncode.Click" ) (RButn.446 InternalName: "radGLM" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "GLM" Click: "SM.LogEncode.Click" ) (RButn.447 InternalName: "radRef" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Reference" Click: "SM.LogEncode.Click" ) (RButn.448 InternalName: "radPoly" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Polynomial" Click: "SM.LogEncode.Click" ) (AVLBox.449 InternalName: "lbxRef" ObjectTag: 33 Update: "SM.LogEncode.Update" NextControl: 52 ContentKind: 4 Constraints: 0x55 ColumnCount: 1 Listening: 1 VerticalScroll: 1 SelectionStyle: 450 ) (AVEnum.450 Name: "LISTBOX_SELECTION_SINGLECELL" ) (TextLabel.451 InternalName: "txtRef" ObjectTag: 33 Update: "SM.LogEncode.Update" Constraints: 0x55 Label: "Choose a reference level:" Listening: 1 ) (LButn.452 InternalName: "lbtNext" ObjectTag: 33 Label: "Next" Click: "SM.LogEncode.Click" ) (LButn.453 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.LogEncode.Click" ) (LButn.454 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.LogEncode.Click" ) (RectD.455 Left: 18.00000000000000 Top: 37.00000000000000 Right: 302.00000000000000 Bottom: 15.00000000000000 ) (RectD.456 Left: 18.00000000000000 Top: 63.00000000000000 Right: 302.00000000000000 Bottom: 41.00000000000000 ) (RectD.457 Left: 18.00000000000000 Top: 88.00000000000000 Right: 102.00000000000000 Bottom: 67.00000000000000 ) (RectD.458 Left: 18.00000000000000 Top: 114.00000000000000 Right: 102.00000000000000 Bottom: 92.00000000000000 ) (RectD.459 Left: 18.00000000000000 Top: 140.00000000000000 Right: 122.00000000000000 Bottom: 118.00000000000000 ) (RectD.460 Left: 18.00000000000000 Top: 166.00000000000000 Right: 122.00000000000000 Bottom: 144.00000000000000 ) (RectD.461 Left: 134.00000000000000 Top: 175.00000000000000 Right: 308.00000000000000 Bottom: 87.00000000000000 ) (RectD.462 Left: 134.00000000000000 Top: 85.00000000000000 Right: 307.00000000000000 Bottom: 65.00000000000000 ) (RectD.463 Left: 330.00000000000000 Top: 51.00000000000000 Right: 385.00000000000000 Bottom: 24.00000000000000 ) (RectD.464 Left: 330.00000000000000 Top: 90.00000000000000 Right: 385.00000000000000 Bottom: 63.00000000000000 ) (RectD.465 Left: 330.00000000000000 Top: 129.00000000000000 Right: 385.00000000000000 Bottom: 101.00000000000000 ) (AVDLog.466 Name: "SM.LogInteract" X: 53 Y: 97 W: 449 H: 166 ConstrainedControlNames: 467 ConstrainedControlNames: 468 Constraints: 469 Constraints: 470 Server: 52 ControlPanel: 471 ObjectTag: 33 Title: "Interactions" Resizable: 1 AlwaysOnTop: 1 HasTitleBar: 1 Close: "SM.LogInteract.Close" Open: "SM.LogInteract.Open" DefaultButton: 475 ) (AVStr.467 S: "lbtOK" ) (AVStr.468 S: "lbtCancel" ) (Numb.469 N: 86.00000000000000 ) (Numb.470 N: 86.00000000000000 ) (CPanel.471 Child: 472 Child: 474 Child: 475 Child: 476 ResBox: 477 ResBox: 478 ResBox: 479 ResBox: 480 Listening: 1 ) (AVLBox.472 InternalName: "lbxInt" ObjectTag: 33 Update: "SM.LogInteract.Update" NextControl: 52 ContentKind: 4 Constraints: 0x33 Listening: 1 VerticalScroll: 1 SelectionStyle: 473 Apply: "SM.LogInteract.Apply" ) (AVEnum.473 Name: "LISTBOX_SELECTION_SINGLEROW" ) (TextLabel.474 InternalName: "txtInteractions" ObjectTag: 33 Constraints: 0x55 Label: "Double-click to include/exclude:" Listening: 1 ) (LButn.475 InternalName: "lbtOK" ObjectTag: 33 Label: "OK" Click: "SM.LogInteract.Click" ) (LButn.476 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.LogInteract.Click" ) (RectD.477 Left: 15.00000000000000 Top: 151.00000000000000 Right: 355.00000000000000 Bottom: 35.00000000000000 ) (RectD.478 Left: 16.00000000000000 Top: 29.00000000000000 Right: 234.00000000000000 Bottom: 11.00000000000000 ) (RectD.479 Left: 369.00000000000000 Top: 73.00000000000000 Right: 429.00000000000000 Bottom: 45.00000000000000 ) (RectD.480 Left: 369.00000000000000 Top: 113.00000000000000 Right: 429.00000000000000 Bottom: 83.00000000000000 ) (AVDLog.481 Name: "SM.LogModel" X: 83 Y: 100 W: 713 H: 503 ConstrainedControlNames: 482 ConstrainedControlNames: 483 ConstrainedControlNames: 484 ConstrainedControlNames: 485 ConstrainedControlNames: 486 Constraints: 487 Constraints: 488 Constraints: 489 Constraints: 490 Constraints: 491 Server: 52 ControlPanel: 492 ObjectTag: 33 Title: "Model Options" AlwaysOnTop: 1 HasTitleBar: 1 Close: "SM.LogModel.Close" Open: "SM.LogModel.Open" DefaultButton: 557 ) (AVStr.482 S: "lbtAdd" ) (AVStr.483 S: "lbtRemove" ) (AVStr.484 S: "lbtOK" ) (AVStr.485 S: "lbtCancel" ) (AVStr.486 S: "lbtHelp" ) (Numb.487 N: 85.00000000000000 ) (Numb.488 N: 85.00000000000000 ) (Numb.489 N: 85.00000000000000 ) (Numb.490 N: 85.00000000000000 ) (Numb.491 N: 85.00000000000000 ) (CPanel.492 Child: 493 Child: 540 Child: 557 Child: 558 Child: 559 ResBox: 560 ResBox: 561 ResBox: 562 ResBox: 563 ResBox: 564 Listening: 1 ) (CPanel.493 InternalName: "cpaModel" ObjectTag: 33 Child: 494 Child: 495 Child: 496 Child: 497 Child: 498 Child: 499 Child: 500 Constraints: 0x55 ResBox: 533 ResBox: 534 ResBox: 535 ResBox: 536 ResBox: 537 ResBox: 538 ResBox: 539 Label: "Model Parameters" VisibleBorder: 1 Listening: 1 ) (TextLabel.494 InternalName: "txtMethod" ObjectTag: 33 Constraints: 0x55 Label: "Selection method:" Listening: 1 ) (RButn.495 InternalName: "radNone" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "None" Click: "SM.LogModel.Click" ) (RButn.496 InternalName: "radBackward" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Backward" Click: "SM.LogModel.Click" ) (RButn.497 InternalName: "radForward" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Forward" Click: "SM.LogModel.Click" ) (RButn.498 InternalName: "radStepwise" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Stepwise" Click: "SM.LogModel.Click" ) (AVCBox.499 InternalName: "chkDefault" ObjectTag: 33 Listening: 1 Selected: 1 Label: "Use default parameters" Click: "SM.LogModel.Click" Constraints: 0x55 ) (CPanel.500 InternalName: "cpaDefault" Disabled: 1 ObjectTag: 33 Update: "SM.LogModel.Update" Child: 501 Child: 502 Child: 504 Child: 505 Child: 507 Child: 508 Child: 510 Child: 511 Child: 513 Child: 514 Child: 516 Child: 517 Child: 519 Constraints: 0x55 ResBox: 520 ResBox: 521 ResBox: 522 ResBox: 523 ResBox: 524 ResBox: 525 ResBox: 526 ResBox: 527 ResBox: 528 ResBox: 529 ResBox: 530 ResBox: 531 ResBox: 532 Label: "Parameters (any left blank will use default values):" VisibleBorder: 1 Listening: 1 ) (TextLabel.501 InternalName: "txtBackStop" ObjectTag: 33 Constraints: 0x55 Label: "Minimum number of variables in the final model:" Listening: 1 ) (TextLine.502 InternalName: "txlBackStop" ObjectTag: 33 Text: "0" Constraints: 0x55 Listening: 1 TextType: 503 NextControl: 52 ) (AVEnum.503 Name: "TEXTLINE_TYPE_INTEGER" ) (TextLabel.504 InternalName: "txtForStop" ObjectTag: 33 Constraints: 0x55 Label: "Maximum number of variables in the final model:" Listening: 1 ) (TextLine.505 InternalName: "txlForStop" ObjectTag: 33 Constraints: 0x55 Listening: 1 TextType: 506 NextControl: 52 ) (AVEnum.506 Name: "TEXTLINE_TYPE_INTEGER" ) (TextLabel.507 InternalName: "txtMaxSteps" ObjectTag: 33 Constraints: 0x55 Label: "Maximum number of times a variable can be added or removed:" Listening: 1 ) (TextLine.508 InternalName: "txlMaxSteps" ObjectTag: 33 Constraints: 0x55 Listening: 1 TextType: 509 NextControl: 52 ) (AVEnum.509 Name: "TEXTLINE_TYPE_INTEGER" ) (TextLabel.510 InternalName: "txtSLEntry" ObjectTag: 33 Constraints: 0x55 Label: "Significance level for adding variables:" Listening: 1 ) (TextLine.511 InternalName: "txlSLEntry" ObjectTag: 33 Text: "0.05" Constraints: 0x55 Listening: 1 TextType: 512 NextControl: 52 ) (AVEnum.512 Name: "TEXTLINE_TYPE_REAL" ) (TextLabel.513 InternalName: "txtSLStay" ObjectTag: 33 Constraints: 0x55 Label: "Significance level for removing variables:" Listening: 1 ) (TextLine.514 InternalName: "txlSLStay" ObjectTag: 33 Text: "0.05" Constraints: 0x55 Listening: 1 TextType: 515 NextControl: 52 ) (AVEnum.515 Name: "TEXTLINE_TYPE_REAL" ) (TextLabel.516 InternalName: "txtMaxIter" ObjectTag: 33 Constraints: 0x55 Label: "Maximum number of iterations:" Listening: 1 ) (TextLine.517 InternalName: "txlMaxIter" ObjectTag: 33 Text: "25" Constraints: 0x55 Listening: 1 TextType: 518 NextControl: 52 ) (AVEnum.518 Name: "TEXTLINE_TYPE_INTEGER" ) (AVCBox.519 InternalName: "chkNoInt" ObjectTag: 33 Listening: 1 Label: "No intercept" Constraints: 0x55 ) (RectD.520 Left: 11.00000000000000 Top: 40.00000000000000 Right: 322.00000000000000 Bottom: 24.00000000000000 ) (RectD.521 Left: 314.00000000000000 Top: 42.00000000000000 Right: 361.00000000000000 Bottom: 22.00000000000000 ) (RectD.522 Left: 11.00000000000000 Top: 65.00000000000000 Right: 321.00000000000000 Bottom: 49.00000000000000 ) (RectD.523 Left: 318.00000000000000 Top: 66.00000000000000 Right: 364.00000000000000 Bottom: 46.00000000000000 ) (RectD.524 Left: 11.00000000000000 Top: 90.00000000000000 Right: 424.00000000000000 Bottom: 74.00000000000000 ) (RectD.525 Left: 418.00000000000000 Top: 91.00000000000000 Right: 465.00000000000000 Bottom: 71.00000000000000 ) (RectD.526 Left: 11.00000000000000 Top: 123.00000000000000 Right: 256.00000000000000 Bottom: 100.00000000000000 ) (RectD.527 Left: 254.00000000000000 Top: 118.00000000000000 Right: 301.00000000000000 Bottom: 98.00000000000000 ) (RectD.528 Left: 11.00000000000000 Top: 146.00000000000000 Right: 269.00000000000000 Bottom: 125.00000000000000 ) (RectD.529 Left: 269.00000000000000 Top: 143.00000000000000 Right: 316.00000000000000 Bottom: 123.00000000000000 ) (RectD.530 Left: 11.00000000000000 Top: 166.00000000000000 Right: 211.00000000000000 Bottom: 150.00000000000000 ) (RectD.531 Left: 209.00000000000000 Top: 168.00000000000000 Right: 256.00000000000000 Bottom: 148.00000000000000 ) (RectD.532 Left: 9.00000000000000 Top: 193.00000000000000 Right: 117.00000000000000 Bottom: 172.00000000000000 ) (RectD.533 Left: 11.00000000000000 Top: 62.00000000000000 Right: 129.00000000000000 Bottom: 45.00000000000000 ) (RectD.534 Left: 18.00000000000000 Top: 85.00000000000000 Right: 97.00000000000000 Bottom: 67.00000000000000 ) (RectD.535 Left: 18.00000000000000 Top: 106.00000000000000 Right: 110.00000000000000 Bottom: 87.00000000000000 ) (RectD.536 Left: 18.00000000000000 Top: 127.00000000000000 Right: 97.00000000000000 Bottom: 108.00000000000000 ) (RectD.537 Left: 18.00000000000000 Top: 152.00000000000000 Right: 97.00000000000000 Bottom: 129.00000000000000 ) (RectD.538 Left: 133.00000000000000 Top: 49.00000000000000 Right: 324.00000000000000 Bottom: 25.00000000000000 ) (RectD.539 Left: 132.00000000000000 Top: 250.00000000000000 Right: 608.00000000000000 Bottom: 47.00000000000000 ) (CPanel.540 InternalName: "cpaVars" ObjectTag: 33 Update: "SM.LogModel.Update" Child: 541 Child: 542 Child: 543 Child: 545 Child: 546 Child: 547 Child: 548 Constraints: 0x55 ResBox: 550 ResBox: 551 ResBox: 552 ResBox: 553 ResBox: 554 ResBox: 555 ResBox: 556 Label: "Variables" VisibleBorder: 1 Listening: 1 ) (TextLabel.541 InternalName: "txtChoose" ObjectTag: 33 Constraints: 0x55 Label: "Choose any variables that must be included in the final model:" Listening: 1 ) (TextLabel.542 InternalName: "txtIndepVars" ObjectTag: 33 Constraints: 0x55 Label: "Independent variables:" Listening: 1 ) (AVLBox.543 InternalName: "lbxIndepVars" ObjectTag: 33 NextControl: 52 ContentKind: 4 Constraints: 0x55 ColumnCount: 1 HorizontalScroll: 1 Listening: 1 VerticalScroll: 1 SelectionStyle: 544 Apply: "SM.LogModel.Apply" ) (AVEnum.544 Name: "LISTBOX_SELECTION_MULTIROW" ) (LButn.545 InternalName: "lbtAdd" ObjectTag: 33 Label: "Add" Click: "SM.LogModel.Click" ) (LButn.546 InternalName: "lbtRemove" ObjectTag: 33 Label: "Remove" Click: "SM.LogModel.Click" ) (TextLabel.547 InternalName: "txtIncludeVariables" ObjectTag: 33 Constraints: 0x55 Label: "MUST be in model:" Listening: 1 ) (AVLBox.548 InternalName: "lbxIncludeVars" ObjectTag: 33 Update: "SM.LogModel.Update" NextControl: 52 ContentKind: 4 Constraints: 0x55 ColumnCount: 1 HorizontalScroll: 1 Listening: 1 VerticalScroll: 1 SelectionStyle: 549 Apply: "SM.LogModel.Apply" ) (AVEnum.549 Name: "LISTBOX_SELECTION_MULTIROW" ) (RectD.550 Left: 10.00000000000000 Top: 47.00000000000000 Right: 422.00000000000000 Bottom: 23.00000000000000 ) (RectD.551 Left: 13.00000000000000 Top: 73.00000000000000 Right: 172.00000000000000 Bottom: 53.00000000000000 ) (RectD.552 Left: 13.00000000000000 Top: 198.00000000000000 Right: 260.00000000000000 Bottom: 74.00000000000000 ) (RectD.553 Left: 280.00000000000000 Top: 121.00000000000000 Right: 341.00000000000000 Bottom: 96.00000000000000 ) (RectD.554 Left: 280.00000000000000 Top: 167.00000000000000 Right: 341.00000000000000 Bottom: 142.00000000000000 ) (RectD.555 Left: 359.00000000000000 Top: 74.00000000000000 Right: 488.00000000000000 Bottom: 53.00000000000000 ) (RectD.556 Left: 359.00000000000000 Top: 198.00000000000000 Right: 606.00000000000000 Bottom: 74.00000000000000 ) (LButn.557 InternalName: "lbtOK" ObjectTag: 33 Label: "OK" Click: "SM.LogModel.Click" ) (LButn.558 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.LogModel.Click" ) (LButn.559 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.LogModel.Click" ) (RectD.560 Left: 19.00000000000000 Top: 264.00000000000000 Right: 638.00000000000000 Bottom: 1.00000000000000 ) (RectD.561 Left: 19.00000000000000 Top: 487.00000000000000 Right: 638.00000000000000 Bottom: 269.00000000000000 ) (RectD.562 Left: 648.00000000000000 Top: 81.00000000000000 Right: 701.00000000000000 Bottom: 53.00000000000000 ) (RectD.563 Left: 648.00000000000000 Top: 123.00000000000000 Right: 701.00000000000000 Bottom: 95.00000000000000 ) (RectD.564 Left: 648.00000000000000 Top: 167.00000000000000 Right: 701.00000000000000 Bottom: 139.00000000000000 ) (AVDLog.565 Name: "SM.LogOutput" X: 69 Y: 107 W: 478 H: 297 ConstrainedControlNames: 566 ConstrainedControlNames: 567 ConstrainedControlNames: 568 Constraints: 569 Constraints: 570 Constraints: 571 Server: 52 ControlPanel: 572 ObjectTag: 33 Title: "Printed Output" AlwaysOnTop: 1 HasTitleBar: 1 Close: "SM.LogOutput.Close" Open: "SM.LogOutput.Open" DefaultButton: 597 ) (AVStr.566 S: "lbtOK" ) (AVStr.567 S: "lbtCancel" ) (AVStr.568 S: "lbtHelp" ) (Numb.569 N: 85.00000000000000 ) (Numb.570 N: 85.00000000000000 ) (Numb.571 N: 85.00000000000000 ) (CPanel.572 Child: 573 Child: 584 Child: 592 Child: 597 Child: 598 Child: 599 ResBox: 600 ResBox: 601 ResBox: 602 ResBox: 603 ResBox: 604 ResBox: 605 Listening: 1 ) (CPanel.573 InternalName: "cpaGeneral" ObjectTag: 33 Child: 574 Child: 575 Child: 576 Child: 577 Child: 578 Constraints: 0x55 ResBox: 579 ResBox: 580 ResBox: 581 ResBox: 582 ResBox: 583 Label: "General" VisibleBorder: 1 Listening: 1 ) (AVCBox.574 InternalName: "chkSimple" ObjectTag: 33 Listening: 1 Label: "Simple descriptive statistics" Constraints: 0x55 ) (AVCBox.575 InternalName: "chkDetails" ObjectTag: 33 Listening: 1 Label: "Detailed results from each step" Constraints: 0x55 ) (AVCBox.576 InternalName: "chkRSquare" ObjectTag: 33 Listening: 1 Label: "R-square" Constraints: 0x55 ) (AVCBox.577 InternalName: "chkCorrb" ObjectTag: 33 Listening: 1 Label: "Correlation matrix" Constraints: 0x55 ) (AVCBox.578 InternalName: "chkCovb" ObjectTag: 33 Listening: 1 Label: "Covariance matrix" Constraints: 0x55 ) (RectD.579 Left: 9.00000000000000 Top: 48.00000000000000 Right: 219.00000000000000 Bottom: 25.00000000000000 ) (RectD.580 Left: 9.00000000000000 Top: 75.00000000000000 Right: 240.00000000000000 Bottom: 52.00000000000000 ) (RectD.581 Left: 9.00000000000000 Top: 101.00000000000000 Right: 193.00000000000000 Bottom: 78.00000000000000 ) (RectD.582 Left: 9.00000000000000 Top: 128.00000000000000 Right: 193.00000000000000 Bottom: 105.00000000000000 ) (RectD.583 Left: 9.00000000000000 Top: 154.00000000000000 Right: 193.00000000000000 Bottom: 131.00000000000000 ) (CPanel.584 InternalName: "cpaConfidenceIntervals" ObjectTag: 33 Child: 585 Child: 586 Child: 587 Constraints: 0x55 ResBox: 589 ResBox: 590 ResBox: 591 Label: "Confidence Intervals" VisibleBorder: 1 Listening: 1 ) (AVCBox.585 InternalName: "chkCLParm" ObjectTag: 33 Listening: 1 Label: "Confidence intervals for parameters" Click: "SM.LogOutput.Click" Constraints: 0x55 ) (AVCBox.586 InternalName: "chkCLOdds" ObjectTag: 33 Listening: 1 Label: "Confidence intervals for odds ratios" Click: "SM.LogOutput.Click" Constraints: 0x55 ) (TextLine.587 InternalName: "txlAlpha" Disabled: 1 ObjectTag: 33 Update: "SM.LogOutput.Update" Text: "0.05" Label: "Alpha:" Constraints: 0x55 Listening: 1 TextType: 588 NextControl: 52 ) (AVEnum.588 Name: "TEXTLINE_TYPE_REAL" ) (RectD.589 Left: 9.00000000000000 Top: 46.00000000000000 Right: 261.00000000000000 Bottom: 24.00000000000000 ) (RectD.590 Left: 9.00000000000000 Top: 72.00000000000000 Right: 262.00000000000000 Bottom: 50.00000000000000 ) (RectD.591 Left: 9.00000000000000 Top: 96.00000000000000 Right: 101.00000000000000 Bottom: 76.00000000000000 ) (CPanel.592 InternalName: "cpaBinary" ObjectTag: 33 Child: 593 Child: 594 Constraints: 0x55 ResBox: 595 ResBox: 596 Label: "Binary Response Models" VisibleBorder: 1 Listening: 1 ) (AVCBox.593 InternalName: "chkLackFit" ObjectTag: 33 Listening: 1 Label: "Goodness of fit test" Constraints: 0x55 ) (AVCBox.594 InternalName: "chkInfluence" ObjectTag: 33 Listening: 1 Label: "Influence statistics" Constraints: 0x55 ) (RectD.595 Left: 12.00000000000000 Top: 47.00000000000000 Right: 168.00000000000000 Bottom: 24.00000000000000 ) (RectD.596 Left: 12.00000000000000 Top: 73.00000000000000 Right: 158.00000000000000 Bottom: 50.00000000000000 ) (LButn.597 InternalName: "lbtOK" ObjectTag: 33 Label: "OK" Click: "SM.LogOutput.Click" ) (LButn.598 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.LogOutput.Click" ) (LButn.599 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.LogOutput.Click" ) (RectD.600 Left: 14.00000000000000 Top: 165.00000000000000 Right: 284.00000000000000 ) (RectD.601 Left: 14.00000000000000 Top: 285.00000000000000 Right: 284.00000000000000 Bottom: 173.00000000000000 ) (RectD.602 Left: 296.00000000000000 Top: 285.00000000000000 Right: 470.00000000000000 Bottom: 173.00000000000000 ) (RectD.603 Left: 382.00000000000000 Top: 49.00000000000000 Right: 443.00000000000000 Bottom: 17.00000000000000 ) (RectD.604 Left: 382.00000000000000 Top: 98.00000000000000 Right: 443.00000000000000 Bottom: 66.00000000000000 ) (RectD.605 Left: 382.00000000000000 Top: 147.00000000000000 Right: 443.00000000000000 Bottom: 115.00000000000000 ) (AVDLog.606 Name: "SM.LogParms" X: 83 Y: 97 W: 414 H: 267 ConstrainedControlNames: 607 ConstrainedControlNames: 608 ConstrainedControlNames: 609 ConstrainedControlNames: 610 ConstrainedControlNames: 611 ConstrainedControlNames: 612 Constraints: 613 Constraints: 614 Constraints: 615 Constraints: 616 Constraints: 617 Constraints: 618 Server: 52 ControlPanel: 619 ObjectTag: 33 Title: "Logistic Regression" Resizable: 1 AlwaysOnTop: 1 HasTitleBar: 1 Open: "SM.LogParms.Open" DefaultButton: 629 ) (AVStr.607 S: "lbtAdd" ) (AVStr.608 S: "lbtDelete" ) (AVStr.609 S: "lbtInt" ) (AVStr.610 S: "lbtOK" ) (AVStr.611 S: "lbtCancel" ) (AVStr.612 S: "lbtHelp" ) (Numb.613 N: 101.00000000000000 ) (Numb.614 N: 101.00000000000000 ) (Numb.615 N: 101.00000000000000 ) (Numb.616 N: 86.00000000000000 ) (Numb.617 N: 86.00000000000000 ) (Numb.618 N: 86.00000000000000 ) (CPanel.619 Child: 620 Child: 621 Child: 623 Child: 624 Child: 626 Child: 627 Child: 628 Child: 629 Child: 630 Child: 631 ResBox: 632 ResBox: 633 ResBox: 634 ResBox: 635 ResBox: 636 ResBox: 637 ResBox: 638 ResBox: 639 ResBox: 640 ResBox: 641 Listening: 1 ) (AVCBox.620 InternalName: "chkIntercept" ObjectTag: 33 Listening: 1 Selected: 1 Label: "Intercept:" Click: "SM.LogParms.Click" Constraints: 0x55 ) (TextLine.621 InternalName: "txlIntercept" ObjectTag: 33 Constraints: 0x55 Listening: 1 TextType: 622 Changed: "SM.LogParms.Changed" NextControl: 52 ) (AVEnum.622 Name: "TEXTLINE_TYPE_REAL" ) (TextLabel.623 InternalName: "txtParms" ObjectTag: 33 Constraints: 0x55 Label: "Parameters:" Listening: 1 ) (AVLBox.624 InternalName: "lbxParms" ObjectTag: 33 NextControl: 52 ContentKind: 4 Constraints: 0x33 Listening: 1 VerticalScroll: 1 SelectionStyle: 625 ) (AVEnum.625 Name: "LISTBOX_SELECTION_MULTIROW" ) (LButn.626 InternalName: "lbtAdd" ObjectTag: 33 Label: "Add" Click: "SM.LogParms.Click" ) (LButn.627 InternalName: "lbtDelete" ObjectTag: 33 Label: "Delete" Click: "SM.LogParms.Click" ) (LButn.628 InternalName: "lbtInt" ObjectTag: 33 Label: "Interactions" Click: "SM.LogParms.Click" ) (LButn.629 InternalName: "lbtOK" Disabled: 1 ObjectTag: 33 Update: "SM.LogParms.Update" Label: "OK" Click: "SM.LogParms.Click" ) (LButn.630 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.LogParms.Click" ) (LButn.631 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.LogParms.Click" ) (RectD.632 Left: 19.00000000000000 Top: 38.00000000000000 Right: 115.00000000000000 Bottom: 17.00000000000000 ) (RectD.633 Left: 103.00000000000000 Top: 38.00000000000000 Right: 274.00000000000000 Bottom: 18.00000000000000 ) (RectD.634 Left: 20.00000000000000 Top: 71.00000000000000 Right: 103.00000000000000 Bottom: 44.00000000000000 ) (RectD.635 Left: 20.00000000000000 Top: 204.00000000000000 Right: 313.00000000000000 Bottom: 71.00000000000000 ) (RectD.636 Left: 21.00000000000000 Top: 247.00000000000000 Right: 87.00000000000000 Bottom: 221.00000000000000 ) (RectD.637 Left: 126.00000000000000 Top: 247.00000000000000 Right: 193.00000000000000 Bottom: 221.00000000000000 ) (RectD.638 Left: 229.00000000000000 Top: 247.00000000000000 Right: 312.00000000000000 Bottom: 221.00000000000000 ) (RectD.639 Left: 338.00000000000000 Top: 108.00000000000000 Right: 391.00000000000000 Bottom: 82.00000000000000 ) (RectD.640 Left: 338.00000000000000 Top: 150.00000000000000 Right: 391.00000000000000 Bottom: 124.00000000000000 ) (RectD.641 Left: 338.00000000000000 Top: 192.00000000000000 Right: 391.00000000000000 Bottom: 166.00000000000000 ) (AVDLog.642 Name: "SM.LogParmsAdd" X: 70 Y: 114 W: 331 H: 113 ConstrainedControlNames: 643 ConstrainedControlNames: 644 ConstrainedControlNames: 645 Constraints: 646 Constraints: 647 Constraints: 648 Server: 52 ControlPanel: 649 ObjectTag: 33 Title: "Add Parameter" Resizable: 1 AlwaysOnTop: 1 HasTitleBar: 1 Open: "SM.LogParmsAdd.Open" DefaultButton: 657 ) (AVStr.643 S: "lbtOK" ) (AVStr.644 S: "lbtCancel" ) (AVStr.645 S: "lbtHelp" ) (Numb.646 N: 86.00000000000000 ) (Numb.647 N: 86.00000000000000 ) (Numb.648 N: 86.00000000000000 ) (CPanel.649 Child: 650 Child: 651 Child: 652 Child: 653 Child: 654 Child: 655 Child: 657 Child: 658 Child: 659 ResBox: 660 ResBox: 661 ResBox: 662 ResBox: 663 ResBox: 664 ResBox: 665 ResBox: 666 ResBox: 667 ResBox: 668 Listening: 1 ) (TextLabel.650 InternalName: "txtTheme" ObjectTag: 33 Constraints: 0x55 Label: "Theme:" Listening: 1 ) (AVCBBox.651 InternalName: "cbxTheme" ObjectTag: 33 NextControl: 52 ContentKind: 4 Constraints: 0x53 Listening: 1 Select: "SM.LogParmsAdd.Select" ) (TextLabel.652 InternalName: "txtField" ObjectTag: 33 Constraints: 0x55 Label: "Field:" Listening: 1 ) (AVCBBox.653 InternalName: "cbxField" ObjectTag: 33 Update: "SM.LogParmsAdd.Update" NextControl: 52 ContentKind: 4 Constraints: 0x53 Listening: 1 Select: "SM.LogParmsAdd.Select" ) (TextLabel.654 InternalName: "txtParm" ObjectTag: 33 Constraints: 0x55 Label: "Parameter:" Listening: 1 ) (TextLine.655 InternalName: "txlParm" ObjectTag: 33 Constraints: 0x53 Listening: 1 TextType: 656 Changed: "SM.LogParms.Changed" NextControl: 52 ) (AVEnum.656 Name: "TEXTLINE_TYPE_REAL" ) (LButn.657 InternalName: "lbtOK" Disabled: 1 ObjectTag: 33 Update: "SM.LogParmsAdd.Update" Label: "OK" Click: "SM.LogParmsAdd.Click" ) (LButn.658 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.LogParmsAdd.Click" ) (LButn.659 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.LogParmsAdd.Click" ) (RectD.660 Left: 12.00000000000000 Top: 34.00000000000000 Right: 60.00000000000000 Bottom: 16.00000000000000 ) (RectD.661 Left: 68.00000000000000 Top: 127.00000000000000 Right: 245.00000000000000 Bottom: 15.00000000000000 ) (RectD.662 Left: 12.00000000000000 Top: 67.00000000000000 Right: 60.00000000000000 Bottom: 50.00000000000000 ) (RectD.663 Left: 68.00000000000000 Top: 156.00000000000000 Right: 245.00000000000000 Bottom: 49.00000000000000 ) (RectD.664 Left: 12.00000000000000 Top: 100.00000000000000 Right: 86.00000000000000 Bottom: 82.00000000000000 ) (RectD.665 Left: 95.00000000000000 Top: 102.00000000000000 Right: 245.00000000000000 Bottom: 82.00000000000000 ) (RectD.666 Left: 266.00000000000000 Top: 38.00000000000000 Right: 317.00000000000000 Bottom: 13.00000000000000 ) (RectD.667 Left: 266.00000000000000 Top: 68.00000000000000 Right: 317.00000000000000 Bottom: 44.00000000000000 ) (RectD.668 Left: 266.00000000000000 Top: 99.00000000000000 Right: 317.00000000000000 Bottom: 74.00000000000000 ) (AVDLog.669 Name: "SM.LogParmsInt" X: 48 Y: 102 W: 412 H: 182 ConstrainedControlNames: 670 ConstrainedControlNames: 671 ConstrainedControlNames: 672 ConstrainedControlNames: 673 ConstrainedControlNames: 674 Constraints: 675 Constraints: 676 Constraints: 677 Constraints: 678 Constraints: 679 Server: 52 ControlPanel: 680 ObjectTag: 33 Title: "Interactions" Resizable: 1 AlwaysOnTop: 1 HasTitleBar: 1 Close: "SM.LogParmsInt.Close" Open: "SM.LogParmsInt.Open" DefaultButton: 685 ) (AVStr.670 S: "lbtAdd" ) (AVStr.671 S: "lbtDelete" ) (AVStr.672 S: "lbtOK" ) (AVStr.673 S: "lbtCancel" ) (AVStr.674 S: "lbtHelp" ) (Numb.675 N: 101.00000000000000 ) (Numb.676 N: 101.00000000000000 ) (Numb.677 N: 86.00000000000000 ) (Numb.678 N: 86.00000000000000 ) (Numb.679 N: 86.00000000000000 ) (CPanel.680 Child: 681 Child: 683 Child: 684 Child: 685 Child: 686 Child: 687 ResBox: 688 ResBox: 689 ResBox: 690 ResBox: 691 ResBox: 692 ResBox: 693 Listening: 1 ) (AVLBox.681 InternalName: "lbxInt" ObjectTag: 33 Update: "SM.LogParmsInt.Update" NextControl: 52 ContentKind: 4 Constraints: 0x33 Listening: 1 VerticalScroll: 1 SelectionStyle: 682 Apply: "SM.LogParmsInt.Apply" ) (AVEnum.682 Name: "LISTBOX_SELECTION_SINGLEROW" ) (LButn.683 InternalName: "lbtAdd" ObjectTag: 33 Label: "Add" Click: "SM.LogParmsInt.Click" ) (LButn.684 InternalName: "lbtDelete" ObjectTag: 33 Label: "Delete" Click: "SM.LogParmsInt.Click" ) (LButn.685 InternalName: "lbtOK" ObjectTag: 33 Label: "OK" Click: "SM.LogParmsInt.Click" ) (LButn.686 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.LogParmsInt.Click" ) (LButn.687 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.LogParmsInt.Click" ) (RectD.688 Left: 19.00000000000000 Top: 134.00000000000000 Right: 338.00000000000000 Bottom: 18.00000000000000 ) (RectD.689 Left: 89.00000000000000 Top: 167.00000000000000 Right: 148.00000000000000 Bottom: 146.00000000000000 ) (RectD.690 Left: 192.00000000000000 Top: 167.00000000000000 Right: 250.00000000000000 Bottom: 146.00000000000000 ) (RectD.691 Left: 343.00000000000000 Top: 50.00000000000000 Right: 395.00000000000000 Bottom: 23.00000000000000 ) (RectD.692 Left: 343.00000000000000 Top: 88.00000000000000 Right: 395.00000000000000 Bottom: 61.00000000000000 ) (RectD.693 Left: 343.00000000000000 Top: 126.00000000000000 Right: 395.00000000000000 Bottom: 100.00000000000000 ) (AVDLog.694 Name: "SM.MergeGrids" X: 50 Y: 93 W: 454 H: 185 ConstrainedControlNames: 695 ConstrainedControlNames: 696 ConstrainedControlNames: 697 ConstrainedControlNames: 698 ConstrainedControlNames: 699 Constraints: 700 Constraints: 701 Constraints: 702 Constraints: 703 Constraints: 704 Server: 52 ControlPanel: 705 ObjectTag: 33 Title: "Combine Grids" EscapeEnabled: 1 AlwaysOnTop: 1 HasTitleBar: 1 Closeable: 1 Open: "SM.MergeGrids.Open" DefaultButton: 730 ) (AVStr.695 S: "lbtAdd" ) (AVStr.696 S: "lbtRemove" ) (AVStr.697 S: "lbtOK" ) (AVStr.698 S: "lbtCancel" ) (AVStr.699 S: "lbtHelp" ) (Numb.700 N: 85.00000000000000 ) (Numb.701 N: 85.00000000000000 ) (Numb.702 N: 85.00000000000000 ) (Numb.703 N: 85.00000000000000 ) (Numb.704 N: 85.00000000000000 ) (CPanel.705 Child: 706 Child: 708 Child: 709 Child: 711 Child: 712 Child: 713 Child: 714 Child: 715 Child: 716 Child: 717 Child: 718 ResBox: 719 ResBox: 720 ResBox: 721 ResBox: 722 ResBox: 723 ResBox: 724 ResBox: 725 ResBox: 726 ResBox: 727 ResBox: 728 ResBox: 729 Listening: 1 ) (AVLBox.706 InternalName: "lbxAvailable" ObjectTag: 33 NextControl: 52 ContentKind: 4 Constraints: 0x55 Listening: 1 VerticalScroll: 1 SelectionStyle: 707 Apply: "SM.MergeGrids.Apply" ) (AVEnum.707 Name: "LISTBOX_SELECTION_MULTIROW" ) (TextLabel.708 InternalName: "txtAvailable" ObjectTag: 33 Constraints: 0x55 Label: "Available grids:" Listening: 1 ) (AVLBox.709 InternalName: "lbxMerge" ObjectTag: 33 NextControl: 52 ContentKind: 4 Constraints: 0x55 Listening: 1 VerticalScroll: 1 SelectionStyle: 710 Apply: "SM.MergeGrids.Apply" ) (AVEnum.710 Name: "LISTBOX_SELECTION_MULTIROW" ) (TextLabel.711 InternalName: "txtMerge" ObjectTag: 33 Constraints: 0x55 Label: "Grids to merge:" Listening: 1 ) (LButn.712 InternalName: "lbtAdd" ObjectTag: 33 Label: ">" Click: "SM.MergeGrids.Click" ) (LButn.713 InternalName: "lbtRemove" ObjectTag: 33 Label: "<" Click: "SM.MergeGrids.Click" ) (LButn.714 InternalName: "lbtOK" ObjectTag: 33 Update: "SM.MergeGrids.Update" Label: "OK" Click: "SM.MergeGrids.Click" ) (LButn.715 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.MergeGrids.Click" ) (LButn.716 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.MergeGrids.Click" ) (RButn.717 InternalName: "radMerge" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Merge" ) (RButn.718 InternalName: "radMosaic" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Mosaic" ) (RectD.719 Left: 13.00000000000000 Top: 169.00000000000000 Right: 162.00000000000000 Bottom: 30.00000000000000 ) (RectD.720 Left: 13.00000000000000 Top: 29.00000000000000 Right: 147.00000000000000 Bottom: 8.00000000000000 ) (RectD.721 Left: 211.00000000000000 Top: 169.00000000000000 Right: 360.00000000000000 Bottom: 29.00000000000000 ) (RectD.722 Left: 210.00000000000000 Top: 27.00000000000000 Right: 345.00000000000000 Bottom: 8.00000000000000 ) (RectD.723 Left: 171.00000000000000 Top: 85.00000000000000 Right: 196.00000000000000 Bottom: 65.00000000000000 ) (RectD.724 Left: 171.00000000000000 Top: 130.00000000000000 Right: 196.00000000000000 Bottom: 108.00000000000000 ) (RectD.725 Left: 379.00000000000000 Top: 43.00000000000000 Right: 431.00000000000000 Bottom: 17.00000000000000 ) (RectD.726 Left: 379.00000000000000 Top: 76.00000000000000 Right: 431.00000000000000 Bottom: 50.00000000000000 ) (RectD.727 Left: 379.00000000000000 Top: 108.00000000000000 Right: 431.00000000000000 Bottom: 82.00000000000000 ) (RectD.728 Left: 365.00000000000000 Top: 164.00000000000000 Right: 434.00000000000000 Bottom: 141.00000000000000 ) (RectD.729 Left: 365.00000000000000 Top: 145.00000000000000 Right: 434.00000000000000 Bottom: 122.00000000000000 ) (Nil.730 ) (AVDLog.731 Name: "SM.PolyGrid" X: 50 Y: 95 W: 436 H: 165 ConstrainedControlNames: 732 ConstrainedControlNames: 733 ConstrainedControlNames: 734 Constraints: 735 Constraints: 736 Constraints: 737 Server: 52 ControlPanel: 738 ObjectTag: 33 Title: "Convert" Modal: 1 AlwaysOnTop: 1 HasTitleBar: 1 Close: "SM.PolyGrid.Close" Open: "SM.PolyGrid.Open" DefaultButton: 744 ) (AVStr.732 S: "lbtOK" ) (AVStr.733 S: "lbtCancel" ) (AVStr.734 S: "lbtHelp" ) (Numb.735 N: 85.00000000000000 ) (Numb.736 N: 85.00000000000000 ) (Numb.737 N: 85.00000000000000 ) (CPanel.738 Child: 739 Child: 740 Child: 741 Child: 743 Child: 744 Child: 745 Child: 746 ResBox: 747 ResBox: 748 ResBox: 749 ResBox: 750 ResBox: 751 ResBox: 752 ResBox: 753 Listening: 1 ) (AVCBBox.739 InternalName: "cbxField" ObjectTag: 33 NextControl: 52 ContentKind: 4 Constraints: 0x55 Listening: 1 Label: "Field for cell values:" ) (AVCBBox.740 InternalName: "cbxCellSize" ObjectTag: 33 NextControl: 52 ContentKind: 4 Constraints: 0x55 Listening: 1 Label: "Cell size:" ) (TextLine.741 InternalName: "txlCellSize" ObjectTag: 33 Label: "Cell size:" Constraints: 0x55 Listening: 1 TextType: 742 NextControl: 52 ) (AVEnum.742 Name: "TEXTLINE_TYPE_REAL" ) (AVCBBox.743 InternalName: "cbxExtent" ObjectTag: 33 NextControl: 52 ContentKind: 4 Constraints: 0x55 Listening: 1 Label: "Extent:" ) (LButn.744 InternalName: "lbtOK" ObjectTag: 33 Label: "OK" Click: "SM.PolyGrid.Click" ) (LButn.745 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.PolyGrid.Click" ) (LButn.746 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.PolyGrid.Click" ) (RectD.747 Left: 13.00000000000000 Top: 137.00000000000000 Right: 340.00000000000000 Bottom: 25.00000000000000 ) (RectD.748 Left: 13.00000000000000 Top: 171.00000000000000 Right: 340.00000000000000 Bottom: 60.00000000000000 ) (RectD.749 Left: 46.00000000000000 Top: 110.00000000000000 Right: 194.00000000000000 Bottom: 90.00000000000000 ) (RectD.750 Left: 13.00000000000000 Top: 235.00000000000000 Right: 340.00000000000000 Bottom: 125.00000000000000 ) (RectD.751 Left: 361.00000000000000 Top: 57.00000000000000 Right: 416.00000000000000 Bottom: 29.00000000000000 ) (RectD.752 Left: 361.00000000000000 Top: 93.00000000000000 Right: 416.00000000000000 Bottom: 66.00000000000000 ) (RectD.753 Left: 361.00000000000000 Top: 130.00000000000000 Right: 416.00000000000000 Bottom: 102.00000000000000 ) (AVDLog.754 Name: "SM.Properties" X: 75 Y: 97 W: 613 H: 259 ConstrainedControlNames: 755 ConstrainedControlNames: 756 ConstrainedControlNames: 757 ConstrainedControlNames: 758 ConstrainedControlNames: 759 ConstrainedControlNames: 760 Constraints: 761 Constraints: 762 Constraints: 763 Constraints: 764 Constraints: 765 Constraints: 766 Server: 52 ControlPanel: 767 ObjectTag: 33 Title: "StatMod Properties" AlwaysOnTop: 1 HasTitleBar: 1 Open: "SM.Properties.Open" DefaultButton: 787 ) (AVStr.755 S: "lbtOK" ) (AVStr.756 S: "lbtCancel" ) (AVStr.757 S: "lbtHelp" ) (AVStr.758 S: "btnSAS" ) (AVStr.759 S: "btnSPlus" ) (AVStr.760 S: "btnODB" ) (Numb.761 N: 85.00000000000000 ) (Numb.762 N: 85.00000000000000 ) (Numb.763 N: 85.00000000000000 ) (Numb.764 N: 85.00000000000000 ) (Numb.765 N: 85.00000000000000 ) (Numb.766 N: 85.00000000000000 ) (CPanel.767 Child: 768 Child: 769 Child: 771 Child: 773 Child: 775 Child: 776 Child: 778 Child: 780 Child: 782 Child: 783 Child: 785 Child: 787 Child: 788 Child: 789 ResBox: 790 ResBox: 791 ResBox: 792 ResBox: 793 ResBox: 794 ResBox: 795 ResBox: 796 ResBox: 797 ResBox: 798 ResBox: 799 ResBox: 800 ResBox: 801 ResBox: 802 ResBox: 803 Listening: 1 ) (AVCBox.768 InternalName: "chkSAS" ObjectTag: 33 Listening: 1 Label: "Automatically submit SAS jobs" Click: "SM.Properties.Click" Constraints: 0x55 ) (TextLine.769 InternalName: "txlSAS" Disabled: 1 ObjectTag: 33 Update: "SM.Properties.Update" Label: "Location of SAS executable:" LabelSize: 190 Constraints: 0x55 Listening: 1 TextType: 770 NextControl: 52 ) (AVEnum.770 Name: "TEXTLINE_TYPE_ALL" ) (Butn.771 InternalName: "btnSAS" Disabled: 1 ObjectTag: 33 Update: "SM.Properties.Update" Icon: 772 Click: "SM.Properties.Click" ) (AVIcon.772 Name: "FileBrowser" Res: "Icons.FileBrowser" ) (TextLine.773 InternalName: "txlSASOpts" Disabled: 1 ObjectTag: 33 Update: "SM.Properties.Update" Label: "Command line options:" LabelSize: 190 Constraints: 0x55 Listening: 1 TextType: 774 NextControl: 52 ) (AVEnum.774 Name: "TEXTLINE_TYPE_ALL" ) (AVCBox.775 InternalName: "chkSPlus" ObjectTag: 33 Listening: 1 Label: "Automatically submit S-PLUS jobs" Click: "SM.Properties.Click" Constraints: 0x55 ) (TextLine.776 InternalName: "txlSPlus" Disabled: 1 ObjectTag: 33 Update: "SM.Properties.Update" Label: "Location of S-PLUS executable:" LabelSize: 205 Constraints: 0x55 Listening: 1 TextType: 777 NextControl: 52 ) (AVEnum.777 Name: "TEXTLINE_TYPE_ALL" ) (Butn.778 InternalName: "btnSPlus" Disabled: 1 ObjectTag: 33 Update: "SM.Properties.Update" Icon: 779 Click: "SM.Properties.Click" ) (AVIcon.779 Name: "FileBrowser" Res: "Icons.FileBrowser" ) (TextLine.780 InternalName: "txlSPlusOpts" Disabled: 1 ObjectTag: 33 Update: "SM.Properties.Update" Label: "Command line options:" LabelSize: 205 Constraints: 0x55 Listening: 1 TextType: 781 NextControl: 52 ) (AVEnum.781 Name: "TEXTLINE_TYPE_ALL" ) (AVCBBox.782 InternalName: "cbxTime" Disabled: 1 ObjectTag: 33 Update: "SM.Properties.Update" NextControl: 52 ContentKind: 4 Constraints: 0x55 Listening: 1 Label: "SAS/S-PLUS timeout (seconds):" ) (TextLine.783 InternalName: "txlODB" ObjectTag: 33 Update: "SM.Properties.Update" Label: "Location for temporary data files:" Constraints: 0x55 Listening: 1 TextType: 784 NextControl: 52 ) (AVEnum.784 Name: "TEXTLINE_TYPE_ALL" ) (Butn.785 InternalName: "btnODB" ObjectTag: 33 Update: "SM.Properties.Update" Icon: 786 Click: "SM.Properties.Click" ) (AVIcon.786 Name: "FileBrowser" Res: "Icons.FileBrowser" ) (LButn.787 InternalName: "lbtOK" ObjectTag: 33 Label: "OK" Click: "SM.Properties.Click" ) (LButn.788 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.Properties.Click" ) (LButn.789 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.Properties.Click" ) (RectD.790 Left: 14.00000000000000 Top: 38.00000000000000 Right: 237.00000000000000 Bottom: 10.00000000000000 ) (RectD.791 Left: 41.00000000000000 Top: 61.00000000000000 Right: 478.00000000000000 Bottom: 41.00000000000000 ) (RectD.792 Left: 483.00000000000000 Top: 61.00000000000000 Right: 512.00000000000000 Bottom: 40.00000000000000 ) (RectD.793 Left: 41.00000000000000 Top: 87.00000000000000 Right: 478.00000000000000 Bottom: 67.00000000000000 ) (RectD.794 Left: 14.00000000000000 Top: 119.00000000000000 Right: 272.00000000000000 Bottom: 90.00000000000000 ) (RectD.795 Left: 41.00000000000000 Top: 143.00000000000000 Right: 478.00000000000000 Bottom: 123.00000000000000 ) (RectD.796 Left: 483.00000000000000 Top: 144.00000000000000 Right: 512.00000000000000 Bottom: 123.00000000000000 ) (RectD.797 Left: 41.00000000000000 Top: 167.00000000000000 Right: 478.00000000000000 Bottom: 147.00000000000000 ) (RectD.798 Left: 61.00000000000000 Top: 245.00000000000000 Right: 347.00000000000000 Bottom: 178.00000000000000 ) (RectD.799 Left: 15.00000000000000 Top: 238.00000000000000 Right: 476.00000000000000 Bottom: 218.00000000000000 ) (RectD.800 Left: 483.00000000000000 Top: 238.00000000000000 Right: 512.00000000000000 Bottom: 218.00000000000000 ) (RectD.801 Left: 541.00000000000000 Top: 64.00000000000000 Right: 594.00000000000000 Bottom: 34.00000000000000 ) (RectD.802 Left: 541.00000000000000 Top: 101.00000000000000 Right: 594.00000000000000 Bottom: 72.00000000000000 ) (RectD.803 Left: 541.00000000000000 Top: 139.00000000000000 Right: 594.00000000000000 Bottom: 109.00000000000000 ) (AVDLog.804 Name: "SM.RandomSample" X: 53 Y: 85 W: 495 H: 201 ConstrainedControlNames: 805 ConstrainedControlNames: 806 ConstrainedControlNames: 807 Constraints: 808 Constraints: 809 Constraints: 810 Server: 811 ControlPanel: 812 ObjectTag: 33 Title: "Random Sample" Resizable: 1 AlwaysOnTop: 1 HasTitleBar: 1 Open: "SM.RandomSample.Open" DefaultButton: 838 ) (AVStr.805 S: "lbtOK" ) (AVStr.806 S: "lbtCancel" ) (AVStr.807 S: "lbtHelp" ) (Numb.808 N: 85.00000000000000 ) (Numb.809 N: 85.00000000000000 ) (Numb.810 N: 85.00000000000000 ) (Nil.811 ) (CPanel.812 Child: 813 Child: 814 Child: 815 Child: 817 Child: 818 Child: 819 Child: 821 Child: 823 Child: 824 Child: 825 Child: 826 ResBox: 827 ResBox: 828 ResBox: 829 ResBox: 830 ResBox: 831 ResBox: 832 ResBox: 833 ResBox: 834 ResBox: 835 ResBox: 836 ResBox: 837 Listening: 1 ) (TextLabel.813 InternalName: "txtHorizontal" ObjectTag: 33 Update: "SM.RandomSample.Update" Constraints: 0x55 Label: "Range:" Listening: 1 ) (TextLabel.814 InternalName: "txtVertical" ObjectTag: 33 Update: "SM.RandomSample.Update" Constraints: 0x55 Label: "Range:" Listening: 1 ) (TextLine.815 InternalName: "txlNumPoints" ObjectTag: 33 Label: "Number of sample points:" Constraints: 0x55 Listening: 1 TextType: 816 Changed: "SM.RandomSample.Changed" NextControl: 811 ) (AVEnum.816 Name: "TEXTLINE_TYPE_INTEGER" ) (AVCBBox.817 InternalName: "cbxTheme" ObjectTag: 33 NextControl: 811 ContentKind: 4 Constraints: 0x55 Listening: 1 Label: "Theme that points must fall in:" Select: "SM.RandomSample.Select" ) (AVCBBox.818 InternalName: "cbxField" ObjectTag: 33 Update: "SM.RandomSample.Update" NextControl: 811 ContentKind: 4 Constraints: 0x55 Listening: 1 Label: "Field:" Select: "SM.RandomSample.Select" ) (TextLine.819 InternalName: "txlHorizontal" ObjectTag: 33 Label: "Horizontal grid size:" LabelSize: 130 Constraints: 0x55 Listening: 1 TextType: 820 Changed: "SM.RandomSample.Changed" NextControl: 811 ) (AVEnum.820 Name: "TEXTLINE_TYPE_REAL" ) (TextLine.821 InternalName: "txlVertical" ObjectTag: 33 Label: "Vertical grid size:" LabelSize: 130 Constraints: 0x55 Listening: 1 TextType: 822 Changed: "SM.RandomSample.Changed" NextControl: 811 ) (AVEnum.822 Name: "TEXTLINE_TYPE_REAL" ) (LButn.823 InternalName: "lbtOK" ObjectTag: 33 Update: "SM.RandomSample.Update" Label: "OK" Click: "SM.RandomSample.Click" ) (LButn.824 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.RandomSample.Click" ) (LButn.825 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.RandomSample.Click" ) (AVCBox.826 InternalName: "chkStratify" ObjectTag: 33 Listening: 1 Label: "Stratify" Constraints: 0x55 ) (RectD.827 Left: 250.00000000000000 Top: 150.00000000000000 Right: 468.00000000000000 Bottom: 130.00000000000000 ) (RectD.828 Left: 250.00000000000000 Top: 186.00000000000000 Right: 468.00000000000000 Bottom: 166.00000000000000 ) (RectD.829 Left: 12.00000000000000 Top: 41.00000000000000 Right: 230.00000000000000 Bottom: 21.00000000000000 ) (RectD.830 Left: 12.00000000000000 Top: 163.00000000000000 Right: 421.00000000000000 Bottom: 57.00000000000000 ) (RectD.831 Left: 169.00000000000000 Top: 180.00000000000000 Right: 420.00000000000000 Bottom: 93.00000000000000 ) (RectD.832 Left: 12.00000000000000 Top: 151.00000000000000 Right: 242.00000000000000 Bottom: 131.00000000000000 ) (RectD.833 Left: 12.00000000000000 Top: 187.00000000000000 Right: 243.00000000000000 Bottom: 167.00000000000000 ) (RectD.834 Left: 437.00000000000000 Top: 47.00000000000000 Right: 487.00000000000000 Bottom: 18.00000000000000 ) (RectD.835 Left: 437.00000000000000 Top: 83.00000000000000 Right: 487.00000000000000 Bottom: 54.00000000000000 ) (RectD.836 Left: 437.00000000000000 Top: 119.00000000000000 Right: 487.00000000000000 Bottom: 90.00000000000000 ) (RectD.837 Left: 16.00000000000000 Top: 110.00000000000000 Right: 94.00000000000000 Bottom: 91.00000000000000 ) (Nil.838 ) (AVDLog.839 Name: "SM.Sample" X: 47 Y: 96 W: 527 H: 437 ConstrainedControlNames: 840 ConstrainedControlNames: 841 ConstrainedControlNames: 842 ConstrainedControlNames: 843 ConstrainedControlNames: 844 Constraints: 845 Constraints: 846 Constraints: 847 Constraints: 848 Constraints: 849 Server: 850 ControlPanel: 851 ObjectTag: 33 Title: "Sample" AlwaysOnTop: 1 HasTitleBar: 1 Open: "SM.Sample.Open" DefaultButton: 889 ) (AVStr.840 S: "lbtAdd" ) (AVStr.841 S: "lbtRemove" ) (AVStr.842 S: "lbtOK" ) (AVStr.843 S: "lbtCancel" ) (AVStr.844 S: "lbtHelp" ) (Numb.845 N: 85.00000000000000 ) (Numb.846 N: 85.00000000000000 ) (Numb.847 N: 85.00000000000000 ) (Numb.848 N: 85.00000000000000 ) (Numb.849 N: 85.00000000000000 ) (Nil.850 ) (CPanel.851 Child: 852 Child: 872 Child: 882 Child: 889 Child: 890 Child: 891 ResBox: 892 ResBox: 893 ResBox: 894 ResBox: 895 ResBox: 896 ResBox: 897 Listening: 1 ) (CPanel.852 InternalName: "cpaSample" ObjectTag: 33 Child: 853 Child: 854 Child: 856 Child: 857 Child: 859 Child: 860 Child: 861 Child: 862 Constraints: 0x55 ResBox: 864 ResBox: 865 ResBox: 866 ResBox: 867 ResBox: 868 ResBox: 869 ResBox: 870 ResBox: 871 Label: "Polygon and Grid Themes" VisibleBorder: 1 Listening: 1 ) (TextLabel.853 InternalName: "txtThemes" ObjectTag: 33 Constraints: 0x55 Label: "Available themes:" Listening: 1 ) (AVLBox.854 InternalName: "lbxThemes" ObjectTag: 33 NextControl: 850 ContentKind: 4 Constraints: 0x55 Listening: 1 VerticalScroll: 1 Select: "SM.Sample.Select" SelectionStyle: 855 ) (AVEnum.855 Name: "LISTBOX_SELECTION_SINGLEROW" ) (TextLabel.856 InternalName: "txtFields" ObjectTag: 33 Constraints: 0x55 Label: "Available fields:" Listening: 1 ) (AVLBox.857 InternalName: "lbxFields" ObjectTag: 33 Update: "SM.Sample.Update" NextControl: 850 ContentKind: 4 Constraints: 0x55 Listening: 1 VerticalScroll: 1 SelectionStyle: 858 Apply: "SM.Sample.Apply" ) (AVEnum.858 Name: "LISTBOX_SELECTION_MULTIROW" ) (LButn.859 InternalName: "lbtAdd" ObjectTag: 33 Label: ">" Click: "SM.Sample.Click" ) (LButn.860 InternalName: "lbtRemove" ObjectTag: 33 Label: "<" Click: "SM.Sample.Click" ) (TextLabel.861 InternalName: "txtSample" ObjectTag: 33 Constraints: 0x55 Label: "Fields to be sampled:" Listening: 1 ) (AVLBox.862 InternalName: "lbxSample" ObjectTag: 33 NextControl: 850 ContentKind: 4 Constraints: 0x55 Listening: 1 VerticalScroll: 1 SelectionStyle: 863 Apply: "SM.Sample.Apply" ) (AVEnum.863 Name: "LISTBOX_SELECTION_MULTIROW" ) (RectD.864 Left: 11.00000000000000 Top: 40.00000000000000 Right: 146.00000000000000 Bottom: 21.00000000000000 ) (RectD.865 Left: 11.00000000000000 Top: 120.00000000000000 Right: 168.00000000000000 Bottom: 41.00000000000000 ) (RectD.866 Left: 11.00000000000000 Top: 147.00000000000000 Right: 146.00000000000000 Bottom: 129.00000000000000 ) (RectD.867 Left: 11.00000000000000 Top: 228.00000000000000 Right: 168.00000000000000 Bottom: 149.00000000000000 ) (RectD.868 Left: 185.00000000000000 Top: 182.00000000000000 Right: 214.00000000000000 Bottom: 161.00000000000000 ) (RectD.869 Left: 185.00000000000000 Top: 216.00000000000000 Right: 214.00000000000000 Bottom: 194.00000000000000 ) (RectD.870 Left: 234.00000000000000 Top: 39.00000000000000 Right: 424.00000000000000 Bottom: 21.00000000000000 ) (RectD.871 Left: 234.00000000000000 Top: 230.00000000000000 Right: 421.00000000000000 Bottom: 41.00000000000000 ) (CPanel.872 InternalName: "cpaPoints" ObjectTag: 33 Child: 873 Child: 874 Child: 875 Child: 877 Constraints: 0x55 ResBox: 878 ResBox: 879 ResBox: 880 ResBox: 881 Label: "Sample Points" VisibleBorder: 1 Listening: 1 ) (AVCBBox.873 InternalName: "cbxTheme" ObjectTag: 33 NextControl: 850 ContentKind: 4 Constraints: 0x55 Listening: 1 Label: "Theme:" Select: "SM.Sample.Select" ) (TextLabel.874 InternalName: "txtPtFields" ObjectTag: 33 Constraints: 0x55 Label: "Fields:" Listening: 1 ) (AVLBox.875 InternalName: "lbxPtFields" ObjectTag: 33 Update: "SM.Sample.Update" NextControl: 850 ContentKind: 4 Constraints: 0x55 Listening: 1 VerticalScroll: 1 Select: "SM.Sample.Select" SelectionStyle: 876 ) (AVEnum.876 Name: "LISTBOX_SELECTION_MULTIROW" ) (AVCBox.877 InternalName: "chkSelected" ObjectTag: 33 Listening: 1 Label: "Use selected records only" Constraints: 0x55 ) (RectD.878 Left: 15.00000000000000 Top: 107.00000000000000 Right: 221.00000000000000 Bottom: 26.00000000000000 ) (RectD.879 Left: 21.00000000000000 Top: 78.00000000000000 Right: 67.00000000000000 Bottom: 56.00000000000000 ) (RectD.880 Left: 69.00000000000000 Top: 136.00000000000000 Right: 219.00000000000000 Bottom: 56.00000000000000 ) (RectD.881 Left: 21.00000000000000 Top: 163.00000000000000 Right: 179.00000000000000 Bottom: 142.00000000000000 ) (CPanel.882 InternalName: "cpaExport" ObjectTag: 33 Child: 883 Child: 884 Child: 885 Constraints: 0x55 ResBox: 886 ResBox: 887 ResBox: 888 Label: "Export Format" VisibleBorder: 1 Listening: 1 ) (RButn.883 InternalName: "radCSV" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Comma-delimited text" Click: "SM.Sample.Click" ) (RButn.884 InternalName: "radDBF" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "dBASE" Click: "SM.Sample.Click" ) (AVCBox.885 InternalName: "chkTable" ObjectTag: 33 Listening: 1 Label: "Add table to project" Constraints: 0x55 ) (RectD.886 Left: 11.00000000000000 Top: 48.00000000000000 Right: 186.00000000000000 Bottom: 29.00000000000000 ) (RectD.887 Left: 11.00000000000000 Top: 71.00000000000000 Right: 158.00000000000000 Bottom: 53.00000000000000 ) (RectD.888 Left: 11.00000000000000 Top: 104.00000000000000 Right: 184.00000000000000 Bottom: 83.00000000000000 ) (LButn.889 InternalName: "lbtOK" ObjectTag: 33 Update: "SM.Sample.Update" Label: "OK" Click: "SM.Sample.Click" ) (LButn.890 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.Sample.Click" ) (LButn.891 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.Sample.Click" ) (RectD.892 Left: 10.00000000000000 Top: 250.00000000000000 Right: 448.00000000000000 Bottom: 4.00000000000000 ) (RectD.893 Left: 10.00000000000000 Top: 424.00000000000000 Right: 243.00000000000000 Bottom: 253.00000000000000 ) (RectD.894 Left: 253.00000000000000 Top: 424.00000000000000 Right: 448.00000000000000 Bottom: 253.00000000000000 ) (RectD.895 Left: 461.00000000000000 Top: 72.00000000000000 Right: 513.00000000000000 Bottom: 45.00000000000000 ) (RectD.896 Left: 461.00000000000000 Top: 114.00000000000000 Right: 513.00000000000000 Bottom: 87.00000000000000 ) (RectD.897 Left: 461.00000000000000 Top: 154.00000000000000 Right: 513.00000000000000 Bottom: 127.00000000000000 ) (AVDLog.898 Name: "SM.Specify" X: 33 Y: 76 W: 344 H: 112 ConstrainedControlNames: 899 ConstrainedControlNames: 900 Constraints: 901 Constraints: 902 Server: 903 ControlPanel: 904 ObjectTag: 33 Title: "Model Type" AlwaysOnTop: 1 HasTitleBar: 1 Open: "SM.Specify.Open" DefaultButton: 908 ) (AVStr.899 S: "lbtOK" ) (AVStr.900 S: "lbtCancel" ) (Numb.901 N: 85.00000000000000 ) (Numb.902 N: 85.00000000000000 ) (Nil.903 ) (CPanel.904 Child: 905 Child: 906 Child: 907 Child: 908 Child: 909 ResBox: 910 ResBox: 911 ResBox: 912 ResBox: 913 ResBox: 914 Listening: 1 ) (RButn.905 InternalName: "radLogistic" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Logistic model" ) (RButn.906 InternalName: "radTree" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Tree model" ) (TextLabel.907 InternalName: "txtSpec" ObjectTag: 33 Constraints: 0x55 Label: "Which type of model would you like to specify?" Listening: 1 ) (LButn.908 InternalName: "lbtOK" ObjectTag: 33 Label: "OK" Click: "SM.Specify.Click" ) (LButn.909 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.Specify.Click" ) (RectD.910 Left: 50.00000000000000 Top: 67.00000000000000 Right: 186.00000000000000 Bottom: 45.00000000000000 ) (RectD.911 Left: 50.00000000000000 Top: 92.00000000000000 Right: 170.00000000000000 Bottom: 70.00000000000000 ) (RectD.912 Left: 14.00000000000000 Top: 37.00000000000000 Right: 324.00000000000000 Bottom: 12.00000000000000 ) (RectD.913 Left: 275.00000000000000 Top: 66.00000000000000 Right: 327.00000000000000 Bottom: 41.00000000000000 ) (RectD.914 Left: 275.00000000000000 Top: 100.00000000000000 Right: 327.00000000000000 Bottom: 75.00000000000000 ) (AVDLog.915 Name: "SM.Status" X: 38 Y: 77 W: 385 H: 101 Server: 850 ControlPanel: 916 ObjectTag: 33 Title: "Status" AlwaysOnTop: 1 HasTitleBar: 1 Close: "SM.Status.Close" DefaultButton: 923 ) (CPanel.916 Child: 917 Child: 918 Child: 919 ResBox: 920 ResBox: 921 ResBox: 922 Listening: 1 ) (TextLabel.917 InternalName: "txtPercent" ObjectTag: 33 Constraints: 0x55 Label: "0% done" Listening: 1 ) (TextLabel.918 InternalName: "txtMsg" ObjectTag: 33 Constraints: 0x55 Listening: 1 ) (TextLabel.919 InternalName: "txtStop" ObjectTag: 33 Constraints: 0x55 Label: "Press the Stop button on the ArcView status bar to stop." Listening: 1 ) (RectD.920 Left: 149.00000000000000 Top: 42.00000000000000 Right: 240.00000000000000 Bottom: 23.00000000000000 ) (RectD.921 Left: 12.00000000000000 Top: 30.00000000000000 Right: 294.00000000000000 Bottom: 13.00000000000000 ) (RectD.922 Left: 12.00000000000000 Top: 73.00000000000000 Right: 378.00000000000000 Bottom: 55.00000000000000 ) (Nil.923 ) (AVDLog.924 Name: "SM.Tree" X: 36 Y: 83 W: 646 H: 409 ConstrainedControlNames: 925 ConstrainedControlNames: 926 ConstrainedControlNames: 927 ConstrainedControlNames: 928 ConstrainedControlNames: 929 ConstrainedControlNames: 930 ConstrainedControlNames: 931 ConstrainedControlNames: 932 ConstrainedControlNames: 933 ConstrainedControlNames: 934 ConstrainedControlNames: 935 ConstrainedControlNames: 936 Constraints: 937 Constraints: 938 Constraints: 939 Constraints: 940 Constraints: 941 Constraints: 942 Constraints: 943 Constraints: 944 Constraints: 945 Constraints: 946 Constraints: 947 Constraints: 948 Server: 949 ControlPanel: 950 ObjectTag: 33 Title: "Classification & Regression Trees in S-PLUS" AlwaysOnTop: 1 HasTitleBar: 1 Close: "SM.Tree.Close" Open: "SM.Tree.Open" DefaultButton: 1008 ) (AVStr.925 S: "lbtAdd" ) (AVStr.926 S: "lbtRemove" ) (AVStr.927 S: "lbtRemoveAll" ) (AVStr.928 S: "lbtFactors" ) (AVStr.929 S: "lbtModel" ) (AVStr.930 S: "lbtSize" ) (AVStr.931 S: "lbtPlots" ) (AVStr.932 S: "lbtOK" ) (AVStr.933 S: "lbtCancel" ) (AVStr.934 S: "lbtHelp" ) (AVStr.935 S: "lbtLoad" ) (AVStr.936 S: "lbtSave" ) (Numb.937 N: 85.00000000000000 ) (Numb.938 N: 85.00000000000000 ) (Numb.939 N: 85.00000000000000 ) (Numb.940 N: 85.00000000000000 ) (Numb.941 N: 85.00000000000000 ) (Numb.942 N: 85.00000000000000 ) (Numb.943 N: 85.00000000000000 ) (Numb.944 N: 85.00000000000000 ) (Numb.945 N: 85.00000000000000 ) (Numb.946 N: 85.00000000000000 ) (Numb.947 N: 85.00000000000000 ) (Numb.948 N: 85.00000000000000 ) (Nil.949 ) (CPanel.950 Child: 951 Child: 956 Child: 980 Child: 999 Child: 1008 Child: 1009 Child: 1010 Child: 1011 Child: 1012 ResBox: 1013 ResBox: 1014 ResBox: 1015 ResBox: 1016 ResBox: 1017 ResBox: 1018 ResBox: 1019 ResBox: 1020 ResBox: 1021 Listening: 1 ) (CPanel.951 InternalName: "cpaZone" ObjectTag: 33 Child: 952 Child: 953 Constraints: 0x55 ResBox: 954 ResBox: 955 Listening: 1 ) (RButn.952 InternalName: "radPoint" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Point samples" Click: "SM.Tree.Click" ) (RButn.953 InternalName: "radZone" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Zone samples" Click: "SM.Tree.Click" ) (RectD.954 Left: 48.00000000000000 Top: 36.00000000000000 Right: 211.00000000000000 Bottom: 14.00000000000000 ) (RectD.955 Left: 291.00000000000000 Top: 36.00000000000000 Right: 454.00000000000000 Bottom: 14.00000000000000 ) (CPanel.956 InternalName: "cpaIndep" ObjectTag: 33 Child: 957 Child: 958 Child: 960 Child: 961 Child: 963 Child: 964 Child: 965 Child: 966 Child: 967 Child: 969 Constraints: 0x55 ResBox: 970 ResBox: 971 ResBox: 972 ResBox: 973 ResBox: 974 ResBox: 975 ResBox: 976 ResBox: 977 ResBox: 978 ResBox: 979 Label: "Independent Variables" VisibleBorder: 1 Listening: 1 ) (TextLabel.957 InternalName: "txtThemes" ObjectTag: 33 Constraints: 0x55 Label: "Available themes:" Listening: 1 ) (AVLBox.958 InternalName: "lbxThemes" ObjectTag: 33 Update: "SM.Tree.Update" NextControl: 949 ContentKind: 4 Constraints: 0x55 ColumnCount: 1 Listening: 1 VerticalScroll: 1 Select: "SM.Tree.Select" SelectionStyle: 959 ) (AVEnum.959 Name: "LISTBOX_SELECTION_SINGLEROW" ) (TextLabel.960 InternalName: "txtFields" ObjectTag: 33 Constraints: 0x55 Label: "Available fields:" Listening: 1 ) (AVLBox.961 InternalName: "lbxFields" ObjectTag: 33 Update: "SM.Tree.Update" NextControl: 949 ContentKind: 4 Constraints: 0x55 ColumnCount: 1 Listening: 1 VerticalScroll: 1 SelectionStyle: 962 Apply: "SM.Tree.Apply" ) (AVEnum.962 Name: "LISTBOX_SELECTION_MULTIROW" ) (LButn.963 InternalName: "lbtAdd" ObjectTag: 33 Label: ">" Click: "SM.Tree.Click" ) (LButn.964 InternalName: "lbtRemove" ObjectTag: 33 Label: "<" Click: "SM.Tree.Click" ) (LButn.965 InternalName: "lbtRemoveAll" ObjectTag: 33 Label: "<<" Click: "SM.Tree.Click" ) (TextLabel.966 InternalName: "txtVars" ObjectTag: 33 Constraints: 0x55 Label: "Independent variables:" Listening: 1 ) (AVLBox.967 InternalName: "lbxVars" ObjectTag: 33 NextControl: 949 ContentKind: 4 Constraints: 0x55 ColumnCount: 1 HorizontalScroll: 1 Listening: 1 VerticalScroll: 1 SelectionStyle: 968 Apply: "SM.Tree.Apply" ) (AVEnum.968 Name: "LISTBOX_SELECTION_MULTIROW" ) (LButn.969 InternalName: "lbtFactors" ObjectTag: 33 Label: "Factors..." Click: "SM.Tree.Click" ) (RectD.970 Left: 19.00000000000000 Top: 41.00000000000000 Right: 178.00000000000000 Bottom: 20.00000000000000 ) (RectD.971 Left: 19.00000000000000 Top: 116.00000000000000 Right: 189.00000000000000 Bottom: 42.00000000000000 ) (RectD.972 Left: 19.00000000000000 Top: 144.00000000000000 Right: 178.00000000000000 Bottom: 123.00000000000000 ) (RectD.973 Left: 19.00000000000000 Top: 243.00000000000000 Right: 189.00000000000000 Bottom: 143.00000000000000 ) (RectD.974 Left: 214.00000000000000 Top: 171.00000000000000 Right: 240.00000000000000 Bottom: 147.00000000000000 ) (RectD.975 Left: 214.00000000000000 Top: 202.00000000000000 Right: 240.00000000000000 Bottom: 179.00000000000000 ) (RectD.976 Left: 214.00000000000000 Top: 234.00000000000000 Right: 240.00000000000000 Bottom: 211.00000000000000 ) (RectD.977 Left: 263.00000000000000 Top: 76.00000000000000 Right: 422.00000000000000 Bottom: 58.00000000000000 ) (RectD.978 Left: 262.00000000000000 Top: 243.00000000000000 Right: 473.00000000000000 Bottom: 80.00000000000000 ) (RectD.979 Left: 282.00000000000000 Top: 51.00000000000000 Right: 358.00000000000000 Bottom: 28.00000000000000 ) (CPanel.980 InternalName: "cpaDep" ObjectTag: 33 Update: "SM.Tree.Update" Child: 981 Child: 982 Child: 983 Child: 984 Child: 985 Child: 986 Child: 987 Child: 988 Child: 989 Constraints: 0x55 ResBox: 990 ResBox: 991 ResBox: 992 ResBox: 993 ResBox: 994 ResBox: 995 ResBox: 996 ResBox: 997 ResBox: 998 Label: "Dependent Variable" VisibleBorder: 1 Listening: 1 ) (TextLabel.981 InternalName: "txtTheme" ObjectTag: 33 Constraints: 0x55 Label: "Theme:" Listening: 1 ) (AVCBBox.982 InternalName: "cbxTheme" ObjectTag: 33 NextControl: 949 ContentKind: 4 Constraints: 0x55 Listening: 1 Select: "SM.Tree.Select" ) (TextLabel.983 InternalName: "txtField" ObjectTag: 33 Constraints: 0x55 Label: "Field:" Listening: 1 ) (AVCBBox.984 InternalName: "cbxField" ObjectTag: 33 Update: "SM.Tree.Update" NextControl: 949 ContentKind: 4 Constraints: 0x55 Listening: 1 Select: "SM.Tree.Select" ) (AVCBox.985 InternalName: "chkSelRecords" ObjectTag: 33 Listening: 1 Label: "Use selected records only" Constraints: 0x55 ) (RButn.986 InternalName: "radClass" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Classification tree" Click: "SM.Tree.Click" ) (RButn.987 InternalName: "radReg" ObjectTag: 33 Update: "SM.Tree.Update" Constraints: 0x55 Listening: 1 Label: "Regression tree" Click: "SM.Tree.Click" ) (AVCBBox.988 InternalName: "cbxIDField" ObjectTag: 33 Update: "SM.Tree.Update" NextControl: 949 ContentKind: 4 Constraints: 0x55 Listening: 1 Select: "SM.Tree.Select" ) (TextLabel.989 InternalName: "txtIDField" ObjectTag: 33 Constraints: 0x55 Label: "Polygon ID field:" Listening: 1 ) (RectD.990 Left: 65.00000000000000 Top: 42.00000000000000 Right: 113.00000000000000 Bottom: 26.00000000000000 ) (RectD.991 Left: 114.00000000000000 Top: 121.00000000000000 Right: 268.00000000000000 Bottom: 24.00000000000000 ) (RectD.992 Left: 80.00000000000000 Top: 68.00000000000000 Right: 118.00000000000000 Bottom: 52.00000000000000 ) (RectD.993 Left: 114.00000000000000 Top: 147.00000000000000 Right: 268.00000000000000 Bottom: 50.00000000000000 ) (RectD.994 Left: 285.00000000000000 Top: 96.00000000000000 Right: 483.00000000000000 Bottom: 74.00000000000000 ) (RectD.995 Left: 305.00000000000000 Top: 42.00000000000000 Right: 458.00000000000000 Bottom: 20.00000000000000 ) (RectD.996 Left: 305.00000000000000 Top: 65.00000000000000 Right: 434.00000000000000 Bottom: 42.00000000000000 ) (RectD.997 Left: 114.00000000000000 Top: 172.00000000000000 Right: 268.00000000000000 Bottom: 75.00000000000000 ) (RectD.998 Left: 12.00000000000000 Top: 102.00000000000000 Right: 115.00000000000000 Bottom: 77.00000000000000 ) (CPanel.999 InternalName: "cpaOptions" ObjectTag: 33 Child: 1000 Child: 1001 Child: 1002 Child: 1003 Constraints: 0x55 ResBox: 1004 ResBox: 1005 ResBox: 1006 ResBox: 1007 Label: "Options" VisibleBorder: 1 Listening: 1 ) (LButn.1000 InternalName: "lbtModel" ObjectTag: 33 Label: "Model..." Click: "SM.Tree.Click" ) (LButn.1001 InternalName: "lbtSize" ObjectTag: 33 Label: "Size..." Click: "SM.Tree.Click" ) (LButn.1002 InternalName: "lbtPlots" ObjectTag: 33 Label: "Plots..." Click: "SM.Tree.Click" ) (AVCBox.1003 InternalName: "chkSample" ObjectTag: 33 Listening: 1 Label: "Make a table\nof sample data" Constraints: 0x55 ) (RectD.1004 Left: 38.00000000000000 Top: 60.00000000000000 Right: 92.00000000000000 Bottom: 34.00000000000000 ) (RectD.1005 Left: 38.00000000000000 Top: 97.00000000000000 Right: 92.00000000000000 Bottom: 71.00000000000000 ) (RectD.1006 Left: 38.00000000000000 Top: 135.00000000000000 Right: 92.00000000000000 Bottom: 109.00000000000000 ) (RectD.1007 Left: 3.00000000000000 Top: 199.00000000000000 Right: 122.00000000000000 Bottom: 155.00000000000000 ) (LButn.1008 InternalName: "lbtOK" ObjectTag: 33 Update: "SM.Tree.Update" Label: "OK" Click: "SM.Tree.Click" ) (LButn.1009 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.Tree.Click" ) (LButn.1010 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.Tree.Click" ) (LButn.1011 InternalName: "lbtLoad" ObjectTag: 33 Label: "Load Settings" Click: "SM.Tree.Click" ) (LButn.1012 InternalName: "lbtSave" ObjectTag: 33 Label: "Save Settings" Click: "SM.Tree.Click" ) (RectD.1013 Left: 10.00000000000000 Top: 36.00000000000000 Right: 501.00000000000000 Bottom: -1.00000000000000 ) (RectD.1014 Left: 11.00000000000000 Top: 294.00000000000000 Right: 501.00000000000000 Bottom: 37.00000000000000 ) (RectD.1015 Left: 11.00000000000000 Top: 401.00000000000000 Right: 501.00000000000000 Bottom: 297.00000000000000 ) (RectD.1016 Left: 508.00000000000000 Top: 401.00000000000000 Right: 635.00000000000000 Bottom: 190.00000000000000 ) (RectD.1017 Left: 546.00000000000000 Top: 36.00000000000000 Right: 600.00000000000000 Bottom: 11.00000000000000 ) (RectD.1018 Left: 546.00000000000000 Top: 72.00000000000000 Right: 600.00000000000000 Bottom: 47.00000000000000 ) (RectD.1019 Left: 546.00000000000000 Top: 109.00000000000000 Right: 600.00000000000000 Bottom: 83.00000000000000 ) (RectD.1020 Left: 523.00000000000000 Top: 149.00000000000000 Right: 624.00000000000000 Bottom: 120.00000000000000 ) (RectD.1021 Left: 523.00000000000000 Top: 182.00000000000000 Right: 624.00000000000000 Bottom: 153.00000000000000 ) (AVDLog.1022 Name: "SM.TreeFactors" X: 80 Y: 104 W: 316 H: 158 ConstrainedControlNames: 1023 ConstrainedControlNames: 1024 Constraints: 1025 Constraints: 1026 Server: 850 ControlPanel: 1027 ObjectTag: 33 Title: "Factors" Resizable: 1 AlwaysOnTop: 1 HasTitleBar: 1 Close: "SM.TreeFactors.Close" Open: "SM.TreeFactors.Open" DefaultButton: 1030 ) (AVStr.1023 S: "lbtOK" ) (AVStr.1024 S: "lbtCancel" ) (Numb.1025 N: 86.00000000000000 ) (Numb.1026 N: 86.00000000000000 ) (CPanel.1027 Child: 1028 Child: 1030 Child: 1031 Child: 1032 ResBox: 1033 ResBox: 1034 ResBox: 1035 ResBox: 1036 Listening: 1 ) (AVLBox.1028 InternalName: "lbxFactors" ObjectTag: 33 Update: "SM.TreeFactors.Update" NextControl: 850 ContentKind: 4 Constraints: 0x33 ColumnCount: 1 Listening: 1 VerticalScroll: 1 SelectionStyle: 1029 Apply: "SM.TreeFactors.Apply" ) (AVEnum.1029 Name: "LISTBOX_SELECTION_SINGLEROW" ) (LButn.1030 InternalName: "lbtOK" ObjectTag: 33 Label: "OK" Click: "SM.TreeFactors.Click" ) (LButn.1031 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.TreeFactors.Click" ) (TextLabel.1032 InternalName: "txlFactors" ObjectTag: 33 Constraints: 0x55 Label: "Double-click to use as a factor:" Listening: 1 ) (RectD.1033 Left: 17.00000000000000 Top: 144.00000000000000 Right: 234.00000000000000 Bottom: 37.00000000000000 ) (RectD.1034 Left: 247.00000000000000 Top: 74.00000000000000 Right: 301.00000000000000 Bottom: 47.00000000000000 ) (RectD.1035 Left: 247.00000000000000 Top: 109.00000000000000 Right: 301.00000000000000 Bottom: 82.00000000000000 ) (RectD.1036 Left: 17.00000000000000 Top: 33.00000000000000 Right: 218.00000000000000 Bottom: 14.00000000000000 ) (AVDLog.1037 Name: "SM.TreeModel" X: 53 Y: 99 W: 421 H: 246 ConstrainedControlNames: 1038 ConstrainedControlNames: 1039 ConstrainedControlNames: 1040 Constraints: 1041 Constraints: 1042 Constraints: 1043 Server: 850 ControlPanel: 1044 ObjectTag: 33 Title: "Model Options" AlwaysOnTop: 1 HasTitleBar: 1 Close: "SM.TreeModel.Close" Open: "SM.TreeModel.Open" DefaultButton: 1068 ) (AVStr.1038 S: "lbtOK" ) (AVStr.1039 S: "lbtCancel" ) (AVStr.1040 S: "lbtHelp" ) (Numb.1041 N: 85.00000000000000 ) (Numb.1042 N: 85.00000000000000 ) (Numb.1043 N: 85.00000000000000 ) (CPanel.1044 Child: 1045 Child: 1046 Child: 1047 Child: 1063 Child: 1068 Child: 1069 Child: 1070 ResBox: 1071 ResBox: 1072 ResBox: 1073 ResBox: 1074 ResBox: 1075 ResBox: 1076 ResBox: 1077 Listening: 1 ) (AVCBox.1045 InternalName: "chkDefault" ObjectTag: 33 Update: "SM.TreeModel.Update" Listening: 1 Selected: 1 Label: "Use default parameters" Click: "SM.TreeModel.Click" Constraints: 0x55 ) (AVCBox.1046 InternalName: "chkFull" ObjectTag: 33 Update: "SM.TreeModel.Update" Listening: 1 Label: "Fit full tree" Click: "SM.TreeModel.Click" Constraints: 0x55 ) (CPanel.1047 InternalName: "cpaParms" Disabled: 1 ObjectTag: 33 Update: "SM.TreeModel.Update" Child: 1048 Child: 1049 Child: 1051 Child: 1052 Child: 1054 Child: 1055 Constraints: 0x55 ResBox: 1057 ResBox: 1058 ResBox: 1059 ResBox: 1060 ResBox: 1061 ResBox: 1062 Label: "Parameters (any left blank will use default values)" VisibleBorder: 1 Listening: 1 ) (TextLabel.1048 InternalName: "txtMinSize" ObjectTag: 33 Constraints: 0x55 Label: "Split threshold:" Listening: 1 ) (TextLine.1049 InternalName: "txlMinSize" ObjectTag: 33 Constraints: 0x55 Listening: 1 TextType: 1050 NextControl: 850 ) (AVEnum.1050 Name: "TEXTLINE_TYPE_INTEGER" ) (TextLabel.1051 InternalName: "txtMinCut" ObjectTag: 33 Constraints: 0x55 Label: "Minimum node size:" Listening: 1 ) (TextLine.1052 InternalName: "txlMinCut" ObjectTag: 33 Constraints: 0x55 Listening: 1 TextType: 1053 NextControl: 850 ) (AVEnum.1053 Name: "TEXTLINE_TYPE_INTEGER" ) (TextLabel.1054 InternalName: "txtMinDev" ObjectTag: 33 Constraints: 0x55 Label: "Minimum node deviance:" Listening: 1 ) (TextLine.1055 InternalName: "txlMinDev" ObjectTag: 33 Text: "0.01" Constraints: 0x55 Listening: 1 TextType: 1056 NextControl: 850 ) (AVEnum.1056 Name: "TEXTLINE_TYPE_REAL" ) (RectD.1057 Left: 18.00000000000000 Top: 45.00000000000000 Right: 117.00000000000000 Bottom: 24.00000000000000 ) (RectD.1058 Left: 114.00000000000000 Top: 42.00000000000000 Right: 173.00000000000000 Bottom: 22.00000000000000 ) (RectD.1059 Left: 18.00000000000000 Top: 72.00000000000000 Right: 146.00000000000000 Bottom: 51.00000000000000 ) (RectD.1060 Left: 146.00000000000000 Top: 69.00000000000000 Right: 205.00000000000000 Bottom: 49.00000000000000 ) (RectD.1061 Left: 18.00000000000000 Top: 99.00000000000000 Right: 179.00000000000000 Bottom: 78.00000000000000 ) (RectD.1062 Left: 178.00000000000000 Top: 96.00000000000000 Right: 237.00000000000000 Bottom: 76.00000000000000 ) (CPanel.1063 InternalName: "cpaMissing" ObjectTag: 33 Child: 1064 Child: 1065 Constraints: 0x55 ResBox: 1066 ResBox: 1067 Label: "Missing Values" VisibleBorder: 1 Listening: 1 ) (RButn.1064 InternalName: "radExclude" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Exclude observations with missing data" ) (RButn.1065 InternalName: "radFactor" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Create a NODATA level for factors with missing values" ) (RectD.1066 Left: 14.00000000000000 Top: 47.00000000000000 Right: 336.00000000000000 Bottom: 23.00000000000000 ) (RectD.1067 Left: 14.00000000000000 Top: 68.00000000000000 Right: 387.00000000000000 Bottom: 44.00000000000000 ) (LButn.1068 InternalName: "lbtOK" ObjectTag: 33 Label: "OK" Click: "SM.TreeModel.Click" ) (LButn.1069 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.TreeModel.Click" ) (LButn.1070 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.TreeModel.Click" ) (RectD.1071 Left: 20.00000000000000 Top: 36.00000000000000 Right: 210.00000000000000 Bottom: 15.00000000000000 ) (RectD.1072 Left: 223.00000000000000 Top: 36.00000000000000 Right: 338.00000000000000 Bottom: 15.00000000000000 ) (RectD.1073 Left: 20.00000000000000 Top: 155.00000000000000 Right: 344.00000000000000 Bottom: 44.00000000000000 ) (RectD.1074 Left: 20.00000000000000 Top: 238.00000000000000 Right: 407.00000000000000 Bottom: 160.00000000000000 ) (RectD.1075 Left: 356.00000000000000 Top: 59.00000000000000 Right: 406.00000000000000 Bottom: 34.00000000000000 ) (RectD.1076 Left: 356.00000000000000 Top: 94.00000000000000 Right: 406.00000000000000 Bottom: 69.00000000000000 ) (RectD.1077 Left: 356.00000000000000 Top: 130.00000000000000 Right: 406.00000000000000 Bottom: 105.00000000000000 ) (AVDLog.1078 Name: "SM.TreeParms" X: 88 Y: 83 W: 318 H: 114 ConstrainedControlNames: 1079 ConstrainedControlNames: 1080 ConstrainedControlNames: 1081 Constraints: 1082 Constraints: 1083 Constraints: 1084 Server: 1085 ControlPanel: 1086 ObjectTag: 33 Title: "CART Model" Modal: 1 Resizable: 1 AlwaysOnTop: 1 HasTitleBar: 1 Open: "SM.TreeParms.Open" DefaultButton: 1092 ) (AVStr.1079 S: "lbtNext" ) (AVStr.1080 S: "lbtCancel" ) (AVStr.1081 S: "lbtHelp" ) (Numb.1082 N: 86.00000000000000 ) (Numb.1083 N: 86.00000000000000 ) (Numb.1084 N: 86.00000000000000 ) (Nil.1085 ) (CPanel.1086 Child: 1087 Child: 1088 Child: 1089 Child: 1090 Child: 1091 Child: 1092 Child: 1093 Child: 1094 ResBox: 1095 ResBox: 1096 ResBox: 1097 ResBox: 1098 ResBox: 1099 ResBox: 1100 ResBox: 1101 ResBox: 1102 Listening: 1 ) (TextLabel.1087 InternalName: "txtVar" ObjectTag: 33 Constraints: 0x53 Label: "Variable:" Listening: 1 ) (AVCBBox.1088 InternalName: "cbxTheme" ObjectTag: 33 NextControl: 1085 ContentKind: 4 Constraints: 0x53 Listening: 1 Select: "SM.TreeParms.Select" ) (AVCBBox.1089 InternalName: "cbxField" ObjectTag: 33 Update: "SM.TreeParms.Update" NextControl: 1085 ContentKind: 4 Constraints: 0x53 Listening: 1 Select: "SM.TreeParms.Select" ) (TextLabel.1090 InternalName: "txtTheme" ObjectTag: 33 Constraints: 0x55 Label: "Theme:" Listening: 1 ) (TextLabel.1091 InternalName: "txtField" ObjectTag: 33 Constraints: 0x55 Label: "Field:" Listening: 1 ) (LButn.1092 InternalName: "lbtNext" ObjectTag: 33 Update: "SM.TreeParms.Update" Label: "Next" Click: "SM.TreeParms.Click" ) (LButn.1093 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.TreeParms.Click" ) (LButn.1094 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.TreeParms.Click" ) (RectD.1095 Left: 14.00000000000000 Top: 36.00000000000000 Right: 247.00000000000000 Bottom: 18.00000000000000 ) (RectD.1096 Left: 63.00000000000000 Top: 140.00000000000000 Right: 239.00000000000000 Bottom: 50.00000000000000 ) (RectD.1097 Left: 63.00000000000000 Top: 170.00000000000000 Right: 238.00000000000000 Bottom: 78.00000000000000 ) (RectD.1098 Left: 14.00000000000000 Top: 67.00000000000000 Right: 65.00000000000000 Bottom: 48.00000000000000 ) (RectD.1099 Left: 14.00000000000000 Top: 97.00000000000000 Right: 58.00000000000000 Bottom: 78.00000000000000 ) (RectD.1100 Left: 258.00000000000000 Top: 35.00000000000000 Right: 310.00000000000000 Bottom: 10.00000000000000 ) (RectD.1101 Left: 258.00000000000000 Top: 67.00000000000000 Right: 310.00000000000000 Bottom: 42.00000000000000 ) (RectD.1102 Left: 258.00000000000000 Top: 99.00000000000000 Right: 310.00000000000000 Bottom: 74.00000000000000 ) (AVDLog.1103 Name: "SM.TreePlots" X: 68 Y: 107 W: 400 H: 365 ConstrainedControlNames: 1104 ConstrainedControlNames: 1105 ConstrainedControlNames: 1106 Constraints: 1107 Constraints: 1108 Constraints: 1109 Server: 903 ControlPanel: 1110 ObjectTag: 33 Title: "Plots" AlwaysOnTop: 1 HasTitleBar: 1 Close: "SM.TreePlots.Close" Open: "SM.TreePlots.Open" DefaultButton: 1136 ) (AVStr.1104 S: "lbtOK" ) (AVStr.1105 S: "lbtCancel" ) (AVStr.1106 S: "lbtHelp" ) (Numb.1107 N: 85.00000000000000 ) (Numb.1108 N: 85.00000000000000 ) (Numb.1109 N: 85.00000000000000 ) (CPanel.1110 Child: 1111 Child: 1116 Child: 1127 Child: 1136 Child: 1137 Child: 1138 ResBox: 1139 ResBox: 1140 ResBox: 1141 ResBox: 1142 ResBox: 1143 ResBox: 1144 Listening: 1 ) (CPanel.1111 InternalName: "cpaFormat" ObjectTag: 33 Child: 1112 Child: 1113 Constraints: 0x55 ResBox: 1114 ResBox: 1115 Label: "Format" VisibleBorder: 1 Listening: 1 ) (RButn.1112 InternalName: "radSPlus" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Show plots in S-PLUS\n(can be manually exported)" ) (RButn.1113 InternalName: "radPdf" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Save plots to PDF file\n(you will be prompted for a filename)" ) (RectD.1114 Left: 10.00000000000000 Top: 67.00000000000000 Right: 255.00000000000000 Bottom: 22.00000000000000 ) (RectD.1115 Left: 10.00000000000000 Top: 109.00000000000000 Right: 278.00000000000000 Bottom: 67.00000000000000 ) (CPanel.1116 InternalName: "cpaAll" ObjectTag: 33 Child: 1117 Child: 1118 Child: 1123 Constraints: 0x55 ResBox: 1124 ResBox: 1125 ResBox: 1126 Label: "All Trees" VisibleBorder: 1 Listening: 1 ) (AVCBox.1117 InternalName: "chkTree" ObjectTag: 33 Listening: 1 Label: "Graphical plot of the final tree" Click: "SM.TreePlots.Click" Constraints: 0x55 ) (CPanel.1118 InternalName: "cpaBranch" Disabled: 1 ObjectTag: 33 Update: "SM.TreePlots.Update" Child: 1119 Child: 1120 Constraints: 0x55 ResBox: 1121 ResBox: 1122 Listening: 1 ) (RButn.1119 InternalName: "radDeviance" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Branch length based on deviance" ) (RButn.1120 InternalName: "radUniform" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Branch length uniform" ) (RectD.1121 Left: 4.00000000000000 Top: 27.00000000000000 Right: 250.00000000000000 Bottom: 5.00000000000000 ) (RectD.1122 Left: 4.00000000000000 Top: 53.00000000000000 Right: 171.00000000000000 Bottom: 25.00000000000000 ) (AVCBox.1123 InternalName: "chkDev" ObjectTag: 33 Listening: 1 Label: "Plot of deviance vs. size of trees" Constraints: 0x55 ) (RectD.1124 Left: 10.00000000000000 Top: 39.00000000000000 Right: 234.00000000000000 Bottom: 17.00000000000000 ) (RectD.1125 Left: 36.00000000000000 Top: 87.00000000000000 Right: 291.00000000000000 Bottom: 37.00000000000000 ) (RectD.1126 Left: 10.00000000000000 Top: 112.00000000000000 Right: 263.00000000000000 Bottom: 90.00000000000000 ) (CPanel.1127 InternalName: "cpaReg" ObjectTag: 33 Update: "SM.TreePlots.Update" Child: 1128 Child: 1129 Child: 1130 Child: 1131 Constraints: 0x55 ResBox: 1132 ResBox: 1133 ResBox: 1134 ResBox: 1135 Label: "Regression Trees Only" VisibleBorder: 1 Listening: 1 ) (AVCBox.1128 InternalName: "chkProbOrig" ObjectTag: 33 Listening: 1 Label: "Normal probability plot of original tree" Constraints: 0x55 ) (AVCBox.1129 InternalName: "chkProbFit" ObjectTag: 33 Listening: 1 Label: "Normal probability plot of fitted tree" Constraints: 0x55 ) (AVCBox.1130 InternalName: "chkResidOrig" ObjectTag: 33 Listening: 1 Label: "Residuals vs. predictions for original tree" Constraints: 0x55 ) (AVCBox.1131 InternalName: "chkResidFit" ObjectTag: 33 Listening: 1 Label: "Residuals vs. predictions for fitted tree" Constraints: 0x55 ) (RectD.1132 Left: 10.00000000000000 Top: 44.00000000000000 Right: 277.00000000000000 Bottom: 20.00000000000000 ) (RectD.1133 Left: 10.00000000000000 Top: 64.00000000000000 Right: 279.00000000000000 Bottom: 40.00000000000000 ) (RectD.1134 Left: 10.00000000000000 Top: 85.00000000000000 Right: 294.00000000000000 Bottom: 61.00000000000000 ) (RectD.1135 Left: 10.00000000000000 Top: 105.00000000000000 Right: 286.00000000000000 Bottom: 81.00000000000000 ) (LButn.1136 InternalName: "lbtOK" ObjectTag: 33 Label: "OK" Click: "SM.TreePlots.Click" ) (LButn.1137 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.TreePlots.Click" ) (LButn.1138 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.TreePlots.Click" ) (RectD.1139 Left: 16.00000000000000 Top: 119.00000000000000 Right: 320.00000000000000 Bottom: 2.00000000000000 ) (RectD.1140 Left: 16.00000000000000 Top: 235.00000000000000 Right: 320.00000000000000 Bottom: 119.00000000000000 ) (RectD.1141 Left: 16.00000000000000 Top: 353.00000000000000 Right: 320.00000000000000 Bottom: 239.00000000000000 ) (RectD.1142 Left: 337.00000000000000 Top: 56.00000000000000 Right: 391.00000000000000 Bottom: 29.00000000000000 ) (RectD.1143 Left: 337.00000000000000 Top: 95.00000000000000 Right: 391.00000000000000 Bottom: 67.00000000000000 ) (RectD.1144 Left: 337.00000000000000 Top: 132.00000000000000 Right: 391.00000000000000 Bottom: 105.00000000000000 ) (AVDLog.1145 Name: "SM.TreePredict" X: 43 Y: 73 W: 420 H: 144 ConstrainedControlNames: 1146 ConstrainedControlNames: 1147 ConstrainedControlNames: 1148 Constraints: 1149 Constraints: 1150 Constraints: 1151 Server: 903 ControlPanel: 1152 ObjectTag: 33 Title: "Predictions" Modal: 1 AlwaysOnTop: 1 HasTitleBar: 1 Open: "SM.TreePredict.Open" DefaultButton: 1164 ) (AVStr.1146 S: "lbtOK" ) (AVStr.1147 S: "lbtCancel" ) (AVStr.1148 S: "lbtHelp" ) (Numb.1149 N: 85.00000000000000 ) (Numb.1150 N: 85.00000000000000 ) (Numb.1151 N: 85.00000000000000 ) (CPanel.1152 Child: 1153 Child: 1163 Child: 1164 Child: 1165 Child: 1166 ResBox: 1167 ResBox: 1168 ResBox: 1169 ResBox: 1170 ResBox: 1171 Listening: 1 ) (CPanel.1153 InternalName: "cpaPred" ObjectTag: 33 Child: 1154 Child: 1155 Child: 1156 Child: 1157 Constraints: 0x55 ResBox: 1159 ResBox: 1160 ResBox: 1161 ResBox: 1162 Listening: 1 ) (RButn.1154 InternalName: "radNoData" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "NODATA" Click: "SM.TreePredict.Click" ) (RButn.1155 InternalName: "radNode" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Value from the deepest node reached" Click: "SM.TreePredict.Click" ) (RButn.1156 InternalName: "radOther" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Other" Click: "SM.TreePredict.Click" ) (TextLine.1157 InternalName: "txlOther" ObjectTag: 33 Update: "SM.TreePredict.Update" Constraints: 0x55 Listening: 1 TextType: 1158 Changed: "SM.TreePredict.Changed" NextControl: 903 ) (AVEnum.1158 Name: "TEXTLINE_TYPE_ALL" ) (RectD.1159 Left: 9.00000000000000 Top: 32.00000000000000 Right: 95.00000000000000 Bottom: 10.00000000000000 ) (RectD.1160 Left: 9.00000000000000 Top: 56.00000000000000 Right: 298.00000000000000 Bottom: 34.00000000000000 ) (RectD.1161 Left: 9.00000000000000 Top: 80.00000000000000 Right: 75.00000000000000 Bottom: 58.00000000000000 ) (RectD.1162 Left: 70.00000000000000 Top: 78.00000000000000 Right: 119.00000000000000 Bottom: 58.00000000000000 ) (TextLabel.1163 InternalName: "txtPredict" ObjectTag: 33 Constraints: 0x55 Label: "When mapping results, what value should areas\nget that do not key out according to the final tree?" Listening: 1 ) (LButn.1164 InternalName: "lbtOK" ObjectTag: 33 Update: "SM.TreePredict.Update" Label: "OK" Click: "SM.TreePredict.Click" ) (LButn.1165 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.TreePredict.Click" ) (LButn.1166 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.TreePredict.Click" ) (RectD.1167 Left: 12.00000000000000 Top: 135.00000000000000 Right: 330.00000000000000 Bottom: 46.00000000000000 ) (RectD.1168 Left: 18.00000000000000 Top: 51.00000000000000 Right: 341.00000000000000 Bottom: 9.00000000000000 ) (RectD.1169 Left: 354.00000000000000 Top: 49.00000000000000 Right: 409.00000000000000 Bottom: 22.00000000000000 ) (RectD.1170 Left: 354.00000000000000 Top: 83.00000000000000 Right: 409.00000000000000 Bottom: 56.00000000000000 ) (RectD.1171 Left: 354.00000000000000 Top: 116.00000000000000 Right: 409.00000000000000 Bottom: 89.00000000000000 ) (AVDLog.1172 Name: "SM.TreeSize" X: 46 Y: 62 W: 544 H: 479 ConstrainedControlNames: 1173 ConstrainedControlNames: 1174 ConstrainedControlNames: 1175 Constraints: 1176 Constraints: 1177 Constraints: 1178 Server: 903 ControlPanel: 1179 ObjectTag: 33 Title: "Tree Size" AlwaysOnTop: 1 HasTitleBar: 1 Close: "SM.TreeSize.Close" Open: "SM.TreeSize.Open" DefaultButton: 1243 ) (AVStr.1173 S: "lbtOK" ) (AVStr.1174 S: "lbtCancel" ) (AVStr.1175 S: "lbtHelp" ) (Numb.1176 N: 85.00000000000000 ) (Numb.1177 N: 85.00000000000000 ) (Numb.1178 N: 85.00000000000000 ) (CPanel.1179 Child: 1180 Child: 1203 Child: 1204 Child: 1221 Child: 1232 Child: 1243 Child: 1244 Child: 1245 ResBox: 1246 ResBox: 1247 ResBox: 1248 ResBox: 1249 ResBox: 1250 ResBox: 1251 ResBox: 1252 ResBox: 1253 Listening: 1 ) (CPanel.1180 InternalName: "cpaData" ObjectTag: 33 Update: "SM.TreeSize.Update" Child: 1181 Child: 1182 Child: 1183 Child: 1196 Child: 1197 Constraints: 0x55 ResBox: 1198 ResBox: 1199 ResBox: 1200 ResBox: 1201 ResBox: 1202 Label: "Evaluation Data" VisibleBorder: 1 Listening: 1 ) (TextLabel.1181 InternalName: "txtData" ObjectTag: 33 Constraints: 0x55 Label: "Data to evaluate pruned/shrunken tree:" Listening: 1 ) (RButn.1182 InternalName: "radGrow" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Use data used to grow the tree" Click: "SM.TreeSize.Click" ) (CPanel.1183 InternalName: "cpaNewData" ObjectTag: 33 Update: "SM.TreeSize.Update" Child: 1184 Child: 1185 Child: 1186 Child: 1187 Child: 1188 Child: 1189 Constraints: 0x55 ResBox: 1190 ResBox: 1191 ResBox: 1192 ResBox: 1193 ResBox: 1194 ResBox: 1195 Listening: 1 ) (TextLabel.1184 InternalName: "txtTheme" ObjectTag: 33 Constraints: 0x55 Label: "Theme:" Listening: 1 ) (AVCBBox.1185 InternalName: "cbxNDTheme" ObjectTag: 33 Update: "SM.TreeSize.Update" NextControl: 903 ContentKind: 4 Constraints: 0x55 Listening: 1 Select: "SM.TreeSize.Select" ) (TextLabel.1186 InternalName: "txtField" ObjectTag: 33 Constraints: 0x55 Label: "Field:" Listening: 1 ) (AVCBBox.1187 InternalName: "cbxNDField" ObjectTag: 33 Update: "SM.TreeSize.Update" NextControl: 903 ContentKind: 4 Constraints: 0x55 Listening: 1 Select: "SM.TreeSize.Select" ) (AVCBBox.1188 InternalName: "cbxNDIDField" ObjectTag: 33 Update: "SM.TreeSize.Update" NextControl: 903 ContentKind: 4 Constraints: 0x55 Listening: 1 Select: "SM.TreeSize.Select" ) (TextLabel.1189 InternalName: "txtNDIDField" ObjectTag: 33 Constraints: 0x55 Label: "Polygon ID field:" Listening: 1 ) (RectD.1190 Left: 69.00000000000000 Top: 35.00000000000000 Right: 122.00000000000000 Bottom: 18.00000000000000 ) (RectD.1191 Left: 121.00000000000000 Top: 120.00000000000000 Right: 284.00000000000000 Bottom: 16.00000000000000 ) (RectD.1192 Left: 83.00000000000000 Top: 61.00000000000000 Right: 121.00000000000000 Bottom: 44.00000000000000 ) (RectD.1193 Left: 121.00000000000000 Top: 140.00000000000000 Right: 284.00000000000000 Bottom: 43.00000000000000 ) (RectD.1194 Left: 121.00000000000000 Top: 158.00000000000000 Right: 284.00000000000000 Bottom: 69.00000000000000 ) (RectD.1195 Left: 16.00000000000000 Top: 93.00000000000000 Right: 121.00000000000000 Bottom: 71.00000000000000 ) (RButn.1196 InternalName: "radNewData" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Use different data set" Click: "SM.TreeSize.Click" ) (AVCBox.1197 InternalName: "chkNDSelected" ObjectTag: 33 Listening: 1 Label: "Use selected records only" Constraints: 0x55 ) (RectD.1198 Left: 18.00000000000000 Top: 47.00000000000000 Right: 285.00000000000000 Bottom: 25.00000000000000 ) (RectD.1199 Left: 21.00000000000000 Top: 71.00000000000000 Right: 251.00000000000000 Bottom: 49.00000000000000 ) (RectD.1200 Left: 33.00000000000000 Top: 181.00000000000000 Right: 338.00000000000000 Bottom: 82.00000000000000 ) (RectD.1201 Left: 21.00000000000000 Top: 93.00000000000000 Right: 209.00000000000000 Bottom: 71.00000000000000 ) (RectD.1202 Left: 21.00000000000000 Top: 208.00000000000000 Right: 271.00000000000000 Bottom: 185.00000000000000 ) (AVCBox.1203 InternalName: "chkAuto" ObjectTag: 33 Listening: 1 Selected: 1 Label: "Automatic tree selection" Click: "SM.TreeSize.Click" Constraints: 0x55 ) (CPanel.1204 InternalName: "cpaSize" ObjectTag: 33 Update: "SM.TreeSize.Update" Child: 1205 Child: 1206 Child: 1207 Child: 1208 Child: 1209 Child: 1211 Child: 1212 Constraints: 0x55 ResBox: 1214 ResBox: 1215 ResBox: 1216 ResBox: 1217 ResBox: 1218 ResBox: 1219 ResBox: 1220 Label: "Degree of Pruning/Shrinking" VisibleBorder: 1 Listening: 1 ) (RButn.1205 InternalName: "radSE" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "One standard error rule" Click: "SM.TreeSize.Click" ) (RButn.1206 InternalName: "radAIC" ObjectTag: 33 Update: "SM.TreeSize.Update" Constraints: 0x55 Listening: 1 Label: "Akaike's information criterion\n(classification trees)" Click: "SM.TreeSize.Click" ) (RButn.1207 InternalName: "radCp" ObjectTag: 33 Update: "SM.TreeSize.Update" Constraints: 0x55 Listening: 1 Label: "Mallow's Cp (regression trees)" Click: "SM.TreeSize.Click" ) (RButn.1208 InternalName: "radSize" ObjectTag: 33 Update: "SM.TreeSize.Update" Constraints: 0x55 Listening: 1 Label: "Size:" Click: "SM.TreeSize.Click" ) (TextLine.1209 InternalName: "txlSize" ObjectTag: 33 Update: "SM.TreeSize.Update" Constraints: 0x55 Listening: 1 TextType: 1210 Changed: "SM.TreeSize.Changed" NextControl: 903 ) (AVEnum.1210 Name: "TEXTLINE_TYPE_INTEGER" ) (RButn.1211 InternalName: "radK" ObjectTag: 33 Update: "SM.TreeSize.Update" Constraints: 0x55 Listening: 1 Label: "Cost-complexity parameter:" Click: "SM.TreeSize.Click" ) (TextLine.1212 InternalName: "txlK" ObjectTag: 33 Update: "SM.TreeSize.Update" Constraints: 0x55 Listening: 1 TextType: 1213 Changed: "SM.TreeSize.Changed" NextControl: 903 ) (AVEnum.1213 Name: "TEXTLINE_TYPE_REAL" ) (RectD.1214 Left: 11.00000000000000 Top: 58.00000000000000 Right: 198.00000000000000 Bottom: 24.00000000000000 ) (RectD.1215 Left: 11.00000000000000 Top: 97.00000000000000 Right: 235.00000000000000 Bottom: 58.00000000000000 ) (RectD.1216 Left: 11.00000000000000 Top: 130.00000000000000 Right: 251.00000000000000 Bottom: 97.00000000000000 ) (RectD.1217 Left: 11.00000000000000 Top: 162.00000000000000 Right: 63.00000000000000 Bottom: 126.00000000000000 ) (RectD.1218 Left: 63.00000000000000 Top: 156.00000000000000 Right: 103.00000000000000 Bottom: 136.00000000000000 ) (RectD.1219 Left: 11.00000000000000 Top: 196.00000000000000 Right: 212.00000000000000 Bottom: 162.00000000000000 ) (RectD.1220 Left: 212.00000000000000 Top: 190.00000000000000 Right: 252.00000000000000 Bottom: 170.00000000000000 ) (CPanel.1221 InternalName: "cpaMethod" ObjectTag: 33 Update: "SM.TreeSize.Update" Child: 1222 Child: 1223 Child: 1228 Constraints: 0x55 ResBox: 1229 ResBox: 1230 ResBox: 1231 Label: "Method" VisibleBorder: 1 Listening: 1 ) (RButn.1222 InternalName: "radPrune" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Prune" Click: "SM.TreeSize.Click" ) (CPanel.1223 InternalName: "cpaPruneMethod" ObjectTag: 33 Update: "SM.TreeSize.Update" Child: 1224 Child: 1225 Constraints: 0x55 ResBox: 1226 ResBox: 1227 Listening: 1 ) (RButn.1224 InternalName: "radDeviance" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Deviance" ) (RButn.1225 InternalName: "radMisclass" ObjectTag: 33 Update: "SM.TreeSize.Update" Constraints: 0x55 Listening: 1 Label: "Misclassification rate" ) (RectD.1226 Left: 5.00000000000000 Top: 27.00000000000000 Right: 96.00000000000000 Bottom: 9.00000000000000 ) (RectD.1227 Left: 5.00000000000000 Top: 47.00000000000000 Right: 167.00000000000000 Bottom: 28.00000000000000 ) (RButn.1228 InternalName: "radShrink" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Shrink" Click: "SM.TreeSize.Click" ) (RectD.1229 Left: 23.00000000000000 Top: 38.00000000000000 Right: 100.00000000000000 Bottom: 21.00000000000000 ) (RectD.1230 Left: 46.00000000000000 Top: 84.00000000000000 Right: 213.00000000000000 Bottom: 31.00000000000000 ) (RectD.1231 Left: 23.00000000000000 Top: 101.00000000000000 Right: 93.00000000000000 Bottom: 79.00000000000000 ) (CPanel.1232 InternalName: "cpaCV" ObjectTag: 33 Update: "SM.TreeSize.Update" Child: 1233 Child: 1234 Constraints: 0x55 ResBox: 1241 ResBox: 1242 Label: "Cross-validation" VisibleBorder: 1 Listening: 1 ) (AVCBox.1233 InternalName: "chkCV" ObjectTag: 33 Listening: 1 Selected: 1 Label: "Use cross-validation" Click: "SM.TreeSize.Click" Constraints: 0x55 ) (CPanel.1234 InternalName: "cpaCVOpts" ObjectTag: 33 Update: "SM.TreeSize.Update" Child: 1235 Child: 1237 Constraints: 0x55 ResBox: 1239 ResBox: 1240 Listening: 1 ) (TextLine.1235 InternalName: "txlReps" ObjectTag: 33 Text: "5" Label: "Number of cv repetitions:" LabelSize: 160 Constraints: 0x55 Listening: 1 TextType: 1236 NextControl: 903 ) (AVEnum.1236 Name: "TEXTLINE_TYPE_INTEGER" ) (TextLine.1237 InternalName: "txlSeed" ObjectTag: 33 Label: "Random number seed:" LabelSize: 160 Constraints: 0x55 Listening: 1 TextType: 1238 NextControl: 903 ) (AVEnum.1238 Name: "TEXTLINE_TYPE_INTEGER" ) (RectD.1239 Left: 9.00000000000000 Top: 32.00000000000000 Right: 230.00000000000000 Bottom: 12.00000000000000 ) (RectD.1240 Left: 9.00000000000000 Top: 58.00000000000000 Right: 230.00000000000000 Bottom: 38.00000000000000 ) (RectD.1241 Left: 7.00000000000000 Top: 41.00000000000000 Right: 164.00000000000000 Bottom: 24.00000000000000 ) (RectD.1242 Left: 11.00000000000000 Top: 100.00000000000000 Right: 250.00000000000000 Bottom: 36.00000000000000 ) (LButn.1243 InternalName: "lbtOK" ObjectTag: 33 Update: "SM.TreeSize.Update" Label: "OK" Click: "SM.TreeSize.Click" ) (LButn.1244 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.TreeSize.Click" ) (LButn.1245 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.TreeSize.Click" ) (RectD.1246 Left: 11.00000000000000 Top: 222.00000000000000 Right: 355.00000000000000 Bottom: 6.00000000000000 ) (RectD.1247 Left: 11.00000000000000 Top: 247.00000000000000 Right: 218.00000000000000 Bottom: 229.00000000000000 ) (RectD.1248 Left: 11.00000000000000 Top: 467.00000000000000 Right: 276.00000000000000 Bottom: 253.00000000000000 ) (RectD.1249 Left: 283.00000000000000 Top: 361.00000000000000 Right: 538.00000000000000 Bottom: 253.00000000000000 ) (RectD.1250 Left: 283.00000000000000 Top: 467.00000000000000 Right: 538.00000000000000 Bottom: 364.00000000000000 ) (RectD.1251 Left: 435.00000000000000 Top: 60.00000000000000 Right: 488.00000000000000 Bottom: 33.00000000000000 ) (RectD.1252 Left: 435.00000000000000 Top: 97.00000000000000 Right: 488.00000000000000 Bottom: 70.00000000000000 ) (RectD.1253 Left: 435.00000000000000 Top: 134.00000000000000 Right: 488.00000000000000 Bottom: 107.00000000000000 ) (AVDLog.1254 Name: "SM.VectorGrid" X: 88 Y: 123 W: 375 H: 464 ConstrainedControlNames: 1255 ConstrainedControlNames: 1256 ConstrainedControlNames: 1257 ConstrainedControlNames: 1258 Constraints: 1259 Constraints: 1260 Constraints: 1261 Constraints: 1262 Server: 850 ControlPanel: 1263 ObjectTag: 33 Title: "Vector to Grid Conversion" Modal: 1 AlwaysOnTop: 1 HasTitleBar: 1 Open: "SM.VectorGrid.Open" DefaultButton: 1303 ) (AVStr.1255 S: "lbtArea" ) (AVStr.1256 S: "lbtNext" ) (AVStr.1257 S: "lbtCancel" ) (AVStr.1258 S: "lbtHelp" ) (Numb.1259 N: 85.00000000000000 ) (Numb.1260 N: 85.00000000000000 ) (Numb.1261 N: 85.00000000000000 ) (Numb.1262 N: 85.00000000000000 ) (CPanel.1263 Child: 1264 Child: 1271 Child: 1272 Child: 1284 Child: 1303 Child: 1304 Child: 1305 ResBox: 1306 ResBox: 1307 ResBox: 1308 ResBox: 1309 ResBox: 1310 ResBox: 1311 ResBox: 1312 Listening: 1 ) (CPanel.1264 InternalName: "cpaInfo" ObjectTag: 33 Child: 1265 Child: 1266 Child: 1267 Constraints: 0x55 ResBox: 1268 ResBox: 1269 ResBox: 1270 Label: "Info" VisibleBorder: 1 Listening: 1 ) (TextLabel.1265 InternalName: "txtTheme" ObjectTag: 33 Constraints: 0x55 Label: "Theme:" Listening: 1 ) (TextLabel.1266 InternalName: "txtField" ObjectTag: 33 Constraints: 0x55 Label: "Field:" Listening: 1 ) (TextLabel.1267 InternalName: "txtArea" ObjectTag: 33 Constraints: 0x55 Label: "Smallest polygon:" Listening: 1 ) (RectD.1268 Left: 14.00000000000000 Top: 35.00000000000000 Right: 261.00000000000000 Bottom: 18.00000000000000 ) (RectD.1269 Left: 14.00000000000000 Top: 59.00000000000000 Right: 261.00000000000000 Bottom: 42.00000000000000 ) (RectD.1270 Left: 14.00000000000000 Top: 86.00000000000000 Right: 261.00000000000000 Bottom: 64.00000000000000 ) (LButn.1271 InternalName: "lbtArea" ObjectTag: 33 Label: "Find smallest polygon" Click: "SM.VectorGrid.Click" ) (CPanel.1272 InternalName: "cpaSize" ObjectTag: 33 Child: 1273 Child: 1274 Child: 1275 Child: 1276 Child: 1277 Constraints: 0x55 ResBox: 1279 ResBox: 1280 ResBox: 1281 ResBox: 1282 ResBox: 1283 Label: "Intermediate Cell Size" VisibleBorder: 1 Listening: 1 ) (RButn.1273 InternalName: "radFourth" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "1/4 of the smallest polygon" Click: "SM.VectorGrid.Click" ) (RButn.1274 InternalName: "radSame" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Same as the smallest polygon" Click: "SM.VectorGrid.Click" ) (RButn.1275 InternalName: "radTarget" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Target cell size" Click: "SM.VectorGrid.Click" ) (RButn.1276 InternalName: "radOther" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Other:" Click: "SM.VectorGrid.Click" ) (TextLine.1277 InternalName: "txlOther" ObjectTag: 33 Update: "SM.VectorGrid.Update" Constraints: 0x55 Listening: 1 TextType: 1278 Changed: "SM.VectorGrid.Click" NextControl: 850 ) (AVEnum.1278 Name: "TEXTLINE_TYPE_REAL" ) (RectD.1279 Left: 14.00000000000000 Top: 55.00000000000000 Right: 266.00000000000000 Bottom: 33.00000000000000 ) (RectD.1280 Left: 14.00000000000000 Top: 79.00000000000000 Right: 267.00000000000000 Bottom: 57.00000000000000 ) (RectD.1281 Left: 14.00000000000000 Top: 103.00000000000000 Right: 243.00000000000000 Bottom: 81.00000000000000 ) (RectD.1282 Left: 14.00000000000000 Top: 127.00000000000000 Right: 87.00000000000000 Bottom: 105.00000000000000 ) (RectD.1283 Left: 74.00000000000000 Top: 126.00000000000000 Right: 145.00000000000000 Bottom: 106.00000000000000 ) (CPanel.1284 InternalName: "cpaResample" ObjectTag: 33 Child: 1285 Child: 1286 Child: 1287 Child: 1288 Child: 1289 Child: 1290 Child: 1291 Child: 1292 Child: 1293 Constraints: 0x55 ResBox: 1294 ResBox: 1295 ResBox: 1296 ResBox: 1297 ResBox: 1298 ResBox: 1299 ResBox: 1300 ResBox: 1301 ResBox: 1302 Label: "Resample Method" VisibleBorder: 1 Listening: 1 ) (RButn.1285 InternalName: "radMax" ObjectTag: 33 Update: "SM.VectorGrid.Update" Constraints: 0x55 Listening: 1 Label: "Max" Click: "SM.VectorGrid.Click" ) (RButn.1286 InternalName: "radMean" ObjectTag: 33 Update: "SM.VectorGrid.Update" Constraints: 0x55 Listening: 1 Label: "Mean" Click: "SM.VectorGrid.Click" ) (RButn.1287 InternalName: "radMedian" ObjectTag: 33 Update: "SM.VectorGrid.Update" Constraints: 0x55 Listening: 1 Label: "Median" Click: "SM.VectorGrid.Click" ) (RButn.1288 InternalName: "radMin" ObjectTag: 33 Update: "SM.VectorGrid.Update" Constraints: 0x55 Listening: 1 Label: "Min" Click: "SM.VectorGrid.Click" ) (RButn.1289 InternalName: "radSum" ObjectTag: 33 Update: "SM.VectorGrid.Update" Constraints: 0x55 Listening: 1 Label: "Sum" Click: "SM.VectorGrid.Click" ) (RButn.1290 InternalName: "radNN" ObjectTag: 33 Update: "SM.VectorGrid.Update" Constraints: 0x55 Listening: 1 Label: "Nearest neighbor" Click: "SM.VectorGrid.Click" ) (RButn.1291 InternalName: "radBilinear" ObjectTag: 33 Update: "SM.VectorGrid.Update" Constraints: 0x55 Listening: 1 Label: "Bilinear interpolation" Click: "SM.VectorGrid.Click" ) (RButn.1292 InternalName: "radCubic" ObjectTag: 33 Update: "SM.VectorGrid.Update" Constraints: 0x55 Listening: 1 Label: "Cubic convolution" Click: "SM.VectorGrid.Click" ) (AVCBox.1293 InternalName: "chkData" ObjectTag: 33 Update: "SM.VectorGrid.Update" Listening: 1 Label: "Set NODATA if there are missing values" Constraints: 0x55 ) (RectD.1294 Left: 14.00000000000000 Top: 46.00000000000000 Right: 92.00000000000000 Bottom: 25.00000000000000 ) (RectD.1295 Left: 14.00000000000000 Top: 67.00000000000000 Right: 92.00000000000000 Bottom: 46.00000000000000 ) (RectD.1296 Left: 14.00000000000000 Top: 88.00000000000000 Right: 92.00000000000000 Bottom: 67.00000000000000 ) (RectD.1297 Left: 14.00000000000000 Top: 110.00000000000000 Right: 92.00000000000000 Bottom: 89.00000000000000 ) (RectD.1298 Left: 14.00000000000000 Top: 131.00000000000000 Right: 92.00000000000000 Bottom: 110.00000000000000 ) (RectD.1299 Left: 156.00000000000000 Top: 49.00000000000000 Right: 303.00000000000000 Bottom: 25.00000000000000 ) (RectD.1300 Left: 156.00000000000000 Top: 68.00000000000000 Right: 315.00000000000000 Bottom: 47.00000000000000 ) (RectD.1301 Left: 156.00000000000000 Top: 89.00000000000000 Right: 312.00000000000000 Bottom: 68.00000000000000 ) (RectD.1302 Left: 14.00000000000000 Top: 156.00000000000000 Right: 309.00000000000000 Bottom: 131.00000000000000 ) (LButn.1303 InternalName: "lbtNext" ObjectTag: 33 Label: "Next" Click: "SM.VectorGrid.Click" ) (LButn.1304 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.VectorGrid.Click" ) (LButn.1305 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.VectorGrid.Click" ) (RectD.1306 Left: 12.00000000000000 Top: 89.00000000000000 Right: 283.00000000000000 Bottom: 1.00000000000000 ) (RectD.1307 Left: 82.00000000000000 Top: 127.00000000000000 Right: 236.00000000000000 Bottom: 100.00000000000000 ) (RectD.1308 Left: 12.00000000000000 Top: 263.00000000000000 Right: 283.00000000000000 Bottom: 131.00000000000000 ) (RectD.1309 Left: 12.00000000000000 Top: 450.00000000000000 Right: 340.00000000000000 Bottom: 279.00000000000000 ) (RectD.1310 Left: 301.00000000000000 Top: 76.00000000000000 Right: 352.00000000000000 Bottom: 47.00000000000000 ) (RectD.1311 Left: 301.00000000000000 Top: 119.00000000000000 Right: 352.00000000000000 Bottom: 88.00000000000000 ) (RectD.1312 Left: 301.00000000000000 Top: 160.00000000000000 Right: 352.00000000000000 Bottom: 131.00000000000000 ) (AVDLog.1313 Name: "SM.ZoneSample" X: 76 Y: 90 W: 537 H: 443 ConstrainedControlNames: 1314 ConstrainedControlNames: 1315 ConstrainedControlNames: 1316 ConstrainedControlNames: 1317 ConstrainedControlNames: 1318 Constraints: 1319 Constraints: 1320 Constraints: 1321 Constraints: 1322 Constraints: 1323 Server: 850 ControlPanel: 1324 ObjectTag: 33 Title: "Zone Sample" Modal: 1 AlwaysOnTop: 1 HasTitleBar: 1 Open: "SM.ZoneSample.Open" DefaultButton: 1377 ) (AVStr.1314 S: "lbtAdd" ) (AVStr.1315 S: "lbtRemove" ) (AVStr.1316 S: "lbtOK" ) (AVStr.1317 S: "lbtCancel" ) (AVStr.1318 S: "lbtHelp" ) (Numb.1319 N: 85.00000000000000 ) (Numb.1320 N: 85.00000000000000 ) (Numb.1321 N: 85.00000000000000 ) (Numb.1322 N: 85.00000000000000 ) (Numb.1323 N: 85.00000000000000 ) (CPanel.1324 Child: 1325 Child: 1345 Child: 1361 Child: 1368 Child: 1369 Child: 1370 ResBox: 1371 ResBox: 1372 ResBox: 1373 ResBox: 1374 ResBox: 1375 ResBox: 1376 Listening: 1 ) (CPanel.1325 InternalName: "cpaGrids" ObjectTag: 33 Child: 1326 Child: 1328 Child: 1329 Child: 1331 Child: 1332 Child: 1333 Child: 1334 Child: 1336 Constraints: 0x55 ResBox: 1337 ResBox: 1338 ResBox: 1339 ResBox: 1340 ResBox: 1341 ResBox: 1342 ResBox: 1343 ResBox: 1344 Label: "Grid themes" VisibleBorder: 1 Listening: 1 ) (AVLBox.1326 InternalName: "lbxGrids" ObjectTag: 33 NextControl: 850 ContentKind: 4 Constraints: 0x55 Listening: 1 VerticalScroll: 1 Select: "SM.ZoneSample.Select" SelectionStyle: 1327 ) (AVEnum.1327 Name: "LISTBOX_SELECTION_MULTIROW" ) (TextLabel.1328 InternalName: "txtGrids" ObjectTag: 33 Constraints: 0x55 Label: "Available grids:" Listening: 1 ) (AVLBox.1329 InternalName: "lbxStats" ObjectTag: 33 NextControl: 850 ContentKind: 4 Constraints: 0x55 ColumnCount: 1 Listening: 1 VerticalScroll: 1 SelectionStyle: 1330 Apply: "SM.ZoneSample.Apply" ) (AVEnum.1330 Name: "LISTBOX_SELECTION_MULTIROW" ) (TextLabel.1331 InternalName: "txtStats" ObjectTag: 33 Constraints: 0x55 Label: "Available statistics:" Listening: 1 ) (LButn.1332 InternalName: "lbtAdd" ObjectTag: 33 Label: ">" Click: "SM.ZoneSample.Click" ) (LButn.1333 InternalName: "lbtRemove" ObjectTag: 33 Label: "<" Click: "SM.ZoneSample.Click" ) (AVLBox.1334 InternalName: "lbxSample" ObjectTag: 33 NextControl: 850 ContentKind: 4 Constraints: 0x55 Listening: 1 VerticalScroll: 1 SelectionStyle: 1335 Apply: "SM.ZoneSample.Apply" ) (AVEnum.1335 Name: "LISTBOX_SELECTION_MULTIROW" ) (TextLabel.1336 InternalName: "txtSample" ObjectTag: 33 Constraints: 0x55 Label: "Grids to be sampled:" Listening: 1 ) (RectD.1337 Left: 11.00000000000000 Top: 139.00000000000000 Right: 172.00000000000000 Bottom: 41.00000000000000 ) (RectD.1338 Left: 11.00000000000000 Top: 40.00000000000000 Right: 156.00000000000000 Bottom: 21.00000000000000 ) (RectD.1339 Left: 11.00000000000000 Top: 225.00000000000000 Right: 172.00000000000000 Bottom: 168.00000000000000 ) (RectD.1340 Left: 11.00000000000000 Top: 171.00000000000000 Right: 156.00000000000000 Bottom: 147.00000000000000 ) (RectD.1341 Left: 190.00000000000000 Top: 140.00000000000000 Right: 224.00000000000000 Bottom: 117.00000000000000 ) (RectD.1342 Left: 190.00000000000000 Top: 173.00000000000000 Right: 224.00000000000000 Bottom: 150.00000000000000 ) (RectD.1343 Left: 239.00000000000000 Top: 227.00000000000000 Right: 439.00000000000000 Bottom: 41.00000000000000 ) (RectD.1344 Left: 239.00000000000000 Top: 39.00000000000000 Right: 397.00000000000000 Bottom: 20.00000000000000 ) (CPanel.1345 InternalName: "cpaZones" ObjectTag: 33 Child: 1346 Child: 1347 Child: 1348 Child: 1349 Child: 1350 Child: 1352 Child: 1353 Constraints: 0x55 ResBox: 1354 ResBox: 1355 ResBox: 1356 ResBox: 1357 ResBox: 1358 ResBox: 1359 ResBox: 1360 Label: "Zones" VisibleBorder: 1 Listening: 1 ) (AVCBBox.1346 InternalName: "cbxZoneTheme" ObjectTag: 33 NextControl: 850 ContentKind: 4 Constraints: 0x55 Listening: 1 Select: "SM.ZoneSample.Select" ) (TextLabel.1347 InternalName: "txtZoneTheme" ObjectTag: 33 Constraints: 0x55 Label: "Theme:" Listening: 1 ) (AVCBBox.1348 InternalName: "cbxIDField" ObjectTag: 33 Update: "SM.ZoneSample.Update" NextControl: 850 ContentKind: 4 Constraints: 0x55 Listening: 1 Select: "SM.ZoneSample.Select" ) (TextLabel.1349 InternalName: "txtIDField" ObjectTag: 33 Constraints: 0x55 Label: "ID field:" Listening: 1 ) (AVLBox.1350 InternalName: "lbxZoneFields" ObjectTag: 33 Update: "SM.ZoneSample.Update" NextControl: 850 ContentKind: 4 Constraints: 0x55 Listening: 1 VerticalScroll: 1 SelectionStyle: 1351 ) (AVEnum.1351 Name: "LISTBOX_SELECTION_MULTIROW" ) (TextLabel.1352 InternalName: "txtZoneFields" ObjectTag: 33 Constraints: 0x55 Label: "Fields to\ninclude:" Listening: 1 ) (AVCBox.1353 InternalName: "chkSelected" ObjectTag: 33 Listening: 1 Label: "Use selected records only" Constraints: 0x55 ) (RectD.1354 Left: 63.00000000000000 Top: 158.00000000000000 Right: 235.00000000000000 Bottom: 24.00000000000000 ) (RectD.1355 Left: 9.00000000000000 Top: 48.00000000000000 Right: 62.00000000000000 Bottom: 26.00000000000000 ) (RectD.1356 Left: 63.00000000000000 Top: 189.00000000000000 Right: 235.00000000000000 Bottom: 54.00000000000000 ) (RectD.1357 Left: 9.00000000000000 Top: 78.00000000000000 Right: 62.00000000000000 Bottom: 54.00000000000000 ) (RectD.1358 Left: 67.00000000000000 Top: 146.00000000000000 Right: 235.00000000000000 Bottom: 85.00000000000000 ) (RectD.1359 Left: 9.00000000000000 Top: 123.00000000000000 Right: 68.00000000000000 Bottom: 83.00000000000000 ) (RectD.1360 Left: 9.00000000000000 Top: 176.00000000000000 Right: 203.00000000000000 Bottom: 153.00000000000000 ) (CPanel.1361 InternalName: "cpaExport" ObjectTag: 33 Child: 1362 Child: 1363 Child: 1364 Constraints: 0x55 ResBox: 1365 ResBox: 1366 ResBox: 1367 Label: "Export Format" VisibleBorder: 1 Listening: 1 ) (RButn.1362 InternalName: "radCSV" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "Comma-delimited text" ) (RButn.1363 InternalName: "radDBF" ObjectTag: 33 Constraints: 0x55 Listening: 1 Label: "dBASE" ) (AVCBox.1364 InternalName: "chkTable" ObjectTag: 33 Listening: 1 Label: "Add table to project" Constraints: 0x55 ) (RectD.1365 Left: 12.00000000000000 Top: 55.00000000000000 Right: 179.00000000000000 Bottom: 30.00000000000000 ) (RectD.1366 Left: 12.00000000000000 Top: 83.00000000000000 Right: 108.00000000000000 Bottom: 58.00000000000000 ) (RectD.1367 Left: 12.00000000000000 Top: 123.00000000000000 Right: 168.00000000000000 Bottom: 98.00000000000000 ) (LButn.1368 InternalName: "lbtOK" ObjectTag: 33 Update: "SM.ZoneSample.Update" Label: "OK" Click: "SM.ZoneSample.Click" ) (LButn.1369 InternalName: "lbtCancel" ObjectTag: 33 Label: "Cancel" Click: "SM.ZoneSample.Click" ) (LButn.1370 InternalName: "lbtHelp" ObjectTag: 33 Label: "Help" Click: "SM.ZoneSample.Click" ) (RectD.1371 Left: 10.00000000000000 Top: 247.00000000000000 Right: 461.00000000000000 Bottom: 3.00000000000000 ) (RectD.1372 Left: 11.00000000000000 Top: 430.00000000000000 Right: 261.00000000000000 Bottom: 249.00000000000000 ) (RectD.1373 Left: 272.00000000000000 Top: 430.00000000000000 Right: 460.00000000000000 Bottom: 249.00000000000000 ) (RectD.1374 Left: 470.00000000000000 Top: 60.00000000000000 Right: 525.00000000000000 Bottom: 33.00000000000000 ) (RectD.1375 Left: 470.00000000000000 Top: 99.00000000000000 Right: 525.00000000000000 Bottom: 72.00000000000000 ) (RectD.1376 Left: 470.00000000000000 Top: 138.00000000000000 Right: 525.00000000000000 Bottom: 111.00000000000000 ) (Nil.1377 ) (Script.1378 Name: "SM.About.Click" SourceCode: "' Name: SM.About.Click\n'\n' Description: Click scripts for controls in SM.About.\n'\n' Self: lbtOK \n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' --------------- ------------------------------------------------------\n\n\naboutDlg = SELF.GetDialog\n\n' ---------------------------------------------------------------------\n' lbtOK: Close the dialog.\n\nif (SELF.GetName = \"lbtOK\") then\n aboutDlg.Close\n\n\n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1379 Name: "SM.AutoSubmit" SourceCode: "' Name: SM.AutoSubmit\n'\n' Description: Waits for the output file to be written and then\n' reads the model in.\n' \n' Parameters:\n' (0) theView: view to add new theme to\n' (1) finishFN: name of the file that designates job is done processing\n' (2) outputFN: name of the output file\n' (3) filenameList: list of files to be deleted when done\n' (4) startTime: time job started processing\n' (5) maxTime: timeout value\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted t o any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\ntheView = SELF.Get(0)\nfinishFN = SELF.Get(1)\noutputFN = SELF.Get(2)\nfilenameList = SELF.Get(3)\nstartTime = SELF.Get(4)\nmaxTime = SELF.Get(5)\n\ne lapsedTime = (Date.Now - startTime).AsSeconds\nfinishExists = File.Exists(finishFN)\n\n\n' If it's been too long and the job still isn't done, then exit. Can't\n' delete theFN file because somebody (stats sofware or somewhere else \n' in StatMod, I don't know) still has it locked.\n\nif ((elapsedTime >= maxTime) and finishExists.Not) then\n theMsg = \"Timed out waiting for the statistical software to finish.\"\n MsgBox.Error(theMsg, \"Error\")\n\n\n' If the job is done, then run the model.\n\nelseif (finishExists and File. Exists(outputFN)) then\n Av.Run(\"SM.ReadModel\", {theView, outputFN, TRUE})\n File.Delete(finishFN)\n File.Delete(outputFN)\n for each aFN in filenameList\n File.Delete(aFN)\n end\n\n\n' If the job isn't done but there is still time left, wait another 2\n' seconds.\n\nelseif (elapsedTime < maxTime) then\n Av.DelayedRun(\"SM.AutoSubmit\", SELF, 2)\n\nend\n" ) (Script.1380 Name: "SM.Bail" SourceCode: "' Name: SM.Bail\n'\n' Description: Bailing routines for CartModel, CreateSample,\n' Intersect, LogisticModel, WriteSASCode, and ZonalSample.\n'\n' Parameters: The first one is the procedure id (tree, sample, \n' intersect, log, sas). Any parameters needed by the procedure make\n' up the rest of the list.\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' sc ripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nscriptID = SELF.Get(0)\n\n\n' ---------------------------------------------------------------------\n' Script: CartModel\n' Parameters: \n' (1) GridVerifyEnum to be reset (can be NIL)\n' (2) {View, AnalysisEnvironment to be reset} (can be NIL)\n' (3) F ileName for model file (NIL if not autoSubmit)\n' (4) FileName for odb file (NIL if not autoSubmit)\n\nif (scriptID = \"tree\") then\n\n\n ' Close the status dialog.\n \n statusDlg = Av.FindDialog(\"SM.Status\")\n if (statusDlg.IsOpen) then\n statusDlg.Close\n end\n Av.ClearStatus\n \n\n ' Delete files.\n \n tempDir = FileName.GetTmpDir\n for each aFN in tempDir.ReadFiles(\"xxxsm*.*\")\n File.Delete(aFN)\n end\n for each aFN in tempDir.ReadFiles(\"xxxinf*.*\")\n File.Delete(aFN)\n end\n if (SELF.Get(3) <> NIL) th en\n File.Delete(SELF.Get(3))\n end\n if (SELF.Get(4) <> NIL) then\n File.Delete(SELF.Get(4))\n end\n\n\n ' Reset GridVerifyEnum and AnalysisEnvironment.\n \n if (SELF.Get(1) <> NIL) then\n Grid.SetVerify(SELF.Get(1))\n end\n if (SELF.Get(2) <> NIL) then\n SELF.Get(2).Get(0).SetExtension(SELF.Get(2).Get(1))\n SELF.Get(2).Get(1).Activate\n end\n\n\n' ---------------------------------------------------------------------\n' Script: CreateSample\n' Parameters: \n' (1) FileName of temporary VTab to be dele ted if error (NIL if\n' normal exit)\n' (2) Point Theme that needs to have selection reset\n' (3) Dictionary: key=Theme - these themes will have selections reset\n' (4) VTab to be set noneditable\n\nelseif (scriptID = \"sample\") then\n\n\n ' Close the status dialog.\n \n statusDlg = Av.FindDialog(\"SM.Status\")\n if (statusDlg.IsOpen) then\n statusDlg.Close\n end\n Av.ClearStatus\n\n\n ' Make VTab not editable and delete it if necessary.\n \n if (SELF.Get(4) <> NIL) then\n SELF.Get(4).SetEditable(FALSE)\n en d\n if (SELF.Get(1) <> NIL) then\n Av.PurgeObjects\n File.Delete(SELF.Get(1))\n end\n \n\n ' Reset selections.\n \n theVTab = SELF.Get(2).GetFTab\n theVTab.SetSelection(theVTab.GetLastSelection.Clone)\n theVTab.UpdateSelection\n for each aTheme in SELF.Get(3).ReturnKeys\n if (aTheme.Is(FTheme)) then\n theVTab = aTheme.GetFTab\n elseif (aTheme.HasTable) then\n theVTab = aTheme.GetVTab\n else\n theVTab = NIL\n end\n if (theVTab <> NIL) then\n theVTab.SetSelection(theVTab.GetLastSe lection.Clone)\n theVTab.UpdateSelection\n end\n end\n \n \n' ---------------------------------------------------------------------\n' Script: Intersect\n' Parameters: \n' (1) List of FTabs that need to be deactivated before files can be\n' deleted\n' (2) List that is either empty or contains the view, projection, and\n' map units for that view\n\nelseif (scriptID = \"intersect\") then\n\n\n ' Deactivate FTabs.\n \n for each aFTab in SELF.Get(1)\n aFTab.SetEditable(FALSE)\n aFTab.DeActivate\n end\n Av.Pu rgeObjects\n \n \n ' Delete temporary files.\n \n for each aFN in FileName.GetTmpDir.ReadFiles(\"xxxsm*.*\")\n File.Delete(aFN)\n end\n \n \n ' Reset projection and map units, if necessary.\n \n bailList = SELF.Get(2)\n if (bailList.Count = 3) then\n theView = bailList.Get(0)\n theView.SetProjection(bailList.Get(1))\n theView.SetUnits(bailList.Get(2))\n end\n\n\n' ---------------------------------------------------------------------\n' Script: LogisticModel\n' Parameters: \n' (1) List of VTabs that need joins removed\n' (2) List of VTabs that need to be deactived before files can be\n' deleted\n' (3) GridVerifyEnum to be reset (can be NIL)\n' (4) {View, AnalysisEnvironment to be reset} (can be NIL)\n' (5) FileName for model file (NIL if not autoSubmit)\n' (6) FileName for ODB file (NIL if not autoSubmit)\n\nelseif (scriptID = \"log\") then\n\n\n ' Close the status dialog.\n \n statusDlg = Av.FindDialog(\"SM.Status\")\n if (statusDlg.IsOpen) then\n statusDlg.Close\n end\n Av.ClearStatus\n\n\n ' Unjoin VTabs. \n \n for each aVTab in SELF.Get(1)\n aVTab.UnjoinAll\n end\n \n \n ' Deactivate VTabs.\n \n for each aVTab in SELF.Get(2)\n aVTab.SetEditable(FALSE)\n aVTab.DeActivate\n end\n Av.PurgeObjects\n \n\n ' Delete files.\n \n tempDir = FileName.GetTmpDir\n for each aFN in tempDir.ReadFiles(\"xxxsm*.*\")\n File.Delete(aFN)\n end\n for each aFN in tempDir.ReadFiles(\"xxxinf*.*\")\n File.Delete(aFN)\n end\n if (SELF.Get(5) <> NIL) then\n File.Delete(SELF.Get(5))\n newFN = SELF.Get(5).Clone\n newFN.SetExt ension(\"log\")\n File.Delete(newFN)\n end\n if (SELF.Get(6) <> NIL) then\n File.Delete(SELF.Get(6))\n end\n \n \n ' Reset GridVerifyEnum and AnalysisEnvironment.\n \n if (SELF.Get(3) <> NIL) then\n Grid.SetVerify(SELF.Get(3))\n end\n if (SELF.Get(4) <> NIL) then\n SELF.Get(4).Get(0).SetExtension(SELF.Get(4).Get(1))\n SELF.Get(4).Get(1).Activate\n end\n\n \n' ---------------------------------------------------------------------\n' Script: WriteSASCode\n' Parameters:\n' (1) Dictionary: key=Theme, info= original selection bitmap\n' (2) NIL if normal termination, sample VTab to be deactivated and\n' deleted if abnormal termination\n\nelseif (scriptID = \"sas\") then\n\n\n ' Close the status dialog.\n \n statusDlg = Av.FindDialog(\"SM.Status\")\n if (statusDlg.IsOpen) then\n statusDlg.Close\n end\n Av.ClearStatus\n\n\n ' Reset theme selections.\n \n selectionDict = SELF.Get(1)\n for each aTheme in selectionDict.ReturnKeys\n if (aTheme.Is(FTheme)) then\n aVTab = aTheme.GetFTab\n else\n aVTab = aTheme.Ge tVTab\n end\n aVTab.SetSelection(selectionDict.Get(aTheme))\n aVTab.UpdateSelection\n end\n \n \n ' Deactive and delete sample VTab, if necessary.\n \n if (SELF.Get(2) <> NIL) then\n theVTab = SELF.Get(2)\n theFN = theVTab.GetBaseTableFileName\n theVTab.SetEditable(FALSE)\n theVTab.DeActivate\n Av.PurgeObjects\n File.Delete(theFN)\n end\n\n\n ' Delete temporary files.\n \n for each aFN in FileName.GetTmpDir.ReadFiles(\"xxxsm*.*\")\n File.Delete(aFN)\n end\n \n\n' ---------------------------- -----------------------------------------\n' Script: ZonalSample\n' Parameters: \n' (1) List of Themes that need to have selection reset\n\nelseif (scriptID = \"zone\") then\n\n\n ' Close the status dialog.\n \n statusDlg = Av.FindDialog(\"SM.Status\")\n if (statusDlg.IsOpen) then\n statusDlg.Close\n end\n Av.ClearStatus\n\n\n ' Reset selections.\n \n for each aTheme in SELF.Get(1)\n if (aTheme.Is(FTheme)) then\n theVTab = aTheme.GetFTab\n elseif (aTheme.HasTable) then\n theVTab = aTheme.GetVTab\n el se\n theVTab = NIL\n end\n if (theVTab <> NIL) then\n theVTab.SetSelection(theVTab.GetLastSelection.Clone)\n theVTab.UpdateSelection\n end\n end\n\n\n' ---------------------------------------------------------------------\n \nend\n\n" ) (Script.1381 Name: "SM.ChooseDir.Apply" SourceCode: "' Name: SM.ChooseDir.Apply\n'\n' Description: Apply scripts for controls in SM.ChooseDir.\n'\n' Self: lbxDir, txlDir\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\ndirDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbxDir: Open the directory being double clicked on.\n\nif (SELF.GetName = \"lbxDir\") then\n theSelection = SELF.GetSelection\n if (theSelection.Count > 0) then\n baseDir = SELF.GetObjectTag\n theDir = theSelection.Get(0)\n if (theDir = \"..\") then\n theDir = baseDir.ReturnDir\n else\n baseDir.MergePath(theDir)\n theDir = baseDir\n end\n SELF.SetObjectTag(theDir)\n dirDlg.FindByName(\"txlDir\").SetText(theDir.AsString)\n SELF.Update\n else\n return NIL\n end\n\n\n' ---------------------------------------------------------------------\n' txlDir: Open the directory typed in by the user.\n\nelseif (SELF.GetName = \"txlDir\") then\n theDir = SELF.GetText.AsFileName\n if (File.Exists(theDir) and theDir.IsDir) then\n dirDlg.FindByName(\"lbxDir\").SetObjectTag(theDir)\n end\n dirDlg.FindByName(\"btnGoDir\").SetEnabled(FALSE)\n\n\n' -- -------------------------------------------------------------------\n\nend\nSELF.BroadcastUpdate\n" ) (Script.1382 Name: "SM.ChooseDir.Changed" SourceCode: "' Name: SM.ChooseDir.Changed\n'\n' Description: Changed scripts for controls in SM.ChooseDir.\n'\n' Self: txlDir\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' --- ------------------------------------------------------------------\n\n\ndirDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' txlDir: Activate the GoDir button.\n\nif (SELF.GetName = \"txlDir\") then\n dirDlg.FindByName(\"btnGoDir\").SetEnabled(TRUE)\n\n\n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1383 Name: "SM.ChooseDir.Click" SourceCode: "' Name: SM.ChooseDir.Click\n'\n' Description: Click scripts for controls in SM.ChooseDir.\n'\n' Self: btnGoDir, lbtOK, lbtCancel\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and docu mentation.\n' ---------------------------------------------------------------------\n\n\ndirDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' btnGoDir: Go to the directory that the user typed in.\n\nif (SELF.GetName = \"btnGoDir\") then\n theDir = dirDlg.FindByName(\"txlDir\").GetText.AsFileName\n if (File.Exists(theDir) and theDir.IsDir) then\n dirDlg.FindByName(\"lbxDir\").SetObjectTag(theDir)\n end\n SELF.SetEnabled(FALSE)\n \n\n' -------------------------------------- -------------------------------\n' lbtCancel: Close dialog.\n\nelseif (SELF.GetName = \"lbtCancel\") then\n dirDlg.Close\n\n\n' ---------------------------------------------------------------------\n' lbtHelp: Open help.\n\nelseif (SELF.GetName = \"lbtHelp\") then\n Av.Run(\"SM.Help\", SELF)\n\n\n' ---------------------------------------------------------------------\n' lbtOK: Set the dialog object tag to the chosen directory and close\n' the dialog. If no directory is chosen, don't close.\n\nelseif (SELF.GetName = \"lbtOK\") then\n theSelection = dirDlg.FindByName(\"lbxDir\").GetSelection\n if ((theSelection.Count > 0) and (theSelection.Get(0) <> \"..\")) then\n theDir = dirDlg.FindByName(\"txlDir\").GetText.AsFileName \n theDir.MergePath(theSelection.Get(0))\n dirDlg.SetObjectTag(theDir)\n closeScript = dirDlg.GetClose\n dirDlg.SetClose(\"\")\n dirDlg.Close\n dirDlg.SetClose(closeScript)\n else\n return NIL\n end\n\n\n' ---------------------------------------------------------------------\n\nend\nSELF.BroadcastUpdate\n" ) (Script.1384 Name: "SM.ChooseDir.Close" SourceCode: "' Name: SM.ChooseDir.Close\n'\n' Description: Close script for SM.ChooseDir.\n'\n' Self: SM.ChooseDir\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' -------------- -------------------------------------------------------\n\n\nSELF.SetObjectTag(NIL)\n" ) (Script.1385 Name: "SM.ChooseDir.Open" SourceCode: "' Name: SM.ChooseDir.Open\n'\n' Description: Open script for SM.Properties. Fills listbox with\n' directories in the current directory.\n'\n' Self: SM.ChooseDir\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\n' Get controls.\n\nlbtOK = SELF.FindByName(\"lbtOK\")\nlbxDir = SELF.FindByName(\"lbxDir\")\ntxlDir = SELF.FindByName(\"txlDir\")\n\n\n' Check if there is a directory attached to the dialog.\n\ntheDir = SELF.GetObjectTag\nif ((theDir.Is(FileName) and theDir.IsDir).Not) then\n theDir = FileName.GetCWD\nend\n\n\n' Get a list of files in the directory. Make a list of the files that\n' are really directories.\n\ndirLi st = List.Make\nfor each aFile in theDir.Read(\"*\")\n if (aFile.IsDir) then\n dirList.Add(aFile.GetBaseName)\n end\nend\nif (theDir.IsRoot.Not) then\n dirList.Insert(\"..\")\nend\n\n\n' Initialize.\n\nlbxDir.DefineFromList(dirList)\nlbxDir.SetObjectTag(theDir)\ntxlDir.SetText(theDir.AsString)\nlbtOK.SetEnabled(FALSE)\nlbxDir.Focus\n" ) (Script.1386 Name: "SM.ChooseDir.Select" SourceCode: "' Name: SM.ChooseDir.Select\n'\n' Description: Select scripts for controls in SM.ChooseDir.\n'\n' Self: lbxDir\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ----- ----------------------------------------------------------------\n\n\nSELF.BroadcastUpdate\n" ) (Script.1387 Name: "SM.ChooseDir.Update" SourceCode: "' Name: SM.ChooseDir.Update\n'\n' Description: Update scripts for controls in SM.ChooseDir.\n'\n' Self: lbtOK, lbxDir\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n ' ---------------------------------------------------------------------\n\n\ndirDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbtOK: Enable/disable based on if a directory is selected.\n\nif (SELF.GetName = \"lbtOK\") then\n theSelection = dirDlg.FindByName(\"lbxDir\").GetSelection\n isOK = ((theSelection.Count > 0) and (theSelection.Get(0) <> \"..\"))\n SELF.SetEnabled(isOK)\n\n\n' ---------------------------------------------------------------------\n' lbxDir: Update the list of directories inside the current directory.\n\nelseif (SELF.GetName = \"lbxDir\") then\n theDir = SELF.GetObjectTag\n dirList = List.Make\n for each aFile in theDir.Read(\"*\")\n if (aFile.IsDir) then\n dirList.Add(aFile.GetBaseName)\n end\n end\n if (theDir.IsRoot.Not) then\n dirList.Insert(\"..\")\n end\n SELF.DefineFromList(dirList)\n\n \n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1388 Name: "SM.ComputeKappa" SourceCode: "'Name: SM.ComputeKappa\n'\n'Description: Computes Cohen's kappa for sample points and polygons.\n'Also computes a variance for kappa and a z-value.\n'\n'Parameters:\n'(0) Projection of the view containing the themes\n'(1) Polygon or grid theme containing predictions\n'(2) Field from (1) that contains predictions\n'(3) Point or polygon theme containing reference values\n'(4) Field from (3) that contains actual values\n'(5) Boolean, if TRUE then only use selected records in (3)\n'(6) Boolean, if TRUE then save error matr ix\n'(7) FileName to save error matrix to (NIL if (6) is FALSE)\n'(8) Boolean, if TRUE then save result shapefile\n'(9) FileName to save result shapefile\n'\n'Returns:\n'NIL if error, or\n'(0) Kappa (Number)\n'(1) Standard error of kappa (Number)\n'(2) Z-value (Number)\n'(3) Boolean, TRUE if the error matrix was saved successfully, FALSE if\n'not, or NIL if not applicable\n'(4) Boolean, TRUE if the result shapefile was saved successfully,\n'FALSE if not, or NIL if not applicable\n'\n' Copyright Notice\n'\n' Copyright (c) 20 02 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n'----------------------------------------------------------------------\n\n\n'Get parameters\n\nthePrj = SELF.Get(0)\npredTheme = SELF.Get(1)\npredField = SELF.Get(2 )\nrefTheme = SELF.Get(3)\nrefField = SELF.Get(4)\nuseSelected = SELF.Get(5)\nsaveMatrix = SELF.Get(6)\nmatrixFN = SELF.Get(7)\nsaveResult = SELF.Get(8)\nresultFN = SELF.Get(9)\n\n\n'Make sure the fields are of the same type\n\nif ((predField.IsTypeNumber and refField.IsTypeNumber.Not) or\n (predField.IsTypeString and refField.IsTypeString.Not)) then\n theMsg = \"The prediction field is\"\n if (predField.IsTypeNumber) then\n theMsg = theMsg ++ \"numeric,\"\n else\n theMsg = theMsg ++ \"text,\"\n end\n theMsg = theMsg + + \"but the reference field is\"\n if (refField.IsTypeNumber) then\n theMsg = theMsg ++ \"numeric.\"\n else\n theMsg = theMsg ++ \"text.\"\n end\n theMsg = theMsg ++ \"Kappa cannot be computed.\"\n MsgBox.Error(theMsg, \"Kappa\")\n return NIL\nend\n\n\n'Get needed info\n\nif (predTheme.Is(GTheme)) then\n predVTab = predTheme.GetVTab\n predGrid = predTheme.GetGrid\n resultBitmap = predVTab.GetSelection.Clone\n predIsGrid = TRUE\nelse\n predVTab = predTheme.GetFTab\n predIsGrid = FALSE\nend\npredList = List.Make\nisNumber = predField.IsTypeNumber\n\nrefVTab = refTheme.GetFTab\nrefShapeField = refVTab.FindField(\"Shape\")\nrefIsPoly = (refShapeField.GetType = #FIELD_SHAPEPOLY)\n\n\n'Remember selections\n\nif (useSelected.Not) then\n refVTab.RememberSelection\n refVTab.GetSelection.SetAll\nend\npredVTab.RememberSelection\n\n\n'Get all values in prediction theme\n\ntempFN = FileName.GetTmpDir.MakeTmp(\"xxxsm\", \"dbf\")\nfList = {predField}\neList = {#VTAB_SUMMARY_FIRST}\nsumVTab = predVTab.Summarize(tempFN, dBASE, predField, fList, eList)\nsumField = sum VTab.FindField(predField.GetAlias)\nfor each aRec in sumVTab\n predList.Add(sumVTab.ReturnValue(sumField, aRec))\nend\nsumVTab.DeActivate\nsumVTab = NIL\nsumField = NIL\nFile.Delete(tempFN)\n\n\n'Get all values in reference theme\n\nrefList = List.Make\nfList = {refField}\nsumVTab = refVTab.Summarize(tempFN, dBASE, refField, fList, eList)\nsumField = sumVTab.FindField(refField.GetAlias)\nfor each aRec in sumVTab\n refList.Add(sumVTab.ReturnValue(sumField, aRec))\nend\nsumVTab.DeActivate\nsumVTab = NIL\nsumField = NIL\nFile.Del ete(tempFN)\n\n\n'Check to make sure the fields have the same data\n\ncnt = 0\nfor each aVal in refList\n if (predList.FindByValue(aVal) = -1) then\n predList.Add(aVal)\n cnt = cnt + 1\n end\nend\nif (cnt = refList.Count) then\n theMsg = \"It appears that the prediction and reference fields\" ++\n \"do not contain the same data values. Kappa cannot be computed.\"\n MsgBox.Error(theMsg, \"Kappa\")\n return NIL\nend\n\n\n'Make the error matrix table\n\nfieldDict = Dictionary.Make(predList.Count)\nrecordDict = Dictionary.Ma ke(predList.Count)\nerrorVTab = VTab.MakeNew(tempFN, dBASE)\nclassField = Field.Make(\"Classification\", #FIELD_CHAR, 20, 0)\nfieldList = {classField}\nif (isNumber) then\n for each aValue in predList\n newField = Field.Make(\"n\" + aValue.AsString, #FIELD_DOUBLE, 20, 6)\n newField.SetAlias(aValue.AsString)\nfieldDict.Add(aValue, newField)\n fieldList.Add(newField)\n end\nelse\n for each aValue in predList\n newField = Field.Make(aValue, #FIELD_DOUBLE, 20, 6)\n fieldDict.Add(aValue, newField)\n fieldList. Add(newField)\n end\nend\ntotalField = Field.Make(\"rowtotal\", #FIELD_DOUBLE, 20, 6)\ntotalField.SetAlias(\"Row Total\")\nfieldList.Add(totalField)\npercentField = Field.Make(\"rowpercent\", #FIELD_DOUBLE, 20, 6)\npercentField.SetAlias(\"Accuracy\")\nfieldList.Add(percentField)\nerrorVTab.AddFields(fieldList)\nif (isNumber) then\n for each aValue in predList\n newRec = errorVTab.AddRecord\n recordDict.Add(aValue, newRec)\n errorVTab.SetValue(classField, newRec, aValue.AsString)\n end\nelse\n for each aValue in predLis t\n newRec = errorVTab.AddRecord\n recordDict.Add(aValue, newRec)\n errorVTab.SetValue(classField, newRec, aValue)\n end\nend\ntotalRec = errorVTab.AddRecord\nerrorVTab.SetValue(classField, totalRec, \"Column Total\")\npercentRec = errorVTab.AddRecord\nerrorVTab.SetValue(classField, percentRec, \"Accuracy\")\n\n\n'If reference data are from polygons...\n\nif (refIsPoly) then\n\n\n 'Make the zonal VTab\n\n statsFN = FileName.GetTmpDir.MakeTmp(\"xxxsm\", \"dbf\")\n theMsg = \"Choose the polygon ID field:\"\n idField = MsgBox. List(refVTab.GetFields, theMsg, \"Kappa\")\n if (idField = NIL) then\n return NIL\n end\n statsVTab = predGrid.ZonalStatsTable(refVTab, thePrj, idField,\n FALSE, statsFN)\n statsIDField = statsVTab.FindField(idField.GetAlias)\n statsMajField = statsVTab.FindField(\"Majority\")\n if (predField.GetAlias <> \"Value\") then\n statsVTab.Join(statsMajField, predVTab,\n predVTab.FindField(\"Value\"))\n statsMajField = statsVTab.FindField(predField.GetAlias)\n end\n if (predField.GetAlias = refField.GetAlias) t hen\n statsVTab.FindField(predField.GetAlias).SetAlias(\"predField\")\n end\n\n\n 'Join the reference polygon table to the zonal table\n\n statsVTab.Join(statsIDField, refVTab, idField)\n statsRefField = statsVTab.FindField(refField.GetAlias)\n\n\n 'Make the result VTab if necessary\n \n if (saveResult) then\n tmpResultFN = FileName.GetTmpDir.MakeTmp(\"xxxsm\", \"dbf\")\n resultVTab = VTab.MakeNew(tmpResultFN, dBASE)\n ridField = idField.Clone\n correctField = Field.Make(\"Correct\", #FIELD_LOGICAL, 6, 0)\n actualField = Field.Make(\"Actual\", #FIELD_CHAR, 20, 0)\n predictionField = Field.Make(\"Prediction\", #FIELD_CHAR, 20, 0)\n fieldList = {ridField, correctField, actualField, predictionField}\n resultVTab.AddFields(fieldList)\n end\n\n\n 'Cycle through the reference polygons and fill the error matrix\n\n for each aRec in statsVTab\n theID = statsVTab.ReturnValue(statsIDField, aRec)\n predVal = statsVTab.ReturnValue(statsMajField, aRec)\n refVal = statsVTab.ReturnValue(statsRefField, aRec)\n \n if (saveResult) then\n if (predVal.IsNull) then\n predValStr = \"\"\n else\n predValStr = predVal.AsString\n end\n if (refVal.IsNull) then\n refValStr = \"\"\n else\n refValStr = refVal.AsString\n end\n correct = predValStr = refValStr\n resultRec = resultVTab.AddRecord\n resultVTab.SetValue(ridField, resultRec, theId)\n resultVTab.SetValue(correctField, resultRec, correct)\n resultVTab.SetValue(actualField, resultRec, refValStr)\n resultVTab. SetValue(predictionField, resultRec, predValStr)\n end\n\n theField = fieldDict.Get(refVal)\n if ((theField <> NIL) and predVal.IsNull.Not) then\n theRec = recordDict.Get(predVal)\n oldCount = errorVTab.ReturnValue(theField, theRec)\n errorVTab.SetValue(theField, theRec, oldCount + 1)\n oldRowTotal = errorVTab.ReturnValue(totalField, theRec)\n errorVTab.SetValue(totalField, theRec, oldRowTotal + 1)\n oldColTotal = errorVTab.ReturnValue(theField, totalRec)\n errorVTab.SetValu e(theField, totalRec, oldColTotal + 1)\n oldTotal = errorVTab.ReturnValue(totalField, totalRec)\n errorVTab.SetValue(totalField, totalRec, oldTotal + 1)\n end\n end\n\n \n 'Make the result shapefile if necessary\n \n if (saveResult) then\n resultVTab.SetEditable(FALSE)\n \n \n 'Store visible field information\n \n fieldNameList = {\"Shape\", idField.GetAlias}\n visibleFieldDict = Dictionary.Make(refVTab.GetFields.Count)\n for each aField in refVTab.GetFields\n visibleFieldDict.Set (aField, aField.IsVisible)\n if (fieldNameList.FindByValue(aField.GetAlias) = -1) then\n aField.SetVisible(FALSE)\n end\n end\n \n \n 'Export the reference FTab to get the shapes\n \n tmpResultShpFN = FileName.GetTmpDir.MakeTmp(\"xxxsm\", \"shp\")\n tmpResultFTab = refVTab.Export(tmpResultShpFN, Shape, useSelected)\n \n \n 'Join with the result VTab to get the data, and export to save\n \n tmpIdField = tmpResultFTab.FindField(idField.GetAlias)\n tmpResultFTab.Join(tmpIdFi eld, resultVTab, ridField)\n resultFTab = tmpResultFTab.Export(resultFN, Shape, FALSE)\n if (resultFTab.HasError) then\n resultSaved = FALSE\n else\n resultSaved = TRUE\n end\n \n \n 'Reset visible fields\n \n for each aField in refVTab.GetFields\n aField.SetVisible(visibleFieldDict.Get(aField))\n end\n \n else\n resultSaved = NIL\n end\n \n \n 'Clean up\n \n statsVTab.DeActivate\n statsVTab = NIL\n statsIDField = NIL\n statsMajField = NIL\n Av.PurgeObjects\n File.Delet e(statsFN)\n if (saveResult) then\n resultVTab.DeActivate\n resultVTab = NIL\n ridField = NIL\n correctField = NIL\n predictionField = NIL\n actualField = NIL\n tmpResultFTab.DeActivate\n tmpResultFTab = NIL\n tmpIdField = NIL\n Av.PurgeObjects\n File.Delete(tmpResultFN)\n File.Delete(tmpResultShpFN)\n end\n\n\n'Else if reference data are from points...\n\nelse 'refIsPoly.Not\n\n\n 'Make the result VTab if necessary\n \n if (saveResult) then\n resultFTab = FTab.MakeNew(resultFN, Point)\n correctField = Field.Make(\"Correct\", #FIELD_LOGICAL, 6, 0)\n actualField = Field.Make(\"Actual\", #FIELD_CHAR, 20, 0)\n predictionField = Field.Make(\"Prediction\", #FIELD_CHAR, 20, 0)\n resultFTab.AddFields({correctField, actualField, predictionField})\n resultShapeField = resultFTab.FindField(\"Shape\")\n if (resultFTab.HasError) then\n resultSaved = FALSE\n else\n resultSaved = TRUE\n end\n else\n resultSaved = NIL\n end\n\n\n 'Cycle through the reference points and fill the error matri x\n\n for each aRec in refVTab.GetSelection\n refPoint = refVTab.ReturnValue(refShapeField, aRec)\n refVal = refVTab.ReturnValue(refField, aRec)\n theField = fieldDict.Get(refVal)\n if (theField = NIL) then\n continue\n end\n\n if (predIsGrid) then\n cellVal = predGrid.CellValue(refPoint, thePrj)\n if (predField.GetName = \"Value\") then\n predVal = cellVal\n else\n queryStr = \"[Value] =\" ++ cellVal.AsString\n predVTab.Query(queryStr, resultBitmap, #VTAB_SELTYPE_NEW )\n recNum = resultBitmap.GetNextSet(-1)\n predVal = predVTab.ReturnValue(predField, recNum)\n end\n else\n predVTab.SelectByPoint(refPoint, 0, #VTAB_SELTYPE_NEW)\n recNum = predVTab.GetSelection.GetNextSet(-1)\n predVal = predVTab.ReturnValue(predField, recNum)\n end\n\n if (saveResult and resultSaved) then\n if (predVal.IsNull) then\n predValStr = \"\"\n else\n predValStr = predVal.AsString\n end\n if (refVal.IsNull) then\n refValStr = \"\"\n else\n refValStr = refVal.AsString\n end\n correct = predValStr = refValStr\n resultRec = resultFTab.AddRecord\n resultFTab.SetValue(resultShapeField, resultRec, refPoint)\n resultFTab.SetValue(correctField, resultRec, correct)\n resultFTab.SetValue(actualField, resultRec, refValStr)\n resultFTab.SetValue(predictionField, resultRec, predValStr)\n end\n\n if (predVal.IsNull.Not) then\n theRec = recordDict.Get(predVal)\n oldCount = errorVTab.ReturnValue(theFiel d, theRec)\n errorVTab.SetValue(theField, theRec, oldCount + 1)\n oldRowTotal = errorVTab.ReturnValue(totalField, theRec)\n errorVTab.SetValue(totalField, theRec, oldRowTotal + 1)\n oldColTotal = errorVTab.ReturnValue(theField, totalRec)\n errorVTab.SetValue(theField, totalRec, oldColTotal + 1)\n oldTotal = errorVTab.ReturnValue(totalField, totalRec)\n errorVTab.SetValue(totalField, totalRec, oldTotal + 1)\n end\n end\n \n if (saveResult) then\n resultFTab.SetEditable(FALSE)\n end\n\nend 'if (refIsPoly)\n\n\n'Compute kappa and marginal accuracies\n\np0 = 0\npc = 0\npiSum = 0\ntotal = errorVTab.ReturnValue(totalField, totalRec)\nfor each aValue in predList\n theField = fieldDict.Get(aValue)\n theRec = recordDict.Get(aValue)\n numCorrect = errorVTab.ReturnValue(theField, theRec)\n rowTotal = errorVTab.ReturnValue(totalField, theRec)\n colTotal = errorVTab.ReturnValue(theField, totalRec)\n errorVTab.SetValue(percentField, theRec, numCorrect / rowTotal)\n errorVTab.SetValue(theField, percentR ec, numCorrect / colTotal)\n p0 = p0 + numCorrect\n pc = pc + (rowTotal * colTotal)\n piRow = rowTotal / total\n piCol = colTotal / total\n piSum = piSum + (piRow * piCol * (piRow + piCol))\nend\n\np0 = p0 / total\npc = pc / (total^2)\nkappa = (p0 - pc) / (1 - pc)\nkappaVar = (1 / (total * ((1 - pc)^2))) * (pc + (pc^2) - piSum)\nkappaSE = kappaVar.Sqrt\nkappaZ = kappa / kappaSE\nerrorVTab.SetValue(percentField, percentRec, p0)\nerrorVTab.SetValue(totalField, percentRec, Number.MakeNull)\nerrorVTab.SetValue(percentFiel d, totalRec, Number.MakeNull)\nerrorVTab.SetEditable(FALSE)\n\n\n'Reset selections\n\nif (useSelected.Not) then\n refVTab.SetSelection(refVTab.GetLastSelection)\n refVTab.UpdateSelection\nend\npredVTab.SetSelection(predVTab.GetLastSelection)\npredVTab.UpdateSelection\n\n\n'Export error matrix if needed\n\nif (saveMatrix) then\n newVTab = errorVTab.Export(matrixFN, dBASE, FALSE)\n if (newVTab.HasError) then\n MsgBox.Error(\"Error saving the error matrix.\", \"Kappa\")\n matrixSaved = FALSE\n else\n matrixSaved = TRUE\n end\nelse\n matrixSaved = NIL\nend\n\n\n'Clean up and return\n\nerrorVTab.DeActivate\nerrorVTab = NIL\nclassField = NIL\ntotalField = NIL\ntotalRec = NIL\nfieldDict = NIL\nrecordDict = NIL\nFile.Delete(tempFN)\n\nreturn {kappa, kappaSE, kappaZ, matrixSaved, resultSaved}\n\n\n" ) (Script.1389 Name: "SM.ConvertGrids" SourceCode: "' Name: SM.ConvertGrids\n'\n' Description: Converts input grids and polygon themes to grids of\n' the appropriate cell size and extent for the model.\n'\n' Parameters:\n' (0) String denoting the model (\"log\", \"tree\", \"convert\")\n' (1) View\n' (2) keepGrids (Boolean - TRUE if keep intermediate grids)\n' (3) Number of variables\n' (4) Dictionary: key=Theme, info=List of fields used in the theme\n' (5) Dictionary: key=Field, info=List of variables names created\n' from that field\n' (6) List of fields used as factors/cla ss variables\n' (7) Extent for the final grid (Rect)\n' (8) Cell size for the final grid (Number)\n' For logistic models:\n' (9) Dictionary: key=name of interaction variable, info=List of two\n' variable names (the ones making up the interaction)\n' (10) List of interaction variable names\n' (11) Dictionary: key=variable name, info=Dictionary\n' sub-dictionary: key=factor/class level (String), info=dummy value\n' (string)\n' (12) List of VTabs that have joins - this is for cleanup purposes\n' (13) List of VTabs th at will need to be deactivated during cleanup\n'\n' Returns:\n' Successful: Dictionary: key=variable name, info=grid for that \n' variable\n' Unsuccessful: NIL\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' no tice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\ntheModel = SELF.Get(0)\ntheView = SELF.Get(1)\nkeepGrids = SELF.Get(2)\nnumVars = SELF.Get(3)\nthemeDict = SELF.Get(4)\nfieldDict = SELF.Get(5)\nfactorList = SELF.Get(6)\ntheExtent = SELF.Get(7)\ntheCellSize = SELF.Get(8)\nif (theModel = \"log\") then\n intDict = SELF.Get(9)\n intList = SELF.Get(10)\n dummyDict = SELF.Get(11)\n joinList = SELF.Get(12)\n vtabList = SELF.Get(13)\n dummyInfoDict = dum myDict.Get(\"info\")\nelse\n intList = List.Make\nend\ntheAE = theView.GetExtension(AnalysisEnvironment)\ntempDir = FileName.GetTmpDir\n\n\n' Check number of polygon and grid themes.\n \nthemeList = themeDict.ReturnKeys\npolyThemeList = List.Make\ngridThemeList = List.Make\n\nfor each aTheme in themeList\n if (aTheme.Is(FTheme)) then\n polyThemeList.Add(aTheme)\n else\n gridThemeList.Add(aTheme)\n end\nend\n\n\n' Get the view projection.\n\nthePrj = theView.GetProjection\n\n\n' Get resampling information for everything except grids that\n' already have the correct extent and cell size.\n\nresampleDict = Dictionary.Make(1 max (themeList.Count / 2).Floor)\nresampleDlg = Av.FindDialog(\"SM.GridResample\")\nif (theModel = \"convert\") then\n resampleDlg.FindByName(\"lbtNext\").SetLabel(\"OK\")\nelse\n resampleDlg.FindByName(\"lbtNext\").SetLabel(\"Next\")\nend\nrThemeDict = themeDict.Clone\nrThemeList = gridThemeList.Clone\nfor each aTheme in gridThemeList\n aGrid = aTheme.GetGrid\n if ((theExtent = aGrid.GetExtent) and \n (theCellSize = aGrid.GetCe llSize)) then\n rThemeDict.Remove(aTheme)\n rThemeList.RemoveObj(aTheme)\n end\nend\nif (rThemeList.Count > 0) then\n parmList = {theCellSize, rThemeList, rThemeDict, fieldDict,\n factorList, resampleDict}\n resampleDlg.SetObjectTag(parmList)\n resampleDlg.Open\n if (resampleDlg.GetObjectTag = NIL) then\n return NIL\n end\nend\nif (polyThemeList.Count > 0) then\n convertDlg = Av.FindDialog(\"SM.VectorGrid\")\n if (theModel = \"convert\") then\n convertDlg.FindByName(\"lbtNext\").SetLabel(\"OK\")\n else\n co nvertDlg.FindByName(\"lbtNext\").SetLabel(\"Next\")\n end\n parmList = {theCellSize, polyThemeList, themeDict, fieldDict,\n factorList, resampleDict}\n convertDlg.SetObjectTag(parmList)\n convertDlg.Open\n if (convertDlg.GetObjectTag = NIL) then\n return NIL\n end\nend\n\n\n' Create a dictionary to associate varNames with grids.\n\ndictSize = 1 max ((numVars + intList.Count) / 2).Floor\ntempGridDict = Dictionary.Make(dictSize)\ngridDict = Dictionary.Make(dictSize)\n\n\n' Open the status dialog.\n\nif ((theModel = \"conve rt\").Not) then\n statusDlg = Av.FindDialog(\"SM.Status\")\n statusDlg.Open\n Av.ProcessAllInvals\nend\n\n\n' Convert FThemes to grids of intermediate cell size.\n\nif ((theModel = \"convert\").Not) then\n n = 0\n total = 0\n for each aTheme in polyThemeList\n total = total + themeDict.Get(aTheme).Count\n end\n Av.Run(\"SM.Status.SetMessage\", \"Converting polygon themes...\")\n Av.Run(\"SM.Status.SetPercent\", 0)\nend\nfor each aTheme in polyThemeList\n aFTab = aTheme.GetFTab\n for each aField in themeDict.Get(aTheme)\n newCellSize = resampleDict.Get(aField).Get(3)\n theAE.SetExtent(#ANALYSISENV_VALUE, theExtent)\n theAE.SetCellSize(#ANALYSISENV_VALUE, newCellSize)\n theAE.Activate\n newGridSize = {newCellSize, theExtent}\n Av.ShowMsg(\"Creating grid from\" ++ aTheme.GetName + \"...\")\n Av.ProcessAllInvals\n newGrid = Grid.MakeFromFTab(aFTab, thePrj, aField, newGridSize)\n newGrid.GetStatistics\n if (newGrid.HasError) then\n MsgBox.Error(\"Error creating grid from\" ++ aTheme.GetName, \"\")\n return NIL\n end\n tempGridDict.Set(aField, newGrid)\n if ((theModel = \"convert\").Not) then\n n = n + 1\n Av.Run(\"SM.Status.SetPercent\", n / total * 100)\n end\n end 'for each aField\nend 'for each aTheme\n\n\n' Create grids for fields other than Value in GThemes.\n\nif ((theModel = \"convert\").Not) then\n n = 0\n total = 0\n for each aTheme in gridThemeList\n total = total + themeDict.Get(aTheme).Count\n end\n Av.Run(\"SM.Status.SetMessage\", \"Converting grid themes...\")\n Av.Run(\"SM.Status.SetPercent\", 0)\ne nd\nfor each aTheme in gridThemeList\n aGrid = aTheme.GetGrid\n for each aField in themeDict.Get(aTheme)\n if (aField.Is(Field) and (aField.GetName <> \"Value\")) then\n theAE.SetExtent(#ANALYSISENV_VALUE, aGrid.GetExtent)\n theAE.SetCellSize(#ANALYSISENV_VALUE, aGrid.GetCellSize)\n theAE.Activate\n newGrid = Av.Run(\"SM.LookupGrid\", {aTheme, aField.GetName})\n if (newGrid.Is(Grid).Not) then\n MsgBox.Error(\"Error creating lookup grid from\" ++ \n aTheme.GetName, \"\")\n re turn NIL\n end\n tempGridDict.Set(aField, newGrid)\n else 'Value field\n tempGridDict.Set(aField, aGrid)\n end 'if\n if ((theModel = \"convert\").Not) then\n n = n + 1\n Av.Run(\"SM.Status.SetPercent\", n / total * 100)\n end\n end 'for each aField\nend 'for each aTheme\n\n\n' Resample/Aggregate grids to final cell size.\n\nif ((theModel = \"convert\").Not) then\n n = 0\n total = 0\n for each aTheme in themeList\n total = total + themeDict.Get(aTheme).Count\n end\n Av.Run(\"SM.Status.SetMes sage\", \"Resampling grids...\")\n Av.Run(\"SM.Status.SetPercent\", 0)\nend\ntheAE.SetExtent(#ANALYSISENV_VALUE, theExtent)\ntheAE.SetCellSize(#ANALYSISENV_VALUE, theCellSize)\ntheAE.Activate\nfor each aTheme in themeList\n for each aField in themeDict.Get(aTheme)\n tempGrid = tempGridDict.Get(aField)\n if (resampleDict.Get(aField) <> NIL) then\n resampleList = resampleDict.Get(aField)\n theEnum = resampleList.Get(1)\n if (resampleList.Get(0) = \"aggregate\") then\n noData = resampleList.Get(2)\n newGrid = tempGrid.Aggregate(1, theEnum, FALSE, noData)\n if (aField.Is(Field) and aField.IsTypeNumber.Not) then\n tmpVTab = tempGrid.GetVTab.Clone\n tmpField = tmpVTab.FindField(\"Value\")\n newVTab = newGrid.GetVTab\n newField = newVTab.FindField(\"Value\")\n newVTab.Join(newField, tmpVTab, tmpField)\n newVTab.SetEditable(TRUE)\n newStrField = tmpVTab.FindField(\"S_Value\").Clone\n newStrField.SetAlias(\"temp\")\n newVTab.AddField s({newStrField})\n newVTab.Calculate(\"[S_Value]\", newStrField)\n newVTab.UnjoinAll\n newStrField.SetAlias(\"S_Value\")\n newVTab.SetEditable(FALSE)\n tmpVTab = NIL\n tmpField = NIL\n Av.PurgeObjects\n end\n else\n newGrid = tempGrid.Resample(theCellSize, theEnum)\n end\n newGrid.GetStatistics\n if (newGrid.HasError) then\n MsgBox.Error(\"Error resampling\" ++ aTheme.GetName, \"\")\n return NIL\n end\n tempGridD ict.Set(aField, newGrid)\n end 'if (resampleDict.Get(aField) <> NIL)\n if ((theModel = \"convert\").Not) then\n n = n + 1\n Av.Run(\"SM.Status.SetPercent\", n / total * 100)\n end\n tempGrid = NIL\n end 'for each aField\nend 'for each aTheme\n\n\n' Tree models and conversion.\n\nif (theModel <> \"log\") then\n\n\n ' Add varNames and associated grids to gridDict. \n \n for each aTheme in themeList\n for each aField in themeDict.Get(aTheme)\n for each aVarName in fieldDict.Get(aField)\n gridDi ct.Set(aVarName, tempGridDict.Get(aField))\n if (keepGrids) then\n newTheme = GTheme.Make(tempGridDict.Get(aField))\n newTheme.SetName(aVarName)\n theView.AddTheme(newTheme)\n end\n end\n end\n end\n\n\n' Logistic models.\n\nelseif (theModel = \"log\") then\n\n\n ' Make grids for class variables and add varNames and associated\n ' grids to gridDict.\n \n for each aTheme in themeList\n for each aField in themeDict.Get(aTheme)\n tempGrid = tempGridDict.Get(aField)\n varNameList = fieldDict.Get(aField)\n \n \n ' Not a class variable.\n \n if (factorList.Find(aField) = -1) then\n varName = varNameList.Get(0)\n gridDict.Set(varName, tempGrid)\n if (keepGrids) then\n newTheme = GTheme.Make(tempGrid)\n newTheme.SetName(varName)\n theView.AddTheme(newTheme)\n end\n \n \n ' Class variable.\n \n else 'factorList.Find <> -1\n\n varNameList.Sort(TRUE)\n fillVal = dummyInfoDict.Get( varNameList.Get(0)).Get(2)\n \n\n ' Find the Field that the dummy value VTab will be joined to.\n \n tempGrid = tempGridDict.Get(aField)\n tempVTab = tempGrid.GetVTab\n if (aField.IsTypeNumber) then\n tempField = tempVTab.FindField(\"Value\")\n else\n tempField = tempVTab.FindField(\"S_value\")\n end\n \n \n ' Make a VTab containing dummy values.\n \n tempVTab.RememberSelection\n tempVTab.GetSelection.ClearAll\n sumFN = tempDir.MakeTmp(\"xxxsm\", \"dbf\")\n sumVTab = tempVTab.Summarize(sumFN, dBASE, tempField,\n {tempField}, {#VTAB_SUMMARY_FIRST})\n tempVTab.SetSelection(tempVTab.GetLastSelection)\n if (sumVTab.HasError) then\n sumVTab = NIL\n theMsg = \"Error creating temporary file\" ++ sumFN.AsString\n MsgBox.Error(theMsg, \"\")\n return NIL\n end\n sumField = sumVTab.FindField(tempField.GetName)\n fieldList = List.Make\n for each varNa me in varNameList\n fieldList.Add(Field.Make(varName, #FIELD_LONG, 4, 0))\n end\n sumVTab.SetEditable(TRUE)\n sumVTab.AddFields(fieldList)\n for each aRec in sumVTab\n theLevel = sumVTab.ReturnValueString(sumField, aRec)\n for each newField in fieldList\n dummyValue = dummyDict.Get(newField.GetName).Get(theLevel)\n if (dummyValue <> NIL) then\n sumVTab.SetValue(newField, aRec, dummyValue.AsNumber)\n else\n sumVTab.SetValue(newField, aRec, fillVal)\n end\n end 'for each newField\n end 'for each aRec\n sumVTab.SetEditable(FALSE)\n \n \n ' Join the VTabs.\n \n tempVTab.Join(tempField, sumVTab, sumField)\n joinList.Add(tempVTab)\n vtabList.Add(sumVTab)\n \n \n ' Create a grid for each varName.\n \n for each varName in varNameList\n parmList = {tempGrid, varName, aTheme.GetName}\n lookupGrid = Av.R un(\"SM.LookupGrid\", parmList)\n if (lookupGrid.Is(Grid).Not) then\n tempVTab = NIL\n sumVTab = NIL\n Av.PurgeObjects\n theMsg = \"Error creating dummy grid from\" ++ aTheme.GetName\n MsgBox.Error(theMsg, \"\")\n return NIL\n end\n newGrid = (lookupGrid = fillVal.AsGrid).SetNull(lookupGrid)\n newGrid.GetStatistics \n if (newGrid.HasError) then\n tempVTab = NIL\n sumVTab = NIL\n Av.Pur geObjects\n theMsg = \"Error creating dummy grid from\" ++ aTheme.GetName\n MsgBox.Error(theMsg, \"\")\n return NIL\n end\n gridDict.Set(varName, newGrid)\n if (keepGrids) then\n newTheme = GTheme.Make(newGrid)\n newTheme.SetName(varName)\n theView.AddTheme(newTheme)\n end\n end 'for each varName\n end 'if factorList.Find <> -1\n end 'for each aField\n end 'for each aTheme\n\n \n ' Create interaction grids.\n \n for each varName in intList\n newGrid = gridDict.Get(intDict.Get(varName).Get(0)) *\n gridDict.Get(intDict.Get(varName).Get(1))\n newGrid.GetStatistics\n if (newGrid.HasError) then\n MsgBox.Error(\"Error creating interaction grid\" ++ varName, \"\")\n return NIL\n end\n gridDict.Set(varName, newGrid)\n if (keepGrids) then\n newTheme = GTheme.Make(newGrid)\n newTheme.SetName(varName)\n theView.AddTheme(newTheme)\n end\n end\n\nend 'theModel\n\nreturn gridDict\n\n" ) (Script.1390 Name: "SM.CreateSample" SourceCode: "' Name: SM.CreateSample\n'\n' Description: Samples polygon and grid themes according to a point\n' theme. Puts the data in a new VTab that can be exported by the user.\n'\n' Parameters:\n' (0) List of lists, where the inner lists are of the form\n' {theme, field} - these are the fields to be sampled\n' (1) Theme containing sample points\n' (2) List of fields in the point theme to be sampled\n' (3) SelRecs (Boolean - TRUE if using selected records only in point\n' theme)\n' (4) Projection of the view - can be NIL if there are no grids to be\n' sampled\n' (5) Dictionary: key=Field, info=name for that field in the sample\n' table (can be NIL if fields shouldn't be renamed)\n'\n' Returns: \n' Successful: VTab containing the sample\n' Unsuccessful: NIL\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n' themeDict: theme, {fields} (if float grid, fields is \"value\")\n' fieldDict: field, newField (if float grid, field is the theme)\n' ---------------------------------------------------------------------\n\n\nsampleList = SELF.Get(0)\npointTheme = SELF.Get(1)\npointFieldList = SELF.Get(2)\nselRecs = SELF.Get(3)\nthePrj = SELF.G et(4)\naliasDict = SELF.Get(5)\nuseAlias = aliasDict <> NIL \n\n\n' Get a list of fields for each theme. While at it, create a\n' dictionary linking old fields to new fields (so that if fields have\n' the same name it becomes the user's problem instead of mine). Also\n' save the selections for each theme.\n\ndictSize = 1 max (sampleList.Count / 2).Floor\nthemeDict = Dictionary.Make(dictSize)\nfieldDict = Dictionary.Make(dictSize)\nfieldList = List.Make\nfor each ptField in pointfieldList\n newField = ptField.Clone\n i f (useAlias) then\n newField.SetAlias(aliasDict.Get(ptField))\n end\n fieldDict.Add(ptField, newField)\n fieldList.Add(newField)\nend\nfor each aSample in sampleList\n theTheme = aSample.Get(0)\n theField = aSample.Get(1)\n if (theField.Is(Field) and (theField.GetName = \"Value\")) then\n theName = theTheme.GetName\n theType = theField.GetType\n theWidth = theField.GetWidth\n thePrecision = theField.GetPrecision\n newField = Field.Make(theName, theType, theWidth, thePrecision)\n if (useAlias) then \n newField.SetAlias(aliasDict.Get(theField))\n end\n fieldDict.Add(theField, newField)\n elseif (theField.Is(Field)) then\n newField = theField.Clone\n if (useAlias) then\n newField.SetAlias(aliasDict.Get(theField))\n end\n fieldDict.Add(theField, newField)\n else\n newField = Field.Make(theTheme.GetName, #FIELD_DECIMAL, 20, 8)\n if (useAlias) then\n newField.SetAlias(aliasDict.Get(theTheme))\n end\n fieldDict.Add(theTheme, newField)\n end\n fieldList.Add(newField)\n if (the meDict.Get(theTheme) = NIL) then\n themeDict.Add(theTheme, {theField})\n else\n themeDict.Get(theTheme).Add(theField)\n end\nend 'for each aSample\n\n\n' Create lists of polygon and grid themes and save selections.\n\npolyThemeList = List.Make\ngridThemeList = List.Make\nfor each aTheme in themeDict.ReturnKeys\n if (aTheme.Is(FTheme)) then\n polyThemeList.Add(aTheme)\n aTheme.GetFTab.RememberSelection\n else\n gridThemeList.Add(aTheme)\n if (aTheme.HasTable) then\n aTheme.GetVTab.RememberSelection\n end\n end\nend\npointTheme.GetFTab.RememberSelection\n\n\n' Create the new VTab.\n\ntheFN = FileName.GetTmpDir.MakeTmp(\"sample\", \"dbf\")\ntheVTab = VTab.MakeNew(theFN, dBASE)\nif (theVTab.HasError) then\n MsgBox.Error(\"Temporary VTab could not be created.\", \"\")\n Av.Run(\"SM.Bail\", {\"sample\", theFN, pointTheme, themeDict, NIL})\n return NIL\nend\ntheVTab.SetEditable(TRUE)\ntheVTab.AddFields(fieldList)\n\n\n' Sample all themes at each point.\n\npointFTab = pointTheme.GetFTab\nif (selRecs.Not) then\n pointFTab.GetSelection.Se tAll\nend\nshapeField = pointFTab.FindField(\"Shape\")\n\nn = 0\nnumPoints = pointFTab.GetNumSelRecords\nstatusDlg = Av.FindDialog(\"SM.Status\")\nAv.Run(\"SM.Status.SetMessage\", \"Sampling themes...\")\nAv.Run(\"SM.Status.SetPercent\", 0)\nAv.ShowStopButton\nstatusDlg.Open\n\nfor each ptRec in pointFTab.GetSelection\n newRec = theVTab.AddRecord\n \n for each aField in pointFieldList\n fieldValue = pointFTab.ReturnValue(aField, ptRec)\n theVTab.SetValue(fieldDict.Get(aField), newRec, fieldValue)\n end\n\n thePoint = pointFTa b.ReturnValue(shapeField, ptRec)\n \n for each polyTheme in polyThemeList\n polyFTab = polyTheme.GetFTab\n polyFTab.SelectByPoint(thePoint, 0, #VTAB_SELTYPE_NEW)\n polyRec = polyFTab.GetSelection.GetNextSet(-1)\n for each aField in themeDict.Get(polyTheme)\n newField = fieldDict.Get(aField)\n if (polyRec <> -1) then\n fieldValue = polyFTab.ReturnValue(aField, polyRec)\n theVTab.SetValue(newField, newRec, fieldValue)\n elseif (aField.IsTypeNumber) then\n theVTab.SetValue (newField, newRec, Number.MakeNull)\n end 'if (polyRec <> -1)\n end 'for each aField\n end 'for each polyTheme\n \n for each gridTheme in gridThemeList\n cellVal = gridTheme.GetGrid.CellValue(thePoint, thePrj)\n for each aField in themeDict.Get(gridTheme)\n if (aField.Is(String)) then\n theVTab.SetValue(fieldDict.Get(gridTheme), newRec, cellVal)\n elseif (aField.GetName = \"Value\") then\n theVTab.SetValue(fieldDict.Get(aField), newRec, cellVal)\n elseif (cellVal.IsNull) then \n if (aField.IsTypeNumber) then\n theVTab.SetValue(fieldDict.Get(aField), newRec, cellVal)\n end\n else\n gridVTab = gridTheme.GetVTab\n resultBitmap = gridVTab.GetSelection.Clone\n queryStr = \"[Value] =\" ++ cellVal.AsString\n gridVTab.Query(queryStr, resultBitmap, #VTAB_SELTYPE_NEW)\n recNum = resultBitmap.GetNextSet(-1)\n fieldValue = gridVTab.ReturnValue(aField, recNum)\n theVTab.SetValue(fieldDict.Get(aField), newRec, fieldValue)\n e nd 'if (aField...\n end 'for each aField\n end 'for each gridTheme\n\n if ((n mod 50) = 0) then\n theVTab.Flush\n Av.PurgeObjects\n end\n \n if (Av.Run(\"SM.Status.SetPercent\", n / numPoints * 100).Not) then\n theVTab = NIL\n fieldDict = NIL\n fieldList = NIL\n newField = NIL\n Av.Run(\"SM.Bail\", {\"sample\", theFN, pointTheme, themeDict, NIL})\n return NIL\n end\n n = n + 1 \n\nend 'for each ptRec\n\n\n' Clean up and return.\n\nfor each aTheme in themeDict.ReturnKeys\n if (aTheme.Is(FTheme)) then\n aVTab = aTheme.GetFTab\n aVTab.SetSelection(aVTab.GetLastSelection)\n aVTab.UpdateSelection\n elseif (aTheme.HasTable) then\n aVTab = aTheme.GetVTab\n aVTab.SetSelection(aVTab.GetLastSelection)\n aVTab.UpdateSelection\n end\nend\npointFTab.SetSelection(pointFTab.GetLastSelection)\npointFTab.UpdateSelection\n\nAv.Run(\"SM.Bail\", {\"sample\", NIL, pointTheme, themeDict, theVTab})\nif (theVTab.HasError) then\n MsgBox.Error(\"Error creating sample table.\", \"\")\n return NIL\nelse\n return theVTab\nend\n" ) (Script.1391 Name: "SM.GetFields" SourceCode: "' Name: SM.GetFields\n'\n' Description: Checks that all necessary themes are loaded, and\n' loads them if they're not.\n'\n' Parameters:\n' (0) View\n' (1) List of variable names used in the final model\n' (2) Dictionary: key=Theme, info=List of fields used in that theme as\n' independent variables\n' (3) Dictionary: key=Field, info=List of variable names for that field\n' (4) Dictionary: key=variable name, info={Theme, Field}\n' (5) Dictionary: key=Field, info=alias (which is the variable name,\n' unless it is a fiel d that will be used to create dummy variables, in\n' which case it gets a slightly different name showing that it is the\n' original field)\n' (6) List of fields that are used as class/factor variables\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\n' Get passed parameters.\n\ntheView = SELF.Get(0)\nvarList = SELF.Get(1)\nthemeDict = SELF.Get(2)\nfieldDict = SELF.Get(3)\nvarDict = SELF.Get(4)\naliasDict = SELF.Get(5)\nclassList = SELF.Get(6)\nasciiNum = 65\n\n\n' Cycle through each varName in the model.\n\nfor each varName in varList\n\n theInfo = varDict.Get(varName)\n odbTheme = theInfo.Get(0)\n odbField = theIn fo.Get(1)\n if (theInfo.Count = 3) then\n odbStat = theInfo.Get(2)\n else\n odbStat = NIL\n end\n odbSrc = odbTheme.GetSrcName.GetDataSource\n if (odbTheme.Is(FTheme)) then\n odbDef = odbTheme.GetFTab.GetDefinition\n isGrid = FALSE\n else\n isGrid = TRUE\n end\n \n \n ' Try and find the theme.\n \n realTheme = theView.FindTheme(odbTheme.GetName)\n\n\n ' If found theme with correct name, check and make sure it has the\n ' right data source.\n \n if (realTheme <> NIL) then\n realSrc = realTheme.GetS rcName.GetDataSource\n if (realTheme.Is(FTheme)) then\n realDef = realTheme.GetFTab.GetDefinition\n end\n if ((odbSrc <> realSrc) or (isGrid <> realTheme.Is(GTheme)) or \n (isGrid.Not and (odbDef <> realDef))) then\n realTheme = NIL\n odbTheme.SetName(odbTheme.GetName ++ \"(model)\")\n end\n end\n\n\n ' If theme not found, check data sources of all themes in case user\n ' changed theme name.\n \n if (realTheme = NIL) then\n for each aTheme in theView.GetThemes\n if (isGrid <> aTh eme.Is(GTheme)) then\n continue\n end\n theSrc = aTheme.GetSrcName.GetDataSource\n if (aTheme.Is(FTheme)) then\n theDef = aTheme.GetFTab.GetDefinition\n if ((odbSrc = theSrc) and (odbDef = theDef)) then\n realTheme = aTheme\n break\n end\n elseif (odbSrc = theSrc) then\n realTheme = aTheme\n break\n end\n end\n end\n \n\n ' Find the real field.\n \n if (realTheme <> NIL) then\n if (odbField.Is(Field).Not) then\n realField = realT heme\n elseif (isGrid.Not) then\n realField = realTheme.GetFTab.FindField(odbField.GetName)\n elseif (realTheme.HasTable and odbField.Is(Field)) then\n realField = realTheme.GetVTab.FindField(odbField.GetName)\n else\n realTheme = NIL\n end\n if (realField = NIL) then\n realTheme = NIL\n end\n end\n\n \n ' Add theme if not already in the view.\n \n if (realTheme = NIL) then\n theView.AddTheme(odbTheme)\n realTheme = odbTheme\n realField = odbField\n end\n \n \n ' Update dict ionaries.\n \n fieldList = themeDict.Get(realTheme)\n if (fieldList = NIL) then \n themeDict.Set(realTheme, {realField})\n elseif (fieldList.Find(realField) = -1) then\n fieldList.Add(realField)\n end\n varNameList = fieldDict.Get(realField)\n if (varNameList = NIL) then\n fieldDict.Set(realField, {varName})\n if (fieldDict.Get(odbField).Count > 1) then\n alias = varName.Left(6).BasicTrim(\"\", \"0123456789\") + \n asciiNum.AsChar\n asciiNum = asciiNum + 1\n aliasDict.Set(realFie ld, alias)\n if (classList <> NIL) then\n classList.Add(realField)\n end\n else\n aliasDict.Set(realField, varName)\n end\n fieldDict.Remove(odbField)\n else\n fieldDict.Set(realField, varNameList.Add(varName))\n end\n varDict.Set(varName, {realTheme, realField, odbStat})\n\nend 'for each varName\n\n" ) (Script.1392 Name: "SM.GridResample.Click" SourceCode: "' Name: SM.GridResample.Click\n'\n' Description: Click scripts for controls in SM.GridResample.\n'\n' Self: lbtCancel, lbtHelp, lbtNext, radBilinear, radCubic, radMax,\n' radMean, radMedian, radMin, radNN, radSum\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation a re not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nresampleDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbtCancel: Close dialog and set object tag to NIL.\n\nif (SELF.GetName = \"lbtCancel\") then\n resampleDlg.SetObjectTag(NIL)\n resampleDlg.Close\n\n\n' ---------------------------------------------------------------------\n' lbtHelp: Open help.\n \nelseif (SELF.GetName = \"lbtHelp\") then\n Av.Run(\"SM.Help\", SELF)\n\n\n' ---------------------------------------------------------------------\n' lbtNext: Put the current resample info into the resample dictionary\n' and then move to the next field (or close the dialog).\n\nelseif (SELF.GetName = \"lbtNext\") then\n txtTheme = resampleDlg.FindByName(\"txtTheme\")\n txtField = resampleDlg.FindByName(\"txtField\")\n txtCellSize = resampleDlg.FindByName(\"txtCellSize\")\n radNN = resampleDlg.FindByName(\"radNN\")\n radBilinea r = resampleDlg.FindByName(\"radBilinear\")\n radCubic = resampleDlg.FindByName(\"radCubic\")\n radMean = resampleDlg.FindByName(\"radMean\")\n radSum = resampleDlg.FindByName(\"radSum\")\n cpaResample = resampleDlg.FindByName(\"cpaResample\")\n\n parmList = resampleDlg.GetObjectTag\n themeList = parmList.Get(1)\n themeDict = parmList.Get(2)\n fieldDict = parmList.Get(3)\n classList = parmList.Get(4)\n resampleDict = parmList.Get(5)\n themeIndex = SELF.GetObjectTag.Get(0)\n fieldIndex = SELF.GetObjectTag.Get(1)\n fiel dList = themeDict.Get(themeList.Get(themeIndex))\n\n\n ' Set resample method and add to dictionary.\n \n if (resampleDlg.FindByName(\"radNN\").IsSelected) then\n resampleList = {\"resample\", #GRID_RESTYPE_NEAREST}\n elseif (resampleDlg.FindByName(\"radBilinear\").IsSelected) then\n resampleList = {\"resample\", #GRID_RESTYPE_BILINEAR}\n elseif (resampleDlg.FindByName(\"radCubic\").IsSelected) then\n resampleList = {\"resample\", #GRID_RESTYPE_CUBIC}\n elseif (resampleDlg.FindByName(\"radMax\").IsSelected) then\n r esampleList = {\"aggregate\", #GRID_STATYPE_MAX}\n elseif (resampleDlg.FindByName(\"radMean\").IsSelected) then\n resampleList = {\"aggregate\", #GRID_STATYPE_MEAN}\n elseif (resampleDlg.FindByName(\"radMedian\").IsSelected) then\n resampleList = {\"aggregate\", #GRID_STATYPE_MEDIAN}\n elseif (resampleDlg.FindByName(\"radMin\").IsSelected) then\n resampleList = {\"aggregate\", #GRID_STATYPE_MIN}\n elseif (resampleDlg.FindByName(\"radSum\").IsSelected) then\n resampleList = {\"aggregate\", #GRID_STATYPE_SUM}\n end\n\n if (resampleList.Get(0) = \"aggregate\") then\n resampleList.Add(resampleDlg.FindByName(\"chkData\").IsSelected)\n else\n resampleList.Add(NIL)\n end\n\n resampleDict.Set(fieldList.Get(fieldIndex), resampleList) \n\n \n ' Move to next field.\n \n if ((fieldIndex + 1) = fieldList.Count) then\n fieldIndex = 0\n themeIndex = themeIndex + 1\n else\n fieldIndex = fieldIndex + 1\n end\n \n if ((themeIndex) < themeList.Count) then\n SELF.SetObjectTag({themeIndex, fieldIndex})\n theTheme = themeList.Get(th emeIndex)\n theField = themeDict.Get(theTheme).Get(fieldIndex)\n theGrid = theTheme.GetGrid\n txtTheme.SetLabel(\"Theme:\" ++ theTheme.GetName)\n if (theField.Is(Field)) then\n txtField.SetLabel(\"Field:\" ++ theField.GetAlias)\n else\n txtField.SetLabel(\"Field: Value\")\n end\n txtCellSize.SetLabel(\"Cell Size:\" ++ theGrid.GetCellSize.AsString)\n isClass = classList.Find(theField) <> -1\n radMean.SetEnabled(isClass.Not)\n radSum.SetEnabled(isClass.Not)\n radBilinear.SetEnabled(isCla ss.Not)\n radCubic.SetEnabled(isClass.Not)\n radList = {radMean, radSum, radBilinear, radCubic}\n if (isClass and (radList.Find(cpaResample.GetSelected) <> -1)) then\n radNN.Select\n radNN.BroadcastUpdate\n end\n else\n resampleDlg.Close\n end\n\n\n' ---------------------------------------------------------------------\n \nend\nSELF.BroadcastUpdate\n" ) (Script.1393 Name: "SM.GridResample.Open" SourceCode: "' Name: SM.GridResample.Open\n'\n' Description: Open script for SM.GridResample. Fills the dialog\n' with the information for the first theme/field. This is a modal\n' dialog, but it does not return anything. Instead, the dialog's\n' Object Tag is set as NIL if the dialog should not return anything.\n' If everything works, then the return value can be considered the\n' last item in the Object Tag (item 5 in the parameter list).\n'\n' Parameters: (passed as an object tag)\n' (0) Target cell size (Number)\n' (1) L ist of themes used in the model\n' (2) Dictionary: key=Themes, info=List of fields used in the model\n' (3) Dictionary: key=Field, info=Lists of variable names\n' (4) List of fields that are used as classes\n' (5) Dictionary: key=Field, info={convertType, enum, noData}\n' where convertType is \"aggregate\" or \"resample\", enum is the enum for\n' the Aggregate or Resample request, and noData is TRUE if Aggregate\n' should result in NODATA if any of the input cells are NODATA\n'\n' Self: SM.GridResample\n'\n' Copyright No tice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\n' Get passed parameters and find controls.\n\nparmList = SELF .GetObjectTag\ncellSize = parmList.Get(0)\nthemeList = parmList.Get(1)\nthemeDict = parmList.Get(2)\nfieldDict = parmList.Get(3)\nclassList = parmList.Get(4)\nresampleDict = parmList.Get(5)\n\ntxtTheme = SELF.FindByName(\"txtTheme\")\ntxtField = SELF.FindByName(\"txtField\")\ntxtCellSize = SELF.FindByName(\"txtCellSize\")\ntxtTarget = SELF.FindByName(\"txtTarget\")\n\n\n' Set index object tag and control labels.\n\nSELF.FindByName(\"lbtNext\").SetObjectTag({0, 0})\n\nfirstTheme = themeList.Get(0)\nfirstField = themeDict.Get(firstTheme) .Get(0)\nfirstGrid = firstTheme.GetGrid\ntxtTheme.SetLabel(\"Theme:\" ++ firstTheme.GetName)\nif (firstField.Is(Field)) then\n txtField.SetLabel(\"Field:\" ++ firstField.GetAlias)\nelse\n txtField.SetLabel(\"Field: Value\")\nend\ntxtCellSize.SetLabel(\"Cell Size:\" ++ firstGrid.GetCellSize.AsString)\ntxtTarget.SetLabel(\"Target Cell Size:\" ++ cellSize.AsString)\n\n\n' If a class variable, then disable inappropriate radio buttons.\n\nisClass = classList.Find(firstField) <> -1\nSELF.FindByName(\"radMean\").SetEnabled(isClass.Not)\nSE LF.FindByName(\"radSum\").SetEnabled(isClass.Not)\nSELF.FindByName(\"radBilinear\").SetEnabled(isClass.Not)\nSELF.FindByName(\"radCubic\").SetEnabled(isClass.Not)\n \n\n' Initialize.\n\nradNN = SELF.FindByName(\"radNN\")\nradNN.Select\nradNN.Click\n" ) (Script.1394 Name: "SM.GridResample.Update" SourceCode: "' Name: SM.GridResample.Update\n'\n' Description: Update scripts for controls in SM.GridResample.\n'\n' Self: chkData\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n ' ---------------------------------------------------------------------\n\n\nresampleDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' chkData: Enable/disable based on the resample method. This option\n' isn't needed for Resample.\n\nif (SELF = resampleDlg.FindByName(\"chkData\")) then\n if (resampleDlg.FindByName(\"radNN\").IsSelected or \n resampleDlg.FindByName(\"radBilinear\").IsSelected or \n resampleDlg.FindByName(\"radCubic\").IsSelected) then\n SELF.SetEn abled(FALSE)\n else\n SELF.SetEnabled(TRUE)\n end\n\n\n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1395 Name: "SM.GridSize.Click" SourceCode: "' Name: SM.GridSize.Click\n'\n' Description: Click scripts for controls in SM.GridSize.\n'\n' Self: lbtCancel, lbtHelp, lbtOK\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documen tation.\n' ---------------------------------------------------------------------\n\n\ntheDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbtCancel: Close dialog.\n\nif (SELF.GetName = \"lbtCancel\") then\n theDlg.SetModalResult(NIL)\n theDlg.Close\n \n\n' ---------------------------------------------------------------------\n' lbtHelp: Open help.\n\nelseif (SELF.GetName = \"lbtHelp\") then\n Av.Run(\"SM.Help\", SELF)\n\n\n' ----------------------------------------------------- ----------------\n' lbtOK: Return choices ({theField, cellSize, theExtent}) and close\n' the dialog.\n\nelseif (SELF.GetName = \"lbtOK\") then\n theView = theDlg.GetObjectTag.Get(0)\n theField = theDlg.FindByName(\"cbxField\").GetSelection\n sizeStr = theDlg.FindByName(\"cbxCellSize\").GetSelection\n if (sizeStr = \"As specified below\") then\n txlCellSize = theDlg.FindByName(\"txlCellSize\")\n cellSize = txlCellSize.GetText.AsNumber\n if (cellSize.IsNull) then\n MsgBox.Error(\"You must enter a cell size.\", \"\") \n txlCellSize.Focus\n return NIL\n elseif (cellSize <= 0) then\n MsgBox.Error(\"Cell size must be greater than 0.\", \"\")\n txlCellSize.Focus\n return NIL\n end\n else\n themeName = sizeStr.Right(sizeStr.Count - 8)\n cellSize = theView.FindTheme(themeName).GetGrid.GetCellSize\n end\n extentStr = theDlg.FindByName(\"cbxExtent\").GetSelection\n themeName = extentStr.Right(extentStr.Count - 8)\n theExtent = theView.FindTheme(themeName).ReturnExtent\n theDlg.SetModalResult({theField, cel lSize, theExtent})\n theDlg.Close\n\n\n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1396 Name: "SM.GridSize.Close" SourceCode: "' Name: SM.GridSize.Close\n'\n' Description: Close script for SM.GridSize. Empties combo boxes so\n' that ArcView doesn't think the data sets are still being used.\n'\n' Self: SM.GridSize\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit a nd this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nSELF.FindByName(\"cbxField\").Empty\nSELF.FindByName(\"cbxCellSize\").Empty\nSELF.FindByName(\"cbxExtent\").Empty\n" ) (Script.1397 Name: "SM.GridSize.Open" SourceCode: "' Name: SM.GridSize.Open\n'\n' Description: Open script for SM.GridSize. This is a model dialog.\n'\n' Parameters: passed as an object tag\n' (0) View\n' (1) FTheme\n'\n' Self: SM.GridSize\n'\n' Returns: {field (a string if all fields), cell size, extent}\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nparmList = SELF.GetObjectTag\ntheView = parmList.Get(0)\ntheTheme = parmList.Get(1)\n\nif (theTheme.Is(GTheme)) then\n theGrid = theTheme.GetGrid\n if (theGrid.IsInteger and theTheme.HasTable.Not) then\n theGrid.BuildVAT\n end\nend\nif (theTheme.HasTable.Not) then\n fieldList = {\"Value\"}\nelse\n fieldList = theTheme.GetVTab.GetFields.Clone\n fieldList.Sort(TRUE)\n fieldList.Insert(\"All fields\")\nend\nsizeList = List.Make\nextentList = List.Make\nfor each aTheme in theView.GetThemes\n extentList.Add(\"Same as\" ++ aTheme.GetName)\n if (aTheme.Is(GTheme)) then\n sizeList.Add(\"Same as\" ++ aTheme.GetName)\n end\nend\nsizeList.Sort(TRUE)\nextentList.Sort(TRUE)\nsizeList.Add(\"As specified below\")\n\nSELF.FindByName(\"cbxField\").DefineFromList(fieldList)\nSELF.FindByName(\"cbxCellSize\").DefineFromList(sizeList)\nSELF.FindByName(\"c bxExtent\").DefineFromList(extentList)\n\nSELF.FindByName(\"cbxField\").Focus\n" ) (Script.1398 Name: "SM.Help" SourceCode: "' Name: SM.Help\n'\n' Description: Opens help.\n'\n' Parameters: Button that called help.\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------- -----------------------------------------\n\n\nif (SELF.Is(Choice)) then\n scriptName = \"SM.Help.Menu\"\nelse\n dialogName = SELF.GetDialog.GetName\n scriptName = \"SM.Help.\" + dialogName.Right(dialogName.Count - 3)\nend\nMsgBox.Report(Av.Run(scriptName, NIL), \"StatMod Help\")\n" ) (Script.1399 Name: "SM.Intersect" SourceCode: "' Name: SM.Intersect\n'\n' Description: Intersects multiple polygon themes.\n'\n' Parameters: theView, theFN, themeDict, aliasDict (opt)\n' (0) View containing the themes to be intersected\n' (1) FileName of the shapefile to be returned\n' (2) Dictionary: key=Theme, info=List of fields to be included in the\n' new shapefile\n' (3) Optional Dictionary: key=Field, info=Alias for the new field\n'\n' Returns:\n' Successful: FTheme\n' Unsuccessful: NIL\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard \n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\n' Get the parameters.\n\ntheView = SELF.Get(0)\ntheFN = SELF.Get(1)\nthemeDict = SELF.Get(2).Clone\nif (SELF.Cou nt = 4) then\n aliasDict = SELF.Get(3)\n useAlias = TRUE\nelse\n useAlias = FALSE\nend\n\nthemeList = themeDict.ReturnKeys\nnumThemes = themeList.Count\nfieldDict = Dictionary.Make(numThemes * 2)\n\nif (numThemes = 0) then\n return NIL\nend\n\n\n' Open the status dialog.\n\nstatusDlg = Av.FindDialog(\"SM.Status\")\nAv.Run(\"SM.Status.SetMessage\", \"Intersecting themes...\")\nAv.Run(\"SM.Status.SetPercent\", NIL)\nstatusDlg.Open\nAv.ProcessAllInvals\n\n\n' Save the set projection and unset it until the end.\n\nthePrj = theView.GetProject ion.Clone\nif (thePrj.IsNull.Not) then\n mapUnits = theView.GetUnits.Clone\n theView.SetProjection(Prj.MakeNull)\n bailList = {theView, thePrj, mapUnits}\nelse\n bailList = List.Make\nend\n\n\n' If there is only one theme, then just copy it and delete the\n' unwanted fields.\n\nif (numThemes = 1) then\n inTheme = themeList.Get(0)\n inFTab = inTheme.GetFTab\n fieldList = themeDict.Get(inTheme)\n outFTab = inFTab.Export(theFN, Shape, FALSE)\n if (outFTab.HasError) then\n themeDict.Empty\n Av.Run(\"SM.Bail\", {\"inter sect\", {inFTab, outFTab}, bailList})\n return NIL\n end\n \n outFTab.SetEditable(TRUE)\n for each aField in inFTab.GetFields\n if (aField.GetName = \"Shape\") then\n continue\n end\n outField = outFTab.FindField(aField.GetName)\n if (outField = NIL) then\n continue\n end\n if (fieldList.Find(aField) = -1) then\n outFTab.RemoveFields({outField})\n elseif (useAlias and (aliasDict.Get(aField) <> NIL)) then\n outField.SetAlias(aliasDict.Get(aField))\n end\n end\n \n themeDict.Emp ty\n Av.Run(\"SM.Bail\", {\"intersect\", {inFTab, outFTab}, bailList})\n return FTheme.Make(outFTab)\nend\n\n\n' Get the first two themes and then cycle through the theme list. \n \ntheme1 = themeList.Get(0)\ntheme2 = themeList.Get(1)\n\nfor each n in 2..numThemes\n\n\n ' Find out which theme has the least polygons. This is for the sake\n ' of efficiency.\n \n if (theme1.GetFTab.GetNumRecords > theme2.GetFTab.GetNumRecords) then\n tempTheme = theme1\n theme1 = theme2\n theme2 = tempTheme\n tempTheme = NIL\n end\n\n \n ' Get info about the themes, including the current selection so it\n ' can be restored later. Index the themes if needed.\n \n theme1FTab = theme1.GetFTab\n theme1ShapeField = theme1FTab.FindField(\"Shape\")\n theme1Name = theme1.GetName\n theme1NumRec = theme1FTab.GetNumRecords\n theme1FieldList = themeDict.Get(theme1)\n theme1Selection = theme1FTab.GetSelection.Clone\n if (theme1Ftab.IsFieldIndexed(theme1ShapeField) = FALSE) then\n theme1FTab.CreateIndex(theme1ShapeField)\n end\n \n theme2FTab = the me2.GetFTab\n theme2ShapeField = theme2FTab.FindField(\"Shape\")\n theme2Name = theme2.GetName\n theme2NumRec = theme2FTab.GetNumRecords\n theme2FieldList = themeDict.Get(theme2)\n theme2Selection = theme2FTab.GetSelection.Clone\n if (theme2Ftab.IsFieldIndexed(theme2ShapeField) = FALSE) then\n theme2FTab.CreateIndex(theme2ShapeField)\n end\n \n\n ' If this is not the final pass, create a filename for the new FTab.\n \n if (n = numThemes) then\n outFTab = FTab.MakeNew(theFN, polygon)\n else\n tempFN = Fil eName.GetTmpDir.MakeTmp(\"xxxsm\", \"shp\")\n outFTab = FTab.MakeNew(tempFN, polygon)\n end\n if (outFTab.HasError) then\n theme1FTab.SetSelection(theme1Selection)\n theme1FTab.UpdateSelection\n theme2FTab.SetSelection(theme2Selection)\n theme2FTab.UpdateSelection\n ftabList = {theme1FTab, theme2FTab, outFTab}\n themeDict.Empty\n Av.Run(\"SM.Bail\", {\"intersect\", ftabList, bailList})\n return NIL\n end\n outShapeField = outFTab.FindField(\"Shape\")\n\n\n ' Add fields from the two themes being inters ected in this pass.\n ' Don't add fields for theme2 if there is only one theme in the list.\n \n for each aField in theme1FieldList\n newField = aField.Clone\n outFTab.AddFields({newField})\n fieldDict.Set(aField, newField)\n if (useAlias) then \n newField.SetAlias(aliasDict.Get(aField))\n end\n end\n\n for each aField in theme2FieldList\n newField = aField.Clone\n outFTab.AddFields({newField})\n fieldDict.Set(aField, newField)\n if (useAlias and (n = 2)) then \n newField.SetAlias (aliasDict.Get(aField))\n end\n end\n newField = NIL\n\n \n ' Show progress.\n\n theMsg = \"Intersecting themes (\" + n.AsString ++ \"of\" ++ \n numThemes.AsString + \")...\"\n Av.Run(\"SM.Status.SetMessage\", theMsg)\n Av.ClearMsg\n aMsg = \"Intersecting\" ++ theme1Name ++ \"and\" ++ theme2Name + \"...\"\n Av.ShowMsg(aMsg)\n Av.ShowStopButton\n Av.SetStatus(0)\n Av.UseWaitCursor\n count = 0\n\n \n ' If the themes have the same source, don't go through the whole\n ' intersection routine. Instead, apply both definitions to theme1\n ' and then copy theme1 shapes to the new FTab. Add the attributes\n ' from theme1 and theme2 (if necessary) to the output FTab.\n \n if (theme1.GetSrcName.AsString = theme2.GetSrcName.AsString) then\n\n theme1Def = theme1FTab.GetDefinition\n theme2Def = theme2FTab.GetDefinition\n if (theme2Def <> \"\") then\n theme1FTab.SetDefinition(theme1Def ++ \"and\" ++ theme2Def)\n theme1FTab.UpdateDefBitmap\n end\n \n for each rec1 in theme1FTab\n theme1Shape = theme1FTab.ReturnValue (theme1ShapeField, rec1)\n if (theme1Shape.IsNull) then \n continue \n end\n for each aPart in theme1Shape.Explode\n if (aPart.IsNull) then \n continue \n end\n newRec = outFTab.AddRecord\n outFTab.SetValue(outShapeField, newRec, aPart)\n for each aField in theme1FieldList\n theValue = theme1Ftab.ReturnValue(aField, rec1)\n outFTab.SetValue(fieldDict.Get(aField), newRec, theValue)\n end\n for each aField in theme2FieldList\n theField = theme1FTab.FindField(aField.GetAlias)\n theValue = theme1Ftab.ReturnValue(theField, rec1)\n outFTab.SetValue(fieldDict.Get(aField), newRec, theValue)\n end\n end 'for each aPart\n count = count + 1\n if (Av.SetStatus(count / theme1NumRec * 100).Not) then\n theme1FTab.SetSelection(theme1Selection)\n theme1FTab.UpdateSelection\n theme2FTab.SetSelection(theme2Selection)\n theme2FTab.UpdateSelection\n ftabList = {theme1FTab, the me2FTab, outFTab}\n themeDict.Empty\n Av.Run(\"SM.Bail\", {\"intersect\", ftabList, bailList})\n return NIL\n end\n end 'for each rec1\n \n theme1FTab.SetDefinition(theme1Def)\n theme1FTab.UpdateDefBitmap\n\n \n ' If the themes do not have the same source, do the intersection.\n ' Cycle through all polygons in theme1 (the one with the least\n ' number of polygons). Make sure each polygon is not something like\n ' the universal polygon in ArcInfo coverages. Select the shapes in\n ' theme2 that intersect with the current shape in theme1. Make sure\n ' at least one is selected. For each selected shape in theme2, get\n ' the intersection between that shape and the current theme1 shape.\n ' Add the intersection to the output FTab. Add the attributes from\n ' theme1 and theme2 to the output FTab. Reset the theme selections\n ' (they will change during the intersection step).\n\n else 'not (theme1.GetSrcName.AsString = theme2.GetSrcName.AsString)\n\n for each rec1 in theme1FTab\n th eme1Shape = theme1FTab.ReturnValue(theme1ShapeField, rec1)\n if (theme1Shape.IsNull) then \n continue \n end \n theme2FTab.SelectbyShapes({theme1Shape}, #VTAB_SELTYPE_NEW)\n if (theme2FTab.GetSelection.Count = 0) then \n continue \n end\n for each rec2 in theme2FTab.GetSelection\n theme2Shape = theme2FTab.ReturnValue(theme2ShapeField, rec2)\n if (theme2Shape.IsNull) then \n continue \n end \n intersectShape = theme1Shape.ReturnIntersection( theme2Shape)\n if (intersectShape.IsNull) then \n continue \n end\n for each aPart in intersectShape.Explode\n if (aPart.IsNull) then \n continue \n end\n newRec = outFTab.AddRecord\n outFTab.SetValue(outShapeField, newRec, aPart)\n for each aField in theme1FieldList\n theValue = theme1FTab.ReturnValue(aField, rec1)\n outFTab.SetValue(fieldDict.Get(aField), newRec, theValue)\n end\n for each aFiel d in theme2FieldList\n theValue = theme2FTab.ReturnValue(aField, rec2)\n outFTab.SetValue(fieldDict.Get(aField), newRec, theValue)\n end\n end 'for each aPart\n end 'for each rec2\n count = count + 1\n if (Av.SetStatus(count / theme1NumRec * 100).Not) then\n theme1FTab.SetSelection(theme1Selection)\n theme1FTab.UpdateSelection\n theme2FTab.SetSelection(theme2Selection)\n theme2FTab.UpdateSelection\n ftabList = {theme1FTab, theme2FTa b, outFTab}\n themeDict.Empty\n Av.Run(\"SM.Bail\", {\"intersect\", ftabList, bailList})\n return NIL\n end\n end 'for each rec1\n\n theme1FTab.SetSelection(theme1Selection)\n theme1FTab.UpdateSelection\n theme2FTab.SetSelection(theme2Selection)\n theme2FTab.UpdateSelection\n\n end 'if (theme1.GetSrcName.AsString = theme2.GetSrcName.AsString)\n \n fieldDict.Empty\n Av.ClearMsg\n Av.PurgeObjects\n outFTab.SetEditable(FALSE) \n \n\n ' Index the new FTab and make the theme.\n \n if (out Ftab.IsFieldIndexed(outShapeField) = FALSE) then\n outFTab.CreateIndex(outShapeField)\n end\n\n outTheme = FTheme.Make(outFTab)\n\n\n ' If more passes are needed, make theme1 the new theme, and make\n ' theme2 the next theme in the list.\n \n if (n < numThemes) then\n outFieldList = outFTab.GetFields.Clone\n outFieldList.RemoveObj(outShapeField)\n themeDict.Add(outTheme, outFieldList)\n theme1 = outTheme\n theme2 = themeList.Get(n)\n end\n\nend 'for each n\n\nthemeDict.Empty\nAv.Run(\"SM.Bail\", {\"interse ct\", {theme1FTab, theme2FTab}, bailList})\nreturn outTheme\n" ) (Script.1400 Name: "SM.IntersectThemes.Apply" SourceCode: "' Name: SM.IntersectThemes.Apply\n'\n' Description: Apply scripts for controls in SM.IntersectThemes.\n'\n' Self: lbxFields, lbxIntersect\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nintersectDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbxFields: Run the click script for the Add button.\n\nif (SELF.GetName = \"lbxFields\") then\n intersectDlg.FindByName(\"lbtAdd\").Click\n\n\n' ---------------------------------------------------------------------\n' lbxIntersect: Run the click script for the Remove button.\n\nelseif (SELF.GetName = \"lbxIntersect\") then \n intersectDlg.FindByName(\"lbtRemove\").Click\n\n\n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1401 Name: "SM.IntersectThemes.Click" SourceCode: "' Name: SM.IntersectThemes.Click\n'\n' Description: Click scripts for controls in SM.IntersectThemes.\n'\n' Self: lbtAdd, lbtCancel, lbtHelp, lbtOK, lbtRemove\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nintersectDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbtAdd: Add the selected fields to the sample listbox. The fields\n' listbox will be updated in response to the BroadcastUpdate at the\n' end of this script.\n\nif (SELF.GetName = \"lbtAdd\") then\n selList = intersectDlg.FindByName(\"lbxFields\").GetSelection\n if (selList.Count > 0) then\n \n \n ' For each selected field, add it and the theme to the sample list.\n \n theTheme = intersectDlg.FindByName(\"lbxThemes\").GetSelection.Get(0)\n lbxIntersect = intersectDlg.FindByName(\"lbxIntersect\")\n intersectList = lbxIntersect.GetList\n for each aField in selList\n intersectList.Add({theTheme, aField})\n end\n \n \n ' Fill the sample listbox.\n \n intersectList = Av.Run(\"SM.Library\", {\"Sort2\", intersectList})\n lbxIntersect.DefineFromList(intersectList)\n \n end\n \n\n' - --------------------------------------------------------------------\n' lbtCancel: Close the dialog and empty controls so that ArcView\n' doesn't think that the data sets are still being used.\n\nelseif (SELF.GetName = \"lbtCancel\") then\n intersectDlg.Close\n intersectDlg.FindByName(\"lbxThemes\").Empty\n intersectDlg.FindByName(\"lbxFields\").Empty\n intersectDlg.FindByName(\"lbxIntersect\").Empty\n\n\n' ---------------------------------------------------------------------\n'lbtHelp: Open help.\n\nelseif (SELF.GetName = \"lbtHelp\") then\n Av.Run(\"SM.Help\", SELF)\n\n\n' ---------------------------------------------------------------------\n' lbtOK: Close the dialog and intersect the themes.\n\nelseif (SELF.GetName = \"lbtOK\") then\n intersectDlg.Close\n theView = intersectDlg.GetObjectTag\n \n \n ' Make the dictionary to pass to the intersect script.\n \n intersectList = intersectDlg.FindByName(\"lbxIntersect\").GetList\n themeDict = Dictionary.Make(1 max (intersectList.Count / 2).Floor)\n for each aRow in intersectList\n theThem e = aRow.Get(0)\n theField = aRow.Get(1)\n fieldList = themeDict.Get(theTheme)\n if (fieldList = NIL) then\n themeDict.Set(theTheme, {theField})\n else\n fieldList.Add(theField)\n end\n end\n \n \n ' Get the name for the new shapefile.\n \n theFN = FileName.GetCWD.MakeTmp(\"inter\", \"shp\")\n theTitle = \"Save intersection shapefile as...\"\n theFN = SourceManager.PutDataSet(FTab, theTitle, theFN, TRUE)\n if (theFN <> NIL) then\n \n \n ' Intersect the themes and close the status dialog.\n \n newTheme = Av.Run(\"SM.Intersect\", {theView, theFN, themeDict})\n if (newTheme <> NIL) then\n newTheme.SetName(theFN.GetBaseName)\n theView.AddTheme(newTheme)\n Av.GetProject.SetModified(TRUE)\n end\n Av.FindDialog(\"SM.Status\").Close\n end\n \n \n ' Empty controls so that ArcView doesn't think that the data sets\n ' are still being used.\n \n intersectDlg.FindByName(\"lbxThemes\").Empty\n intersectDlg.FindByName(\"lbxFields\").Empty\n intersectDlg.FindByName(\"lbxIntersect\").Empty\n\n\n' ---- -----------------------------------------------------------------\n' lbtRemove: Remove selected sample fields from the listbox. The\n' fields listbox will be updated in response to the BroadcastUpdate at\n' the end of this script.\n\nelseif (SELF.GetName = \"lbtRemove\") then\n lbxIntersect = intersectDlg.FindByName(\"lbxIntersect\")\n if (lbxIntersect.HasSelection) then\n lbxIntersect.GoFirstSelected\n rowList = {lbxIntersect.GetCurrentRow}\n while (lbxIntersect.GoNextSelected)\n rowList.Add(lbxIntersec t.GetCurrentRow)\n end\n rowList.RemoveDuplicates\n rowList.Sort(FALSE)\n for each aRow in rowList\n lbxIntersect.GoRow(aRow)\n lbxIntersect.DeleteRows(1)\n end\n end\n\n\n' ---------------------------------------------------------------------\n\nend\nSELF.BroadcastUpdate\n" ) (Script.1402 Name: "SM.IntersectThemes.Open" SourceCode: "' Name: SM.IntersectThemes.Open\n'\n' Description: Open script for SM.IntersectThemes\n'\n' Self: SM.IntersectThemes\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\n' Find controls.\n\nlbxThemes = SELF.FindByName(\"lbxThemes\")\nlbxFields = SELF.FindByName(\"lbxFields\")\nlbxIntersect = SELF.FindByName(\"lbxIntersect\")\nlbtOK = SELF.FindByName(\"lbtOK\")\n\n\n' Set the view as an object tag.\n\ntheView = Av.GetActiveDoc\nSELF.SetObjectTag(theView)\n\n\n' Make lists of polygon themes in the view.\n\npolyList = List.Make\nfor each aTheme in theView.GetThemes\n if (aTheme.Is(FTheme)) then\n aThemeShape = aTheme.GetFTab.Fi ndField(\"Shape\").GetType\n if (aThemeShape = #FIELD_SHAPEPOLY) then\n polyList.Add(aTheme)\n end\n end 'if-else\nend 'for each aTheme\n\n\n' Initialize.\n\nlbxThemes.DefineFromList(polyList)\nlbxThemes.SortAscending(FALSE)\nlbxFields.Empty\nlbxIntersect.Empty\nlbtOK.SetEnabled(FALSE)\nlbxThemes.Focus\n" ) (Script.1403 Name: "SM.IntersectThemes.Select" SourceCode: "' Name: SM.IntersectThemes.Select\n'\n' Description: Select scripts for controls in SM.IntersectThemes.\n'\n' Self: lbxThemes\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documen tation.\n' ---------------------------------------------------------------------\n\n\nSELF.BroadcastUpdate\n" ) (Script.1404 Name: "SM.IntersectThemes.Update" SourceCode: "' Name: SM.IntersectThemes.Update\n'\n' Description: Update scripts for controls in SM.IntersectThemes.\n'\n' Self: lbtOK, lbxFields\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nintersectDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbtOK: Enable/disable based on whether there is enough info to \n' sample.\n\nif (SELF.GetName = \"lbtOK\") then\n OK = intersectDlg.FindByName(\"lbxIntersect\").GetList.Count > 0\n SELF.SetEnabled(OK)\n \n\n' ---------------------------------------------------------------------\n' lbxFields: Fill with fields in the selecte d theme. Remove any\n' fields that are in the sample list.\n\nelseif (SELF.GetName = \"lbxFields\") then\n lbxThemes = intersectDlg.FindByName(\"lbxThemes\")\n if (lbxThemes.HasSelection) then\n theTheme = lbxThemes.GetSelection.Get(0)\n fieldList = List.Make\n for each aField in theTheme.GetFTab.GetFields\n if (aField.IsTypeShape.Not and aField.IsVisible) then\n fieldList.Add(aField)\n end\n end\n fieldList.Sort(TRUE)\n \n \n ' Remove fields that are in the sample list.\n \n for each aRow in intersectDlg.FindByName(\"lbxIntersect\").GetList\n if (aRow.Get(0) = theTheme) then\n fieldList.RemoveObj(aRow.Get(1))\n end\n end\n \n \n ' Fill the listbox.\n \n SELF.DefineFromList(fieldList)\n SELF.SortAscending(FALSE)\n \n else 'if no selection\n SELF.Empty\n end 'if-else\n\n\n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1405 Name: "SM.Kappa.Click" SourceCode: "'Name: SM.Kappa.Click\n'\n'SELF: btnKappa, btnMatrix, btnResult, chkKappa, chkMatrix, chkResult,\n'lbtCancel, lbtHelp, lbtOK\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentat ion.\n'----------------------------------------------------------------------\n\n\ntheDialog = SELF.GetDialog\nctrlName = SELF.GetName\n\n\n'----------------------------------------------------------------------\nif (ctrlName = \"btnKappa\") then\n txlKappa = theDialog.FindByName(\"txlKappa\")\n if (txlKappa.IsEmpty) then\n theFN = FileName.GetCWD.MakeTmp(\"kappa\", \"txt\")\n else\n theFN = txlKappa.GetText.AsFileName\n end\n theFN = FileDialog.Put(theFN, \"*.txt\", \"Save Kappa File As...\")\n if (theFN <> NIL) then\n t xlKappa.SetText(theFN.AsString)\n end\n\n\n'----------------------------------------------------------------------\nelseif (ctrlName = \"btnMatrix\") then\n txlMatrix = theDialog.FindByName(\"txlMatrix\")\n if (txlMatrix.IsEmpty) then\n theFN = FileName.GetCWD.MakeTmp(\"errmtx\", \"dbf\")\n else\n theFN = txlMatrix.GetText.AsFileName\n end\n theFN = FileDialog.Put(theFN, \"*.dbf\", \"Save Error Matrix As...\")\n if (theFN <> NIL) then\n txlMatrix.SetText(theFN.AsString)\n end\n\n\n'-------------------------------------- --------------------------------\nelseif (ctrlName = \"btnResult\") then\n txlResult = theDialog.FindByName(\"txlResult\")\n if (txlResult.IsEmpty) then\n theFN = FileName.GetCWD.MakeTmp(\"result\", \"shp\")\n else\n theFN = txlResult.GetText.AsFileName\n end\n theTitle = \"Save Result Shapefile As...\"\n theFN = SourceManager.PutDataSet(FTab, theTitle, theFN, TRUE)\n if (theFN <> NIL) then\n txlResult.SetText(theFN.AsString)\n end\n\n\n'----------------------------------------------------------------------\nelseif (ctrlName = \"lbtCancel\") then\n theDialog.Close\n\n\n'----------------------------------------------------------------------\nelseif (ctrlName = \"lbtHelp\") then\n Av.Run(\"Kappa.Help\", NIL)\n\n\n'----------------------------------------------------------------------\nelseif (ctrlName = \"lbtOK\") then\n predTheme = theDialog.FindByName(\"cbxPredTheme\").GetSelection\n predField = theDialog.FindByName(\"cbxPredField\").GetSelection\n refTheme = theDialog.FindByName(\"cbxRefTheme\").GetSelection\n refField = theDialog.FindByN ame(\"cbxRefField\").GetSelection\n useSelection = theDialog.FindByName(\"chkSelected\").IsSelected\n saveKappa = theDialog.FindByName(\"chkKappa\").IsSelected\n if (saveKappa) then\n kappaFN = theDialog.FindByName(\"txlKappa\").GetText.AsFileName\n else\n kappaFN = NIL\n end\n saveMatrix = theDialog.FindByName(\"chkMatrix\").IsSelected\n if (saveMatrix) then\n matrixFN = theDialog.FindByName(\"txlMatrix\").GetText.AsFileName\n else\n matrixFN = NIL\n end\n saveResult = theDialog.FindByName(\"chkResult\").IsSelec ted\n if (saveResult) then\n resultFN = theDialog.FindByName(\"txlResult\").GetText.AsFileName\n else\n resultFN = NIL\n end\n\n\n 'Make sure choices are valid\n\n shapeField = refTheme.GetFTab.FindField(\"Shape\")\n useZones = shapeField.GetType = #FIELD_SHAPEPOLY\n\n if (useZones and predTheme.Is(GTheme).Not) then\n MsgBox.Error(\"You can only use a polygon reference theme if\" ++\n \"the prediction theme is a grid.\", \"Kappa\")\n return NIL\n end\n\n\n 'Return choices\n\n theDialog.SetModalResult({predTheme, predField, refTheme, refField,\n useSelection, saveKappa, kappaFN, saveMatrix, matrixFN, saveResult,\n resultFN, useZones})\n theDialog.Close\n\n\n'----------------------------------------------------------------------\nend\nSELF.BroadcastUpdate\n" ) (Script.1406 Name: "SM.Kappa.Open" SourceCode: "'SM.Kappa.Open\n'\n'This dialog is modal. It returns the following parameters:\n' (0) Theme containing predictions\n' (1) Field containing predictions\n' (2) Theme containing reference data\n' (3) Field containing reference data\n' (4) Boolean, TRUE if only selected records in (2) should be used\n' (5) Boolean, TRUE if Kappa informatin should be saved to file\n' (6) FileName for (5)\n' (7) Boolean, TRUE if error matrix should be saved to file\n' (8) FileName for (7)\n' (9) Boolean, TRUE if result shapefile should be cr eated\n'(10) FileName for (9)\n'(11) Boolean, TRUE if reference data are polygons, FALSE if points\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n\n'------------------ ----------------------------------------------------\n\n\n'Find Controls\n\ncbxPredTheme = SELF.FindByName(\"cbxPredTheme\")\ncbxPredField = SELF.FindByName(\"cbxPredField\")\ncbxRefTheme = SELF.FindByName(\"cbxRefTheme\")\ncbxRefField = SELF.FindByName(\"cbxRefField\")\nchkSelected = SELF.FindByName(\"chkSelected\")\nchkKappa = SELF.FindByName(\"chkKappa\")\ntxlKappa = SELF.FindByName(\"txlKappa\")\nbtnKappa = SELF.FindByName(\"btnKappa\")\nchkMatrix = SELF.FindByName(\"chkMatrix\")\ntxlMatrix = SELF.FindByName(\"txlMatrix\")\nbtnMatrix = S ELF.FindByName(\"btnMatrix\")\nchkResult = SELF.FindByName(\"chkResult\")\ntxlResult = SELF.FindByName(\"txlResult\")\nbtnResult = SELF.FindByName(\"btnResult\")\nlbtOK = SELF.FindByName(\"lbtOK\")\n\n\n'Make lists of polygon, integer grid, and point themes in the view,\n'and build VATs for any grids that don't have one\n\ntheView = Av.GetActiveDoc\npredList = List.Make\nrefList = List.Make\nfor each aTheme in theView.GetThemes\n if (aTheme.Is(FTheme)) then\n aThemeShape = aTheme.GetFTab.FindField(\"Shape\").GetType\n if (aThem eShape = #FIELD_SHAPEPOLY) then\n predList.Add(aTheme)\n refList.Add(aTheme)\n elseif (aThemeShape = #FIELD_SHAPEPOINT) then\n refList.Add(aTheme)\n end\n elseif (aTheme.Is(GTheme) and aTheme.GetGrid.IsInteger) then\n predList.Add(aTheme)\n if (aTheme.HasTable.Not) then\n aTheme.GetGrid.BuildVAT\n end\n end 'if-else\nend 'for each aTheme\npredList.Insert(\"\")\nrefList.Insert(\"\")\n\n\n'Initialize\n\ncbxPredTheme.DefineFromList(predList)\ncbxPredTheme.SortAscending(FALSE)\ncbxPr edField.Empty\ncbxRefTheme.DefineFromList(refList)\ncbxRefTheme.SortAscending(FALSE)\ncbxRefField.Empty\nchkSelected.SetSelected(FALSE)\nchkKappa.SetSelected(TRUE)\ntxlKappa.Empty\ntxlKappa.SetEnabled(TRUE)\nbtnKappa.SetEnabled(TRUE)\nchkMatrix.SetSelected(TRUE)\ntxlMatrix.Empty\ntxlMatrix.SetEnabled(TRUE)\nbtnMatrix.SetEnabled(TRUE)\nchkResult.SetSelected(TRUE)\ntxlResult.Empty\ntxlResult.SetEnabled(TRUE)\nbtnResult.SetEnabled(TRUE)\nlbtOK.SetEnabled(FALSE)\nSELF.SetModalResult(NIL)\n" ) (Script.1407 Name: "SM.Kappa.Select" SourceCode: "'Name: SM.Kappa.Select\n'\n'SELF: cbxPredField, cbxPredTheme, cbxRefField, cbxRefTheme\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n'------------------------------- ---------------------------------------\n\nSELF.BroadcastUpdate\n" ) (Script.1408 Name: "SM.Kappa.Update" SourceCode: "'Name: SM.Kappa.Update\n'\n'SELF: btnKappa, btnMatrix, btnResult, cbxPredField, cbxRefField,\n'lbtOK, txlKappa, txlMatrix, txlResult\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and do cumentation.\n'----------------------------------------------------------------------\n\n\ntheDialog = SELF.GetDialog\nctrlName = SELF.GetName\n\n\n'----------------------------------------------------------------------\nif ((ctrlName = \"btnKappa\") or (ctrlName = \"txlKappa\")) then\n SELF.SetEnabled(theDialog.FindByName(\"chkKappa\").IsSelected)\n\n\n'----------------------------------------------------------------------\nelseif ((ctrlName = \"btnMatrix\") or (ctrlName = \"txlMatrix\")) then\n SELF.SetEnabled(theDialog.FindByN ame(\"chkMatrix\").IsSelected)\n\n\n'----------------------------------------------------------------------\nelseif ((ctrlName = \"btnResult\") or (ctrlName = \"txlResult\")) then\n SELF.SetEnabled(theDialog.FindByName(\"chkResult\").IsSelected)\n\n\n'----------------------------------------------------------------------\nelseif (ctrlName = \"cbxPredField\") then\n theTheme = theDialog.FindByName(\"cbxPredTheme\").GetSelection\n if (theTheme.Is(Theme)) then\n if (theTheme.Is(GTheme)) then\n fieldList = theTheme.GetVTab.G etFields.Clone\n else\n fieldList = theTheme.GetFTab.GetFields.Clone\n end\n fieldList.Sort(TRUE)\n fieldList.Insert(\"\")\n SELF.DefineFromList(fieldList)\n else\n SELF.Empty\n end\n\n\n'----------------------------------------------------------------------\nelseif (ctrlName = \"cbxRefField\") then\n theTheme = theDialog.FindByName(\"cbxRefTheme\").GetSelection\n if (theTheme.Is(Theme)) then\n fieldList = theTheme.GetFTab.GetFields.Clone\n fieldList.Sort(TRUE)\n fieldList.Insert(\"\")\n SELF.DefineFromList(fieldList)\n else\n SELF.Empty\n end\n\n\n'----------------------------------------------------------------------\nelseif (ctrlName = \"lbtOK\") then\n predOK = theDialog.FindByName(\"cbxPredField\").GetSelection.Is(Field)\n refOK = theDialog.FindByName(\"cbxRefField\").GetSelection.Is(Field)\n if (theDialog.FindByName(\"chkKappa\").IsSelected) then\n kappaOK = theDialog.FindByName(\"txlKappa\").IsEmpty.Not\n else\n kappaOK = TRUE\n end\n if (theDialog.FindByName(\"chkMatrix\").IsSelected ) then\n matrixOK = theDialog.FindByName(\"txlMatrix\").IsEmpty.Not\n else\n matrixOK = TRUE\n end\n \n SELF.SetEnabled(predOK and refOK and kappaOK and matrixOK)\n\n\n'----------------------------------------------------------------------\nend\n" ) (Script.1409 Name: "SM.Library" SourceCode: "' Name: SM.Library\n'\n' Description: Contains general procedures: CenterDialog,\n' MakeVarName, Sci2Float, Sort2, VisibleFields\n'\n' Parameters: The first one is the procedure name. Any parameters\n' needed by the procedure make up the rest of the list.\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentati on, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\ntheProc = SELF.Get(0)\n\n\n' ---------------------------------------------------------------------\n' Name: CenterDialog\n' Description: Centers the dialog in the ArcView display.\n' Parameters:\n' (1) Dialog\n\nif (theProc = \"CenterDialog\") then\n theDialog = SELF.Get(1)\n AVCenter = Av.ReturnOrigin + ( Av.ReturnExtent / (2@2))\n halfDialogSize = theDialog.ReturnExtent.ReturnSize / (2@2)\n movePoint = AvCenter - halfDialogSize\n theDialog.MoveTo(movePoint.GetX, movePoint.GetY)\n\n\n' ---------------------------------------------------------------------\n' Name: MakeVarName\n' Description: Makes a unique variable name.\n' Parameters:\n' (1) String prefix for the variable name\n' (2) Dictionary: key=prefix, info=number of variable names with the\n' prefix\n' (3) String containing valid characters; the last o ne will be \"_\"\n' (for SAS) or \".\" (for S-Plus)\n' Returns: new variable name (String)\n\nelseif (theProc = \"MakeVarName\") then\n thePrefix = SELF.Get(1)\n prefixDict = SELF.Get(2)\n charStr = SELF.Get(3)\n\n \n ' Make sure varName doesn't interfere with intercept variables in\n ' logistic regression.\n \n if (thePrefix = \"interc\") then\n thePrefix = \"inter\"\n end\n \n \n ' Make sure all characters are valid for variable names.\n \n if (charStr <> NIL) then\n if (thePrefix.Left(1).IsNumber) then\n the Prefix = charStr.Right(1) + thePrefix.Left(5)\n end\n for each n in 0..(thePrefix.Count - 1)\n char = thePrefix.Middle(n, 1)\n if (charStr.Contains(char).Not) then\n thePrefix = thePrefix.Substitute(char, charStr.Right(1))\n end\n end\n end\n \n \n ' Add a number on the end to make it unique.\n \n numPrefix = prefixDict.Get(thePrefix)\n if (numPrefix = NIL) then\n prefixDict.Set(thePrefix, 1)\n else\n prefixDict.Set(thePrefix, numPrefix + 1)\n end\n return thePrefix + prefixDict. Get(thePrefix).AsString\n\n \n' ---------------------------------------------------------------------\n' Name: Sci2Float\n' Description: Converts a number in scientific notation to a floating\n' point number (but keeps it in a String).\n' Parameters:\n' (1) String \"xxxExx\"\n' Returns: String or NIL (if unsuccessful)\n\nelseif (theProc = \"Sci2Float\") then\n sciStr = SELF.Get(1)\n theIndex = sciStr.IndexOf(\"E\")\n baseNum = sciStr.Left(theIndex)\n expNum = sciStr.Right(sciStr.Count - theIndex - 1)\n if (baseNum.IsN umber and expNum.IsNumber) then\n expNum = expNum.AsNumber\n formatStr = \"\"\n for each n in 1..(baseNum.Count + expNum.Abs)\n formatStr = formatStr + \"d\"\n end\n if (expNum < 0) then\n formatStr = \"d.\" + formatStr\n end\n sciNum = sciStr.AsNumber\n sciNum.SetFormat(formatStr)\n return sciNum.AsString\n else\n return NIL\n end\n \n\n' ---------------------------------------------------------------------\n' Name: Sort2\n' Description: Sorts a list that is made up of lists, like this: \n' {{val1, val2},{val1, val2},..}. Only works on objects that support\n' the GetName request. Will work on sublists with more than two\n' entries, but only sorts on first two.\n' Parameters:\n' (1) List to be sorted\n' Returns: List\n\nelseif (theProc = \"Sort2\") then\n theList = SELF.Get(1)\n sortedList = List.Make\n dictSize = 1 max (theList.Count / 2).Floor\n val1Dict = Dictionary.Make(dictSize)\n val2Dict = Dictionary.Make(dictSize)\n\n \n ' Make a Dictionary with the first object in each sublist as t he\n ' key and the sublist as the info. Then get a sorted list of all\n ' first object.\n \n for each subList in theList\n val1 = subList.Get(0).GetName\n val1List = val1Dict.Get(val1)\n if (val1List = NIL) then\n val1List = List.Make\n val1Dict.Set(val1, val1List)\n end\n val1List.Add(subList)\n end\n val1KeyList = val1Dict.ReturnKeys.Clone\n val1KeyList.Sort(TRUE)\n \n \n ' Now sort each group of sublists with a common first object by the\n ' second object.\n \n for each val1Key in val1 KeyList\n val2Dict.Empty\n for each subList in val1Dict.Get(val1Key)\n val2 = subList.Get(1).GetName\n val2List = val2Dict.Get(val2)\n if (val2List = NIL) then\n val2List = List.Make\n val2Dict.Set(val2, val2List)\n end\n val2List.Add(sublist)\n end\n val2KeyList = val2Dict.ReturnKeys\n val2KeyList.Sort(TRUE)\n \n \n ' Add the sorted sublists to the main sorted list.\n \n for each val2Key in val2KeyList\n for each subList in val2Dict.Get(val2Key)\n sor tedList.Add(subList)\n end\n end 'for each val2Key\n end 'for each val1Key\n \n return sortedList\n\n\n' ---------------------------------------------------------------------\n' Name: VisibleFields\n' Description: Returns the sorted list of visible fields in the VTab\n' of type number and string.\n' Parameters:\n' (1) theVTab\n' Returns: list of fields\n\nelseif (theProc = \"VisibleFields\") then\n theVTab = SELF.Get(1)\n fieldList = List.Make\n for each aField in theVTab.GetFields\n if ((aField.IsTypeStrin g or aField.IsTypeNumber) and \n aField.IsVisible) then\n fieldList.Add(aField)\n end\n end\n fieldList.Sort(TRUE)\n return fieldList\n\n\n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1410 Name: "SM.LookupGrid" SourceCode: "' Name: SM.LookupGrid\n'\n' Description: Checks that there are no NULL values in a lookup field,\n' corrects the problem if necessary, and performs the lookup. This is\n' needed because of a bug in ArcView. If the Lookup request is used\n' on a field that has NULL values, then ArcView quits recognizing the\n' difference between NULL and zero. Not only that, but if the field\n' is a string field, then ArcView spits out error messages during\n' execution of Lookup.\n'\n' Parameters:\n' (0) Grid theme or a Grid\n' (1 ) Field name for lookup request\n' (2) Name of theme (if 0 is a grid)\n'\n' Returns:\n' Successful: Grid\n' Unsuccessful: NIL\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and docum entation.\n' ---------------------------------------------------------------------\n\n\nif (SELF.Get(0).Is(Theme)) then\n theTheme = SELF.Get(0)\n theGrid = theTheme.GetGrid\n themeName = theTheme.GetName\nelse\n theGrid = SELF.Get(0)\n themeName = SELF.Get(2)\nend\nfieldName = SELF.Get(1)\ntheVTab = theGrid.GetVTab\n\n\n' Find out if it needs to be a floating point grid.\n\ntheField = theVTab.FindField(fieldName)\nif (theField.IsTypeNumber and (theField.GetPrecision > 0)) then \n isFloat = TRUE\nelse\n isFloat = FALSE\nen d\n\n\n' Check if there are any null values in the lookup field.\n\nqueryStr = \"[\" + fieldName + \"].IsNull\"\nselectionBM = theVTab.GetSelection.Clone\ntheVTab.Query(queryStr, selectionBM, #VTAB_SELTYPE_NEW)\nnullValues = selectionBM.Count > 0\n\n\n' If there are null values or if floating point, then make a new grid\n' to perform the lookup on.\n\nif (nullValues or isFloat) then\n\n\n ' Clone the original VTab, make only the fields we need visible\n ' (because only visible fields are exported) and export to a \n ' temporar y file.\n \n clonedGrid = theGrid.Clone\n clonedVTab = clonedGrid.GetVTab\n for each aField in clonedVTab.GetFields\n if ({\"Value\", fieldName}.FindByValue(aField.GetName) = -1) then\n aField.SetVisible(FALSE)\n else\n aField.SetVisible(TRUE)\n end\n end\n tempFN = FileName.GetTmpDir.MakeTmp(\"xxxsm\", \"dbf\")\n clonedVTab.Export(tempFN, dBASE, FALSE)\n tempVTab = VTab.Make(tempFN, TRUE, FALSE)\n calcField = tempVTab.FindField(fieldName)\n\n\n ' If we need a floating point grid, create a new field that will\n ' hold large numbers (although still not very large!) and multiply\n ' the field by 1000 so that the decimal stuff won't get truncated.\n \n if (isFloat) then\n theField = tempVTab.FindField(fieldName)\n newField = Field.Make(\"TempField\", #FIELD_DECIMAL, 10, 0)\n calcField = newField\n tempVTab.AddFields({newField})\n tempVTab.Calculate(\"[\" + fieldName + \"] * 1000\", calcField)\n tempVTab.RemoveFields({theField})\n newField.SetAlias(fieldName)\n end\n \n \n ' If there are null value s...\n \n if (nullValues) then\n \n ' Select a safe value to replace nulls with. Had to use small\n ' numbers because I can't figure out how to tell what numbers I\n ' can and can't put into a field with the Calculate request.\n \n isString = theVTab.FindField(fieldName).IsTypeString\n nullList = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -2, -3, -4, -5, -6,\n -7, -8, -9, 99, -99, 999, -999}\n nullOkay = FALSE\n if (isString) then\n for each num in nullList\n nullValStr = \"[\" + fieldName + \"] =\" ++ num.AsString.Quote\n tempVTab.Query(nullValStr, selectionBM, #VTAB_SELTYPE_NEW)\n if (selectionBM.Count = 0) then\n nullVal = num.AsString\n nullOkay = TRUE\n break\n end\n end\n else\n for each num in nullList\n nullValStr = \"[\" + fieldName + \"] =\" ++ num.AsString\n tempVTab.Query(nullValStr, selectionBM, #VTAB_SELTYPE_NEW)\n if (selectionBM.Count = 0) then\n nullVal = num\n nullOkay = TRUE\n break\n end\n end\n end\n if (nullOkay.Not) then\n MsgBox.Error(\"Error creating lookup grid from\" ++ themeName, \"\") \n return NIL\n end\n \n \n ' Replace the null values in the exported VTab with the safe\n ' values. Create query strings needed later for extracting\n ' everything that isn't null.\n \n tempVTab.Query(queryStr, tempVTab.GetSelection, #VTAB_SELTYPE_NEW)\n if (isString) then\n tempVTab.Calculate(nullVal.Quote, calcField)\n exStr = \"[S_value] <> \" ++ nullVal.Quote\n else\n tempVTab.Calculate(nullVal.AsString, calcField)\n exStr = \"[Value] <>\" ++ nullVal.AsString\n end\n end\n \n\n ' Remove all joins from the original cloned VTab and join it to\n ' the VTab with the safe values replacing the nulls.\n \n tempJoinField = tempVTab.FindField(\"Value\")\n clonedJoinField = clonedVTab.FindField(\"Value\")\n clonedVTab.UnjoinAll\n clonedVTab.Join(clonedJoinField, tempVTab, tempJoinField)\n\n \n ' Now use the Lookup request on the cloned grid, becau se it doesn't\n ' have any null values and has been multipled so values won't get\n ' truncated.\n \n lookupGrid = clonedGrid.Lookup(fieldName)\n lookupVTab = lookupGrid.GetVTab\n if (lookupGrid.HasError) then\n MsgBox.Error(\"Error creating lookup grid from\" ++ themeName, \"\")\n return NIL\n end\n \n \n ' If there were null values, query the VTab for everything that\n ' isn't the replacement value and extract the selection to a new\n ' Grid.\n \n if (nullValues) then\n lookupVTab.Query(exStr, lookupVTa b.GetSelection, #VTAB_SELTYPE_NEW)\n extractGrid = lookupGrid.ExtractSelection\n else\n extractGrid = lookupGrid\n end\n \n \n ' If it needs to be floating point, divide to scale everything back\n ' down.\n \n if (isFloat) then\n newGrid = extractGrid / 1000.AsGrid.Float\n else\n newGrid = extractGrid\n end\n\n\n' If no null values and not floating point, then just do the lookup.\n\nelse\n newGrid = theGrid.Lookup(fieldName)\nend\n\n\n' Check the new Grid for errors and return it.\n\nnewGrid.GetStatistics\nif ( newGrid.HasError) then\n MsgBox.Error(\"Error creating lookup grid from\" ++ themeName, \"\")\n return NIL\nelse\n return newGrid\nend\n" ) (Script.1411 Name: "SM.ManageCtrls" SourceCode: "' Name: SM.ManageCtrls\n'\n' Description: Saves and restores the state of Controls in a dialog\n' in a dictionary. For restore, each control broadcasts an update.\n' CheckBox: selected or not\n' ComboBox: selection\n' ControlPanel: selected radio button\n' ListBox: list of objects defining the list box\n' TextLine: text\n'\n' Parameters:\n' (0)\"s\" for Save or \"r\" for Restore\n' (1) Dialog containing the controls\n' (2) List of control names\n' (3) Dictionary (stores state): key=control name, info=see above\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\ntheAction = SELF.Get(0)\ntheDlg = SELF.Get(1)\nc trlList = SELF.Get(2)\nctrlDict = SELF.Get(3)\n\n\n' Save settings.\n\nif (theAction = \"s\") then\n for each ctrlName in ctrlList\n theCtrl = theDlg.FindByName(ctrlName)\n if (theCtrl.Is(CheckBox)) then\n ctrlDict.Set(ctrlName, theCtrl.IsSelected)\n elseif (theCtrl.Is(ComboBox)) then\n ctrlDict.Set(ctrlName, theCtrl.GetSelection)\n elseif (theCtrl.Is(ControlPanel)) then\n ctrlDict.Set(ctrlName, theCtrl.GetSelected)\n elseif (theCtrl.Is(ListBox)) then\n ctrlDict.Set(ctrlName, theCtrl.GetLi st)\n elseif (theCtrl.Is(TextLine)) then\n ctrlDict.Set(ctrlName, theCtrl.GetText)\n end\n end 'for each ctrlName\n\n\n' Restore settings.\n\nelseif (theAction = \"r\") then\n for each ctrlName in ctrlList\n theCtrl = theDlg.FindByName(ctrlName)\n if (theCtrl.Is(CheckBox)) then\n theCtrl.SetSelected(ctrlDict.Get(ctrlName))\n elseif (theCtrl.Is(ComboBox)) then\n theCtrl.FindByValue(ctrlDict.Get(ctrlName))\n theCtrl.SelectCurrent\n elseif (theCtrl.Is(ControlPanel)) then\n theRB = ctrl Dict.Get(ctrlName)\n theRB.Select\n theRB.BroadcastUpdate\n elseif (theCtrl.Is(ListBox)) then\n theCtrl.DefineFromList(ctrlDict.Get(ctrlName))\n elseif (theCtrl.Is(TextLine)) then\n theCtrl.SetText(ctrlDict.Get(ctrlName))\n end\n theCtrl.BroadcastUpdate\n end 'for each ctrlName\n \nend 'if (theAction...\n" ) (Script.1412 Name: "SM.Menu.About" SourceCode: "' Name: SM.Menu.About\n'\n' Description: Opens the About dialog.\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' -------------------------------------------------- -------------------\n\nAv.FindDialog(\"SM.About\").Open\n" ) (Script.1413 Name: "SM.Menu.Combine" SourceCode: "' Name: SM.Menu.Combine\n'\n' Description: Opens the Merge Grids dialog.\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ------------------------------------------ ---------------------------\n\n\nAv.FindDialog(\"SM.MergeGrids\").Open\n" ) (Script.1414 Name: "SM.Menu.EditTree" SourceCode: "'SM.Menu.EditTree\n'\n'Lets user choose tree to edit and opens the editing dialog\n'\n'Last modified by Chris Garrard, 13Feb03\n'----------------------------------------------------------------------\n\n\ntheView = Av.GetActiveDoc\n\n\n'Get filename\n\npatterns = {\"*.mod\", \"*.smg\", \"*.sms\", \"*.txt\", \"*.*\"}\nlabels = {\"Model Import files (*.mod)\", \"Grid Model files (*.smg)\",\n \"Shapefile Model files (*.sms)\", \"Text files (*.txt)\",\n \"All files (*.*)\"}\ntreeFNList = FileDialog.ReturnFiles(patterns, labels, \"Open...\", 0)\nif (treeFNList.Count = 0) then\n return NIL\nend\ntreeFN = treeFNList.Get(0)\ntreeFile = LineFile.Make(treeFN, #FILE_PERM_READ)\n\n\n'Get ODB file if it exists\n\nisODB = FALSE\nstartPos = -1\ntreeType = NIL\nwhile (treeFile.IsAtEnd.Not)\n inLine = treeFile.ReadElt\n if (inLine.Contains(\"ODB File\")) then\n odbStr = inLine.AsTokens(\"=\").Get(1)\n if (odbStr.IsNull.Not and File.Exists(odbStr.Trim.AsFileName)) then\n theODB = ODB.OpenAndInstall(odbStr.Trim.AsFileName)\n fieldDict = theODB.Get(0)\n varDict = t heODB.Get(1)\n isODB = TRUE\n end\n elseif (inLine.Contains(\"Variables used\")) then\n varList = inLine.AsTokens(\"=\").Get(1).AsTokens(\" \")\n elseif (inLine.Contains(\"Classification tree:\")) then\n treeType = \"classification\"\n elseif (inLine.Contains(\"Regression tree:\")) then\n treeType = \"regression\"\n elseif (inLine.Contains(\"1) root\")) then\n startPos = treeFile.GetPos\n end\nend\nif (startPos = -1) then\n treeFile.Close\n Msgbox.Error(\"Error reading\" ++ treeFN.GetBaseName + \".\", \"\")\n return NIL\nend\n\n\n'If there is an ODB file, make sure all needed themes are loaded\n\nif (isODB) then\n treeFile.Close\n dictSize = 1 max (varList.Count / 2).Floor\n themeDict = Dictionary.Make(dictSize)\n aliasDict = Dictionary.Make(dictSize)\n parmList = {theView, varList, themeDict, fieldDict, varDict,\n aliasDict, NIL}\n Av.Run(\"SM.GetFields\", parmList)\n\n\n'Else prompt user for themes. First, get the variables\n\nelse\n treeFile.SetPos(startPos)\n varList = List.Make\n classList = List.Make\n inLine = treeFile.Rea dElt\n while ((inLine <> NIL) and inLine.IsNull.Not)\n lineList = inLine.AsTokens(\" \")\n theCondition = lineList.Get(1)\n if (theCondition.Contains(\":\")) then\n varList.Add(theCondition.AsTokens(\":\").Get(0))\n elseif (theCondition.Contains(\"<\")) then\n varList.Add(theCondition.AsTokens(\"<\").Get(0))\n elseif (theCondition.Contains(\">\")) then\n varList.Add(theCondition.AsTokens(\">\").Get(0))\n end\n classList.Add(lineList.Get(4))\n inLine = treeFile.ReadElt\n end\n treeFile.Close\n varList.RemoveDuplicates\n classList.RemoveDuplicates\n if ((varList.Count = 0) or (classList.Count = 0)) then\n MsgBox.Error(\"Error reading\" ++ treeFN.GetBaseName + \".\", \"\")\n return NIL\n end\n\n\n 'Second, get the type of tree if necessary\n \n if (treeType = NIL) then\n for each aClass in classList\n if (aClass.IsNumber.Not) then\n treeType = \"classification\"\n break\n end\n end\n if (treeType = NIL) then\n theMsg = \"Is this a regression tree?\"\n if (MsgBox.YesNo(theM sg, \"Tree Type\", TRUE)) then\n treeType = \"regression\"\n else\n treeType = \"classification\"\n end\n end\n end\n\n\n 'Get info from user\n \n parmDlg = Av.FindDialog(\"SM.TreeParms\")\n parmDlg.SetObjectTag({theView, varList})\n varDict = parmDlg.Open\n if (varDict = NIL) then\n return NIL\n end\n\n\n 'Make themeList and fieldDict\n \n themeList = List.Make\n fieldDict = Dictionary.Make(varDict.GetSize)\n for each aVar in varList\n theTheme = varDict.Get(aVar).Get(0)\n theField = varDic t.Get(aVar).Get(1)\n themeList.Add(theTheme)\n if (theField.Is(Field)) then\n fieldDict.Set(theField, {aVar})\n else\n fieldDict.Set(theTheme, {aVar})\n end\n end\n themeList.RemoveDuplicates\n\n\n 'Make the ODB file\n \n odbFN = FileName.GetTmpDir.MakeTmp(\"xxxodb\", \"odb\")\n parmList = {\"Tree\", odbFN, themeList, fieldDict, varDict}\n if (Av.Run(\"SM.WriteODB\", parmList).Not) then\n theMsg = \"Unable to create temporary file\" ++ odbFN.AsString + \".\"\n MsgBox.Error(theMsg, \"\")\n return NIL\n end\n \n \n 'Make a new tree file that references the ODB file\n \n newTreeFN = FileName.GetTmpDir.MakeTmp(\"xxtree\", \"mod\")\n File.Copy(treeFN, newTreeFN)\n treeFile = LineFile.Make(newTreeFN, #FILE_PERM_APPEND)\n treeFile.WriteElt(\"ODB File =\" ++ newTreeFN.GetFullName)\n treeFile.Close\n treeFN = newTreeFN\n\nend\n\n\n'Get the dictionary that represents the tree\n\ntreeDict = Av.Run(\"SM.MakeTree\", treeFN)\nif (treeDict = NIL) then\n return NIL\nend\n\n\n'Fill the textbox and open the dialog\n\nparmList = {treeDict, var Dict, treeFN, varList, theView, fieldDict}\neditDialog = Av.FindDialog(\"SM.dlgEditTree\")\neditDialog.SetObjectTag(parmList)\neditDialog.Open\n" ) (Script.1415 Name: "SM.Menu.GridResample" SourceCode: "' Name: SM.Menu.GridResample\n'\n' Description: Resamples or aggregates a grid.\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ----------------------------------- ----------------------------------\n\n\ntheDialog = Av.FindDialog(\"SM.GridSize\")\ntheView = Av.GetActiveDoc\ntheTheme = theView.GetActiveThemes.Get(0)\ntheDialog.SetObjectTag({theView, theTheme})\ntheDialog.SetTitle(\"Resample\" ++ theTheme.GetName)\nresultList = theDialog.Open\nif (resultList <> NIL) then\n gridFN = FileName.GetCWD.MakeTmp(\"grid\", \"\")\n theTitle = \"Save grid as...\"\n gridFN = SourceManager.PutDataSet(Grid, theTitle, gridFN, TRUE)\n if (gridFN <> NIL) then\n oldAE = theView.GetExtension(AnalysisEnvi ronment)\n newAE = oldAE.Clone\n theView.SetExtension(newAE)\n newAE.Activate\n oldVE = Grid.GetVerify\n Grid.SetVerify(#GRID_VERIFY_OFF)\n gridName = gridFN.GetBaseName\n theField = resultList.Get(0)\n if (theField.Is(Field).Not and (theField <> \"Value\")) then\n theField = theTheme.GetVTab.FindField(\"Value\")\n end\n cellSize = resultList.Get(1)\n theExtent = resultList.Get(2)\n themeDict = Dictionary.Make(1)\n fieldDict = Dictionary.Make(1)\n themeDict.Set(theTheme, {theFiel d})\n fieldDict.Set(theField, {gridName})\n parmList = {\"convert\", theView, FALSE, 1, themeDict, fieldDict,\n List.Make, theExtent, cellSize}\n gridDict = Av.Run(\"SM.ConvertGrids\", parmList)\n if (gridDict <> NIL) then\n newGrid = gridDict.Get(gridName)\n if (newGrid.SaveDataSet(gridFN).Not) then\n MsgBox.Warning(\"Unable to save grid to\" ++ gridFN.AsString, \"\")\n end\n newTheme = GTheme.Make(newGrid)\n newTheme.SetName(gridName)\n theView.AddTheme(newTheme)\n Av .GetProject.SetModified(TRUE)\n end\n theView.SetExtension(oldAE)\n oldAE.Activate\n Grid.SetVerify(oldVE)\n end\nend\n" ) (Script.1416 Name: "SM.Menu.Import" SourceCode: "' Name: SM.Menu.Import\n'\n' Description: Gets model file to be imported and then calls\n' SM.ReadModel.\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ----------- ----------------------------------------------------------\n\n\ntheTitle = \"Import model file...\"\nmodelFN = FileDialog.Show(\"*.mod\", \"Model Files (*.mod)\", theTitle) \nif (modelFN <> NIL) then\n Av.Run(\"SM.ReadModel\", {Av.GetActiveDoc, modelFN, FALSE})\nend\n" ) (Script.1417 Name: "SM.Menu.Info" SourceCode: "' Name: SM.Menu.Info\n'\n' Description: Shows model information for the first active theme. \n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------- -----------------------------------------------\n\n\nthemeList = Av.GetActiveDoc.GetActiveThemes\nif (themeList.Count > 0) then\n theTheme = themeList.Get(0)\n infoFN = theTheme.GetSrcName.GetFileName.Clone\n if (theTheme.Is(GTheme)) then\n infoFN.SetExtension(\"smg\")\n else\n infoFN.SetExtension(\"sms\")\n end\n if (File.Exists(infoFN)) then\n theTitle = \"Model Information for\" ++ theTheme.GetName\n infoWin = TextWin.Make(infoFN, theTitle)\n infoWin.SetFixedFont(TRUE)\n infoWin.Open\n else\n theMsg = \"No model information available for the active theme.\"\n MsgBox.Error(theMsg, \"Error\")\n end 'if-else (file.Exists(infoFN)\nend 'if (themeList.Count > 0)\n" ) (Script.1418 Name: "SM.Menu.Intersect" SourceCode: "' Name: SM.Menu.Intersect\n'\n' Description: Opens the intersect dialog.\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ------------------------------------------ ---------------------------\n\n\nAv.FindDialog(\"SM.IntersectThemes\").Open\n" ) (Script.1419 Name: "SM.Menu.Kappa" SourceCode: "'Name: SM.Menu.Kappa\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\n'Get user parameters\n\n dlgResultList = Av.FindDialog(\"SM.Kappa\").Open\nif (dlgResultList = NIL) then\n return NIL\nend\npredTheme = dlgResultList.Get(0)\npredField = dlgResultList.Get(1)\nrefTheme = dlgResultList.Get(2)\nrefField = dlgResultList.Get(3)\nuseSelected = dlgResultList.Get(4)\nsaveKappa = dlgResultList.Get(5)\nkappaFN = dlgResultList.Get(6)\nsaveMatrix = dlgResultList.Get(7)\nmatrixFN = dlgResultList.Get(8)\nsaveResult = dlgResultList.Get(9)\nresultFN = dlgResultList.Get(10)\nuseZones = dlgResultList.Get(11)\nthePrj = Av.GetActiveDo c.GetProjection\n\n\n'Compute kappa\n\nparmList = {thePrj, predTheme, predField, refTheme, refField,\n useSelected, saveMatrix, matrixFN, saveResult, resultFN}\nkappaResultList = Av.Run(\"SM.ComputeKappa\", parmList)\nif (kappaResultList = NIL) then\n return NIL\nend\nkappa = kappaResultList.Get(0)\nstdErr = kappaResultList.Get(1)\nzVal = kappaResultList.Get(2)\nmatrixSaved = kappaResultList.Get(3)\nresultSaved = kappaResultList.Get(4)\n\n\n'Add matrix to project if needed\n\nif (saveMatrix and matrixSaved) then\n matrixTable = Table.Make(VTab.Make(matrixFN, FALSE, FALSE))\n matrixTable.SetName(matrixFN.GetBaseName)\n Av.GetProject.AddDoc(matrixTable)\nend\n \n\n'Add result theme if needed\n\nif (saveResult and resultSaved) then\n resultTheme = FTheme.Make(FTab.Make(resultFN.AsString.AsSrcName))\n resultLegend = resultTheme.GetLegend\n resultLegend.SetLegendType(#LEGEND_TYPE_UNIQUE)\n resultLegend.Unique(resultTheme, \"Correct\")\n resultLegend.GetSymbols.Get(0).SetColor(Color.GetRed)\n resultLegend.GetSymbols.Get(1).SetColor(Color.Get Green)\n Av.GetActiveDoc.AddTheme(resultTheme)\n resultTheme.SetVisible(TRUE)\nend\n \n\n'Make result string\n\nresultStr = \"Prediction theme:\" ++ predTheme.GetName + NL +\n \"Reference theme:\" ++ refTheme.GetName + NL + NL +\n \"Kappa:\" ++ kappa.AsString + NL +\n \"Standard error of kappa:\" ++ stdErr.AsString + NL +\n \"Z-Score for kappa:\" ++ zVal.AsString + NL\nif (saveMatrix and matrixSaved) then\n resultStr = resultStr + NL + \"Error matrix saved to\" ++\n matrixFN.GetFullName + NL +\n \"Columns represent\" ++ refTheme.GetName + NL +\n \"Rows represent\" ++ predTheme.GetName + NL\nend\n\n\n'Save and display results\n\nif (saveKappa) then\n kappaFile = LineFile.Make(kappaFN, #FILE_PERM_WRITE)\n kappaFile.WriteElt(resultStr)\n kappaFile.Close\n resultStr = \"This information saved to\" ++ kappaFN.GetFullName +\n \".\" + NL + NL + resultStr\nend \n\nMsgBox.Report(resultStr, \"Kappa\")\n\n" ) (Script.1420 Name: "SM.Menu.Logistic" SourceCode: "' Name: SM.Menu.Logistic\n'\n' Description: Opens the logistic regression dialog.\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' --------------------------------- ------------------------------------\n\nAv.FindDialog(\"SM.Log\").Open\n" ) (Script.1421 Name: "SM.Menu.PolyGrid" SourceCode: "' Name: SM.Menu.PolyGrid\n'\n' Description: Converts a polygon theme to a grid.\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ----------------------------------- ----------------------------------\n\n\ntheDialog = Av.FindDialog(\"SM.PolyGrid\")\ntheView = Av.GetActiveDoc\ntheTheme = theView.GetActiveThemes.Get(0)\ntheDialog.SetObjectTag({theView, theTheme})\ntheDialog.SetTitle(\"Convert\" ++ theTheme.GetName)\nresultList = theDialog.Open\nif (resultList <> NIL) then\n gridFN = FileName.GetCWD.MakeTmp(\"grid\", \"\")\n theTitle = \"Save grid as...\"\n gridFN = SourceManager.PutDataSet(Grid, theTitle, gridFN, TRUE)\n if (gridFN <> NIL) then\n oldAE = theView.GetExtension(AnalysisEnvir onment)\n newAE = oldAE.Clone\n theView.SetExtension(newAE)\n newAE.Activate\n oldVE = Grid.GetVerify\n Grid.SetVerify(#GRID_VERIFY_OFF)\n gridName = gridFN.GetBaseName\n theField = resultList.Get(0)\n cellSize = resultList.Get(1)\n theExtent = resultList.Get(2)\n themeDict = Dictionary.Make(1)\n fieldDict = Dictionary.Make(1)\n themeDict.Set(theTheme, {theField})\n fieldDict.Set(theField, {gridName})\n if (theField.IsTypeNumber) then\n classList = List.Make\n else\n cl assList = {theField}\n end\n parmList = {\"convert\", theView, FALSE, 1, themeDict, fieldDict,\n classList, theExtent, cellSize}\n gridDict = Av.Run(\"SM.ConvertGrids\", parmList)\n if (gridDict <> NIL) then\n newGrid = gridDict.Get(gridName)\n if (newGrid.SaveDataSet(gridFN).Not) then\n MsgBox.Warning(\"Unable to save grid to\" ++ gridFN.AsString, \"\")\n end\n newTheme = GTheme.Make(newGrid)\n newTheme.SetName(gridName)\n theView.AddTheme(newTheme)\n Av.GetProject.Set Modified(TRUE)\n end\n theView.SetExtension(oldAE)\n oldAE.Activate\n Grid.SetVerify(oldVE)\n end\nend\n" ) (Script.1422 Name: "SM.Menu.Properties" SourceCode: "' Name: SM.Menu.Properties\n'\n' Description: Opens SM properties dialog.\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ----------------------------------------- ----------------------------\n\n\nAv.FindDialog(\"SM.Properties\").Open\n" ) (Script.1423 Name: "SM.Menu.RandomSample" SourceCode: "' Name: SM.Menu.RandomSample\n'\n' Description: Opens the Random Sample dialog.\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ----------------------------------- ----------------------------------\n\n\nAv.FindDialog(\"SM.RandomSample\").Open\n" ) (Script.1424 Name: "SM.Menu.Rules" SourceCode: "'SM.Menu.Rules\n'\n'Create rules based on a file\n'\n'Last edited by Chris Garrard, 26Feb03\n'----------------------------------------------------------------------\n\n\ntheView = Av.GetActiveDoc\n\n\n'Get filename\n\npatterns = {\"*.mod\", \"*.smg\", \"*.sms\", \"*.txt\", \"*.*\"}\nlabels = {\"Model Import files (*.mod)\", \"Grid Model files (*.smg)\",\n \"Shapefile Model files (*.sms)\", \"Text files (*.txt)\",\n \"All files (*.*)\"}\ntreeFNList = FileDialog.ReturnFiles(patterns, labels, \"Open...\", 0)\nif (treeFNList.Count = 0) then\n retur n NIL\nend\ntreeFN = treeFNList.Get(0)\ntreeFile = LineFile.Make(treeFN, #FILE_PERM_READ)\n\n\n'Get ODB file if it exists\n\nisODB = FALSE\nstartPos = -1\nwhile (treeFile.IsAtEnd.Not)\n inLine = treeFile.ReadElt\n if (inLine.Contains(\"ODB File\")) then\n odbStr = inLine.AsTokens(\"=\").Get(1)\n if (odbStr.IsNull.Not and File.Exists(odbStr.Trim.AsFileName)) then\n theODB = ODB.OpenAndInstall(odbStr.Trim.AsFileName)\n fieldDict = theODB.Get(0)\n varDict = theODB.Get(1)\n isODB = TRUE\n end\n elseif ( inLine.Contains(\"Variables used\")) then\n varList = inLine.AsTokens(\"=\").Get(1).AsTokens(\" \")\n elseif (inLine.Contains(\"1) root\")) then\n startPos = treeFile.GetPos\n end\nend\nif (startPos = -1) then\n treeFile.Close\n Msgbox.Error(\"Error reading\" ++ treeFN.GetBaseName + \".\", \"\")\n return NIL\nend\n\n\n'If there is an ODB file, make sure all needed themes are loaded\n\nif (isODB) then\n treeFile.Close\n dictSize = 1 max (varList.Count / 2).Floor\n themeDict = Dictionary.Make(dictSize)\n aliasDict = Dictionary .Make(dictSize)\n parmList = {theView, varList, themeDict, fieldDict, varDict,\n aliasDict, NIL}\n Av.Run(\"SM.GetFields\", parmList)\n\n\n'Else use the variable names in the tree\n\nelse\n treeFile.SetPos(startPos)\n varList = List.Make\n inLine = treeFile.ReadElt\n while ((inLine <> NIL) and inLine.IsNull.Not)\n lineList = inLine.AsTokens(\" \")\n theCondition = lineList.Get(1)\n if (theCondition.Contains(\":\")) then\n varList.Add(theCondition.AsTokens(\":\").Get(0))\n elseif (theCondition.Contains(\"<\") ) then\n varList.Add(theCondition.AsTokens(\"<\").Get(0))\n elseif (theCondition.Contains(\">\")) then\n varList.Add(theCondition.AsTokens(\">\").Get(0))\n end\n inLine = treeFile.ReadElt\n end\n treeFile.Close\n varList.RemoveDuplicates\n if (varList.Count = 0) then\n MsgBox.Error(\"Error reading\" ++ treeFN.GetBaseName + \".\", \"\")\n return NIL\n end\n\n varDict = Dictionary.Make(varList.Count)\n for each varName in varList\n varDict.Add(varName, {varName})\n end\n\nend\n\n\n'Get the dictionary that r epresents the tree\n\ntreeDict = Av.Run(\"SM.MakeTree\", treeFN)\nif (treeDict = NIL) then\n return NIL\nend\n\n\n'Open the rules dialog\n\nrulesStr = \"Rules for\" ++ treeFN.GetFullName + NL + NL +\n Av.Run(\"SM.GetTreeRules\", {treeDict, varDict})\nrulesDlg = Av.FindDialog(\"SM.dlgRules\")\nrulesDlg.FindByName(\"tbxRules\").SetText(rulesStr)\nrulesDlg.Open\n" ) (Script.1425 Name: "SM.Menu.Sample" SourceCode: "' Name: SM.Menu.Sample\n'\n' Description: Opens the sample dialog.\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ------------------------------------------------ ---------------------\n\n\nAv.FindDialog(\"SM.Sample\").Open\n" ) (Script.1426 Name: "SM.Menu.Specify" SourceCode: "' Name: SM.Menu.Specify\n'\n' Description: Opens SM.Specify dialog.\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ----------------------------------------------- ----------------------\n\n\nspecifyDlg = Av.FindDialog(\"SM.Specify\")\nspecifyDlg.SetObjectTag(Av.GetActiveDoc)\nspecifyDlg.Open\n" ) (Script.1427 Name: "SM.Menu.Tree" SourceCode: "' Name: SM.Menu.Tree\n'\n' Description: Opens the CART dialog.\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------- -----------------\n\nAv.FindDialog(\"SM.Tree\").Open\n" ) (Script.1428 Name: "SM.Menu.Update" SourceCode: "' Name: SM.Menu.Update\n'\n' Description: Update script for StatMod menu.\n'\n' Self: Combine, Convert, Info, Intersect, Logistic, Kappa, Random,\n' Resample, Sample, Specify, Tree, ZoneSample\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for prof it and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\ntheView = Av.GetActiveDoc\nthemeList = theView.GetThemes\nactiveThemeList = theView.GetActiveThemes\nif (activeThemeList.Count > 0) then\n theTheme = activeThemeList.Get(0)\nelse\n theTheme = NIL\nend\n\n\n' ---------------------------------------------------------------------\n' Combine: Enable/disable based on if there are at least two grid\n' themes in the view.\n\nif ( SELF.GetName = \"Combine\") then\n\n gridList = List.Make\n for each aTheme in themeList\n if (aTheme.Is(GTheme)) then\n gridList.Add(aTheme)\n end\n end\n SELF.SetEnabled(gridList.Count > 1)\n\n' ---------------------------------------------------------------------\n' Convert: Enable/disable based on if the first active theme is a \n' polygon theme.\n\nelseif (SELF.GetName = \"Convert\") then\n if ((theTheme <> NIL) and theTheme.Is(FTheme)) then\n shapeField = theTheme.GetFTab.FindField(\"Shape\")\n if (sh apeField.GetType = #FIELD_SHAPEPOLY) then\n SELF.SetEnabled(TRUE)\n else\n SELF.SetEnabled(FALSE)\n end\n else\n SELF.SetEnabled(FALSE)\n end\n\n\n' ---------------------------------------------------------------------\n' Info: Enable/disable based on if there is theme information for\n' the active theme.\n\nelseif (SELF.GetName = \"Info\") then\n if (theTheme <> NIL) then\n theFN = theTheme.GetSrcName.GetFileName\n if (theFN <> NIL) then\n infoFN = theFN.Clone\n if (theTheme.Is(GTheme)) t hen\n infoFN.SetExtension(\"smg\")\n else\n infoFN.SetExtension(\"sms\")\n end\n if (File.Exists(infoFN)) then\n SELF.SetEnabled(TRUE)\n else\n SELF.SetEnabled(FALSE)\n end\n end\n end\n \n\n' ---------------------------------------------------------------------\n' Intersect: Disable if there aren't any polygon themes in the view.\n\n\nelseif (SELF.GetName = \"Intersect\") then\n isOK = FALSE\n for each aTheme in themeList\n if (aTheme.Is(FTheme)) then\n shapeType = aTheme.GetFTab.FindField(\"Shape\").GetType\n if (shapeType = #FIELD_SHAPEPOLY) then\n isOK = TRUE\n break\n end\n end\n end\n SELF.SetEnabled(isOK)\n\n\n' ---------------------------------------------------------------------\n' Logistic: Disable if there are no polygon or grid themes or a point\n' theme in the view.\n\nelseif (SELF.GetName = \"Logistic\") then\n polyOK = FALSE\n pointOK = FALSE\n gridOK = FALSE\n for each aTheme in themeList\n if (aTheme.Is(FTheme)) then\n shapeType = aTh eme.GetFTab.FindField(\"Shape\").GetType\n if (shapeType = #FIELD_SHAPEPOLY) then\n polyOK = TRUE\n elseif (shapeType = #FIELD_SHAPEPOINT) then\n pointOK = TRUE\n end\n elseif (aTheme.Is(GTheme)) then\n gridOK = TRUE\n end\n end\n SELF.SetEnabled((polyOK or gridOK) and pointOK)\n\n\n' ---------------------------------------------------------------------\n' Kappa: Disable if there is not a correct combination of polygon,\n' integer grid, and point themes in the view.\n\nelseif (SELF.G etName = \"Kappa\") then\n polyOK = FALSE\n pointOK = FALSE\n gridOK = FALSE\n for each aTheme in themeList\n if (aTheme.Is(FTheme)) then\n shapeType = aTheme.GetFTab.FindField(\"Shape\").GetType\n if (shapeType = #FIELD_SHAPEPOLY) then\n polyOK = TRUE\n elseif (shapeType = #FIELD_SHAPEPOINT) then\n pointOK = TRUE\n end\n elseif (aTheme.Is(GTheme) and aTheme.GetGrid.IsInteger) then\n gridOK = TRUE\n end\n end\n zoneOK = gridOK and polyOK\n ptOK = (polyOK or gridOK) and poin tOK\n SELF.SetEnabled(zoneOK or ptOK)\n\n\n' ---------------------------------------------------------------------\n' Random: Disable if there are no polygon or grid themes in the view.\n\nelseif (SELF.GetName = \"Random\") then\n isOK = FALSE\n for each aTheme in themeList\n if (aTheme.Is(FTheme)) then\n shapeType = aTheme.GetFTab.FindField(\"Shape\").GetType\n if (shapeType = #FIELD_SHAPEPOLY) then\n isOK = TRUE\n break\n end\n elseif (aTheme.Is(GTheme)) then\n isOK = TRUE\n bre ak\n end\n end\n SELF.SetEnabled(isOK)\n\n\n' ---------------------------------------------------------------------\n' Resample: Enable/disable based on if the first active theme is a\n' grid theme.\n\nelseif (SELF.GetName = \"Resample\") then\n if ((theTheme <> NIL) and theTheme.Is(GTheme)) then\n SELF.SetEnabled(TRUE)\n else\n SELF.SetEnabled(FALSE)\n end\n\n\n' ---------------------------------------------------------------------\n' Sample: Disable if there are no polygon or grid themes or a point\n' theme in the view.\n\nelseif (SELF.GetName = \"Sample\") then\n polyOK = FALSE\n pointOK = FALSE\n gridOK = FALSE\n for each aTheme in themeList\n if (aTheme.Is(FTheme)) then\n shapeType = aTheme.GetFTab.FindField(\"Shape\").GetType\n if (shapeType = #FIELD_SHAPEPOLY) then\n polyOK = TRUE\n elseif (shapeType = #FIELD_SHAPEPOINT) then\n pointOK = TRUE\n end\n elseif (aTheme.Is(GTheme)) then\n gridOK = TRUE\n end\n end\n SELF.SetEnabled((polyOK or gridOK) and pointOK)\n\n\n' -------------- -------------------------------------------------------\n' Specify: Disable if there are no polygon or grid themes in the view.\n\n\nelseif (SELF.GetName = \"Specify\") then\n isOK = FALSE\n for each aTheme in themeList\n if (aTheme.Is(FTheme)) then\n shapeType = aTheme.GetFTab.FindField(\"Shape\").GetType\n if (shapeType = #FIELD_SHAPEPOLY) then\n isOK = TRUE\n break\n end\n elseif (aTheme.Is(GTheme)) then\n isOK = TRUE\n break\n end\n end\n SELF.SetEnabled(isOK)\n\n\n' -------- -------------------------------------------------------------\n' Tree: Disable if there is not a correct combination of polygon,\n' grid, and point themes in the view.\n\nelseif (SELF.GetName = \"Tree\") then\n polyOK = FALSE\n pointOK = FALSE\n gridOK = FALSE\n for each aTheme in themeList\n if (aTheme.Is(FTheme)) then\n shapeType = aTheme.GetFTab.FindField(\"Shape\").GetType\n if (shapeType = #FIELD_SHAPEPOLY) then\n polyOK = TRUE\n elseif (shapeType = #FIELD_SHAPEPOINT) then\n pointOK = TRUE\n end\n elseif (aTheme.Is(GTheme)) then\n gridOK = TRUE\n end\n end\n ptOK = (polyOK or gridOK) and pointOK\n zoneOK = polyOK and gridOK\n SELF.SetEnabled(ptOK or zoneOK)\n\n\n' ---------------------------------------------------------------------\n' ZoneSample: Disable if there is not at least one polygon and one\n' grid theme in the view.\n\nelseif (SELF.GetName = \"ZoneSample\") then\n polyOK = FALSE\n gridOK = FALSE\n for each aTheme in themeList\n if (aTheme.Is(FTheme)) then\n shapeTyp e = aTheme.GetFTab.FindField(\"Shape\").GetType\n if (shapeType = #FIELD_SHAPEPOLY) then\n polyOK = TRUE\n end\n elseif (aTheme.Is(GTheme)) then\n gridOK = TRUE\n end\n end\n SELF.SetEnabled(polyOK and gridOK)\n\n\n' ---------------------------------------------------------------------\n\nend\n\n" ) (Script.1429 Name: "SM.Menu.ZoneSample" SourceCode: "' Name: SM.Menu.ZoneSample\n'\n' Description: Opens the zone sample dialog.\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' --------------------------------------- ------------------------------\n\n\n' Open the dialog and get the results.\n\ntheDlg = Av.FindDialog(\"SM.ZoneSample\")\nresultList = theDlg.Open\n\nif (resultList <> NIL) then\n\n sampleList = resultList.Get(0)\n zoneTheme = resultList.Get(1)\n zoneIDField = resultList.Get(2)\n zoneFieldList = resultList.Get(3)\n selRecs = resultList.Get(4)\n exportDBF = resultList.Get(5)\n addTable = resultList.Get(6)\n thePrj = theDlg.GetObjectTag.GetProjection\n vtabFN = FileName.GetTmpDir.MakeTmp(\"sample\", \"dbf\")\n \n \n ' Make a liases for new fields and create a dictionary that holds\n ' stats and aliases for themes.\n \n sampleDict = Dictionary.Make(1 max (sampleList.Count / 2).Floor)\n for each aSample in sampleList\n theTheme = aSample.Get(0)\n theStat = aSample.Get(1)\n if ({\"Min\", \"Max\", \"Sum\"}.FindByValue(theStat) <> -1) then\n suffix = theStat\n elseif (theStat = \"Range\") then\n suffix = \"rng\"\n elseif (theStat = \"Mean\") then\n suffix = \"ave\"\n elseif (theStat = \"Standard Deviation\") then\n suffi x = \"std\"\n elseif (theStat = \"Variety\") then\n suffix = \"vty\"\n elseif (theStat = \"Majority\") then\n suffix = \"maj\"\n elseif (theStat = \"Minority\") then\n suffix = \"mnr\"\n elseif (theStat = \"Median\") then\n suffix = \"med\"\n end\n alias = theTheme.GetName.Left(6) + \"_\" + suffix\n statList = sampleDict.Get(theTheme)\n if (statList = NIL) then\n statList = {{theStat, alias}}\n else\n statList.Add({theStat, alias})\n end\n sampleDict.Set(theTheme, statList)\n end\n \n \n ' Make the sample VTab.\n \n zoneFieldList.Add(ZoneIDField) \n theVTab = Av.Run(\"SM.ZonalSample\", {sampleDict, zoneTheme,\n zoneIDField, zoneFieldList, NIL, selRecs, thePrj, vtabFN})\n \n if (theVTab <> NIL) then\n\n \n ' Get the name for the exported file.\n \n if (exportDBF) then\n theFN = FileName.GetCWD.MakeTmp(\"sample\", \"dbf\")\n exportClass = dBASE\n exportPattern = \"*.dbf\"\n else\n theFN = FileName.GetCWD.MakeTmp(\"sample\", \"txt\")\n exportClass = DText\n expor tPattern = \"*.txt\"\n end\n theFN = FileDialog.Put(theFN, exportPattern, \"Export as...\")\n \n \n ' Export the file.\n \n if (theFN <> NIL) then\n finalVTab = theVTab.Export(theFN, exportClass, FALSE)\n if (addTable) then\n theTable = Table.Make(finalVTab)\n theTable.SetName(theFN.GetBaseName)\n Av.GetProject.SetModified(TRUE)\n end\n end\n \n \n ' Clean up.\n \n theVTab.DeActivate\n theVTab = NIL\n Av.PurgeObjects\n File.Delete(vtabFN)\n for each aFN in FileName.GetTmpDir.ReadFiles(\"zonal*.dbf\")\n File.Delete(aFN)\n end\n\n return NIL\n\n end \nend\n" ) (Script.1430 Name: "SM.MergeGrids.Apply" SourceCode: "' Name: SM.MergeGrids.Apply\n'\n' Description: Apply scripts for controls in SM.MergeGrids.\n'\n' Self: lbxAvailable, lbxMerge\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and docume ntation.\n' ---------------------------------------------------------------------\n\n\nmergeDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbxAvailable: Run the click script for the Add button.\n\nif (SELF.GetName = \"lbxAvailable\") then\n mergeDlg.FindByName(\"lbtAdd\").Click\n\n\n' ---------------------------------------------------------------------\n' lbxMerge: Run the click script for the Remove button.\n\nelseif (SELF.GetName = \"lbxMerge\") then\n mergeDlg.FindByNam e(\"lbtRemove\").Click\n\n\n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1431 Name: "SM.MergeGrids.Click" SourceCode: "' Name: SM.MergeGrids.Click\n'\n' Description: Click scripts for controls in SM.MergeGrids.\n'\n' Self: lbtAdd, lbtCancel, lbtHelp, lbtOK, lbtRemove\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nmergeDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbtAdd: Add the selected grids to the merge listbox.\n\nif (SELF.GetName = \"lbtAdd\") then\n \n lbxAvailable = mergeDlg.FindByName(\"lbxAvailable\")\n lbxMerge = mergeDlg.FindByName(\"lbxMerge\")\n \n availableList = lbxAvailable.GetList\n selList = lbxAvailable.GetSelection\n if (selList.Count > 0) then\n m ergeList = lbxMerge.GetList\n for each aTheme in selList\n mergeList.Add(aTheme)\n availableList.RemoveObj(aTheme)\n end\n lbxAvailable.DefineFromList(availableList)\n lbxAvailable.SortAscending(FALSE)\n lbxMerge.DefineFromList(mergeList)\n end\n \n\n' ---------------------------------------------------------------------\n' lbtCancel: Close the dialog and empty controls so that ArcView\n' doesn't think that the data sets are still being used.\n\nelseif (SELF.GetName = \"lbtCancel\") then\n merg eDlg.Close\n mergeDlg.FindByName(\"lbxAvailable\").Empty\n mergeDlg.FindByName(\"lbxMerge\").Empty\n\n\n' ---------------------------------------------------------------------\n'lbtHelp: Open help.\n\nelseif (SELF.GetName = \"lbtHelp\") then\n Av.Run(\"SM.Help\", SELF)\n\n\n' ---------------------------------------------------------------------\n' lbtOK: Close the dialog and merge the grids.\n\nelseif (SELF.GetName = \"lbtOK\") then\n mergeDlg.Close\n theView = mergeDlg.GetObjectTag\n \n \n ' Get the list of grids to merge.\n \n selList = mergeDlg.FindByName(\"lbxMerge\").GetList\n if (selList.Count > 1) then\n grid1 = selList.Get(0).GetGrid\n mergeList = List.Make\n for each n in 1..(selList.Count - 1)\n mergeList.Add(selList.Get(n).GetGrid)\n end\n \n \n ' Get the name for the new grid.\n \n gridFN = FileName.GetCWD.MakeTmp(\"grid\", \"\")\n theTitle = \"Save grid as...\"\n gridFN = SourceManager.PutDataSet(Grid, theTitle, gridFN, TRUE)\n if (gridFN <> NIL) then\n \n \n ' Merge.\n \n if (mer geDlg.FindByName(\"radMosaic\").IsSelected) then\n newGrid = grid1.Mosaic(mergeList)\n else\n newGrid = grid1.Merge(mergeList)\n end\n newGrid.BuildVAT\n if (newGrid.HasError) then\n MsgBox.Error(\"Error merging grids.\", \"\")\n else\n if (newGrid.SaveDataSet(gridFN).Not) then\n MsgBox.Warning(\"Error saving grid to\" ++ gridFN.AsString, \"\")\n end\n newTheme = GTheme.Make(newGrid)\n newTheme.SetName(gridFN.GetBaseName)\n theView.AddTheme(n ewTheme)\n Av.GetProject.SetModified(TRUE)\n end\n end\n end\n\n\n' ---------------------------------------------------------------------\n' lbtRemove: Remove selected grids from the merge listbox.\n\nelseif (SELF.GetName = \"lbtRemove\") then\n \n lbxAvailable = mergeDlg.FindByName(\"lbxAvailable\")\n lbxMerge = mergeDlg.FindByName(\"lbxMerge\")\n \n mergeList = lbxMerge.GetList\n selList = lbxMerge.GetSelection\n if (selList.Count > 0) then\n availableList = lbxAvailable.GetList\n for each aTheme in selList\n availableList.Add(aTheme)\n mergeList.RemoveObj(aTheme)\n end\n lbxAvailable.DefineFromList(availableList)\n lbxAvailable.SortAscending(FALSE)\n lbxMerge.DefineFromList(mergeList)\n end\n\n\n' ---------------------------------------------------------------------\n\nend\nSELF.BroadcastUpdate\n" ) (Script.1432 Name: "SM.MergeGrids.Open" SourceCode: "' Name: SM.MergeGrids.Open\n'\n' Description: Open script for SM.MergeGrids\n'\n' Self: SM.MergeGrids\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' -------------- -------------------------------------------------------\n\n\n' Find controls.\n\nlbxAvailable = SELF.FindByName(\"lbxAvailable\")\nlbxMerge = SELF.FindByName(\"lbxMerge\")\nlbtOK = SELF.FindByName(\"lbtOK\")\nradMosaic = SELF.FindByName(\"radMosaic\")\n\n' Set the view as an object tag.\n\ntheView = Av.GetActiveDoc\nSELF.SetObjectTag(theView)\n\n\n' Make a list of grid themes in the view.\n\ngridList = List.Make\nfor each aTheme in theView.GetThemes\n if (aTheme.Is(GTheme)) then\n gridList.Add(aTheme)\n end\nend\n\n\n' Initialize.\n\nlbx Available.DefineFromList(gridList)\nlbxAvailable.SortAscending(FALSE)\nlbxMerge.Empty\nlbtOK.SetEnabled(FALSE)\nradMosaic.Select\nlbxAvailable.Focus\n" ) (Script.1433 Name: "SM.MergeGrids.Update" SourceCode: "' Name: SM.MergeGrids.Update\n'\n' Description: Update scripts for controls in SM.MergeGrids.\n'\n' Self: lbtOK\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---- -----------------------------------------------------------------\n\n\nmergeDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbtOK: Enable/disable based on whether there are at least two grids\n' selected.\n\nif (SELF.GetName = \"lbtOK\") then\n SELF.SetEnabled(mergeDlg.FindByName(\"lbxMerge\").GetList.Count > 1)\n \n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1434 Name: "SM.PolyGrid.Click" SourceCode: "' Name: SM.PolyGrid.Click\n'\n' Description: Click scripts for controls in SM.PolyGrid.\n'\n' Self: lbtCancel, lbtHelp, lbtOK\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documen tation.\n' ---------------------------------------------------------------------\n\n\ntheDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbtCancel: Close dialog.\n\nif (SELF.GetName = \"lbtCancel\") then\n theDlg.SetModalResult(NIL)\n theDlg.Close\n \n\n' ---------------------------------------------------------------------\n' lbtHelp: Open help.\n\nelseif (SELF.GetName = \"lbtHelp\") then\n Av.Run(\"SM.Help\", SELF)\n\n\n' ----------------------------------------------------- ----------------\n' lbtOK: Return choices and close dialog.\n\nelseif (SELF.GetName = \"lbtOK\") then\n theView = theDlg.GetObjectTag.Get(0)\n theField = theDlg.FindByName(\"cbxField\").GetSelection\n sizeStr = theDlg.FindByName(\"cbxCellSize\").GetSelection\n if (sizeStr = \"As specified below\") then\n txlCellSize = theDlg.FindByName(\"txlCellSize\")\n cellSize = txlCellSize.GetText.AsNumber\n if (cellSize.IsNull) then\n MsgBox.Error(\"You must enter a cell size.\", \"\")\n txlCellSize.Focus\n return NI L\n elseif (cellSize <= 0) then\n MsgBox.Error(\"Cell size must be greater than 0.\", \"\")\n txlCellSize.Focus\n return NIL\n end\n else\n themeName = sizeStr.Right(sizeStr.Count - 8)\n cellSize = theView.FindTheme(themeName).GetGrid.GetCellSize\n end\n extentStr = theDlg.FindByName(\"cbxExtent\").GetSelection\n themeName = extentStr.Right(extentStr.Count - 8)\n theExtent = theView.FindTheme(themeName).ReturnExtent\n theDlg.SetModalResult({theField, cellSize, theExtent})\n theDlg.Close\n\n\n' -- -------------------------------------------------------------------\n\nend\n" ) (Script.1435 Name: "SM.PolyGrid.Close" SourceCode: "' Name: SM.PolyGrid.Close\n'\n' Description: Close script for SM.PolyGrid. Empties combo boxes so\n' that ArcView doesn't think the data sets are still being used.\n'\n' Self: SM.PolyGrid\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit a nd this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nSELF.FindByName(\"cbxField\").Empty\nSELF.FindByName(\"cbxCellSize\").Empty\nSELF.FindByName(\"cbxExtent\").Empty\n" ) (Script.1436 Name: "SM.PolyGrid.Open" SourceCode: "' Name: SM.PolyGrid.Open\n'\n' Description: Open script for SM.PolyGrid. This is a modal dialog.\n'\n' Parameters: passed as an object tag\n' (0) View\n' (1) FTheme\n'\n' Self: SM.PolyGrid\n'\n' Returns: {field, cell size, extent}\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nparmList = SELF.GetObjectTag\ntheView = parmList.Get(0)\ntheTheme = parmList.Get(1)\n\nfieldList = Av.Run(\"SM.Library\", {\"VisibleFields\", theTheme.GetFTab})\nsizeList = List.Make\nextentList = List.Make\nfor each aTheme in theView.GetThemes\n extentList.Add(\"Same as\" ++ aTheme.GetName)\n if (aTheme.Is(GTheme)) then\n sizeList.Add(\"S ame as\" ++ aTheme.GetName)\n end\nend\nsizeList.Sort(TRUE)\nextentList.Sort(TRUE)\nsizeList.Add(\"As specified below\")\n\nSELF.FindByName(\"cbxField\").DefineFromList(fieldList)\nSELF.FindByName(\"cbxCellSize\").DefineFromList(sizeList)\nSELF.FindByName(\"cbxExtent\").DefineFromList(extentList)\nSELF.FindByName(\"cbxField\").Focus\n" ) (Script.1437 Name: "SM.Properties.Click" SourceCode: "' Name: SM.Properties.Click\n'\n' Description: Click scripts for controls in SM.Properties.\n'\n' Self: btnODB, btnSAS, btnSPlus, chkSAS, chkSPlus, lbtCancel,\n' lbtHelp, lbtOK\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copy right\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\npropDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' btnODB: Browse for a folder to put ODB files in.\n\nif (SELF.GetName = \"btnODB\") then\n txlODB = propDlg.FindByName(\"txlODB\")\n dirDlg = Av.FindDialog(\"SM.ChooseDir\")\n theFNStr = txlODB.GetText.Trim\n if (theFNStr.IsNull or File.Exists(theFNStr.AsFileName).Not) then\n dirDlg.S etObjectTag(FileName.GetTmpDir)\n else\n dirDlg.SetObjectTag(theFNStr.AsFileName)\n end\n dirDlg.Open\n theDir = dirDlg.GetObjectTag\n if (theDir <> NIL) then\n txlODB.SetText(theDir.AsString)\n end\n\n\n' ---------------------------------------------------------------------\n' btnSAS: Browse for SAS executable.\n\nelseif (SELF.GetName = \"btnSAS\") then\n txlSAS = propDlg.FindByName(\"txlSAS\")\n currentDir = FileName.GetCWD\n if (txlSAS.IsEmpty.Not) then\n theFN = txlSAS.GetText.Trim.AsFileName\n if (File. Exists(theFN)) then\n if (theFN.IsFile) then\n theDir = theFN.ReturnDir\n else\n theDir = theFN\n end\n theDir.SetCWD\n else\n theDir = currentDir\n end\n else\n theDir = currentDir\n end\n theFN = FileDialog.Show(\"*.exe\", \"*.exe\", \"SAS Executable\")\n currentDir.SetCWD\n if (theFN = NIL) then\n return NIL\n end\n txlSAS.SetText(theFN.AsString)\n\n\n' ---------------------------------------------------------------------\n' btnSPlus: Browse for S-Plus executable.\n\nelseif ( SELF.GetName = \"btnSPlus\") then\n txlSPlus = propDlg.FindByName(\"txlSPlus\")\n currentDir = FileName.GetCWD\n if (txlSPlus.IsEmpty.Not) then\n theFN = txlSPlus.GetText.Trim.AsFileName\n if (File.Exists(theFN)) then\n if (theFN.IsFile) then\n theDir = theFN.ReturnDir\n else\n theDir = theFN\n end\n theDir.SetCWD\n else\n theDir = currentDir\n end\n else\n theDir = currentDir\n end\n theFN = FileDialog.Show(\"*.exe\", \"*.exe\", \"S-Plus Executable\")\n currentDir.SetCWD\n i f (theFN = NIL) then\n return NIL\n end\n txlSPlus.SetText(theFN.AsString)\n \n\n' ---------------------------------------------------------------------\n' lbtCancel: Close the dialog.\n\nelseif (SELF.GetName = \"lbtCancel\") then\n propDlg.Close\n \n\n' ---------------------------------------------------------------------\n' lbtHelp: Run help.\n\nelseif (SELF.GetName = \"lbtHelp\") then\n Av.Run(\"SM.Help\", NIL)\n\n \n' ---------------------------------------------------------------------\n' lbtOK: Check that everyth ing is OK and update odb file.\n\nelseif (SELF.GetName = \"lbtOK\") then\n\n\n ' Get the controls.\n \n cbxTime = propDlg.FindByName(\"cbxTime\")\n chkSAS = propDlg.FindByName(\"chkSAS\")\n chkSPlus = propDlg.FindByName(\"chkSPlus\")\n txlODB = propDlg.FindByName(\"txlODB\")\n txlSAS = propDlg.FindByName(\"txlSAS\")\n txlSASOpts = propDlg.FindByName(\"txlSASOpts\")\n txlSPlus = propDlg.FindByName(\"txlSPlus\")\n txlSPlusOpts = propDlg.FindByName(\"txlSPlusOpts\")\n\n\n ' Get the filenames.\n\n odbDirStr = txlODB.GetText.Trim\n sasF NStr = txlSAS.GetText.Trim\n splusFNStr = txlSPlus.GetText.Trim\n\n \n ' Make sure that all filenames are okay.\n\n if (chkSAS.IsSelected) then\n if (sasFNStr.IsNull) then\n theMsg = \"You must enter a filename for the SAS executable.\"\n MsgBox.Error(theMsg, \"Missing Filename\")\n txlSAS.Focus\n return NIL\n else\n sasFN = sasFNStr.AsFileName\n if (File.Exists(sasFN).Not or sasFN.IsFile.Not) then\n theMsg = sasFN.AsString ++ \"is not a valid path and filename.\"\n MsgBox.Er ror(theMsg, \"Invalid Path\")\n txlSAS.Focus\n return NIL\n end 'if File.Exists...\n end 'if sasFNStr.IsNull...\n end 'if chkSAS.IsSelected...\n \n if (chkSPlus.IsSelected) then\n if (splusFNStr.IsNull) then\n theMsg = \"You must enter a filename for the S-Plus executable.\"\n MsgBox.Error(theMsg, \"Missing Filename\")\n txlSPlus.Focus\n return NIL\n else\n splusFN = splusFNStr.AsFileName\n if (File.Exists(splusFN).Not or splusFN.IsFile.Not) then\n theMsg = splu sFN.AsString ++ \"is not a valid path and\" ++\n \"filename.\"\n MsgBox.Error(theMsg, \"Invalid Path\")\n txlSPlus.Focus\n return NIL\n end 'if File.Exists...\n end 'if splusFNStr.IsNull...\n end 'if chkSPlus.IsSelected...\n \n if (chkSAS.IsSelected.Not or chkSPlus.IsSelected.Not) then\n if (odbDirStr.IsNull) then\n odbDir = FileName.GetTmpDir\n odbDirStr = odbDir.AsString\n else\n odbDir = odbDirStr.AsFileName\n end\n if (File.Exists(odbDir).Not or odbDi r.IsDir.Not) then\n theMsg = odbDir.AsString ++ \"is not a valid directory.\"\n MsgBox.Error(theMsg, \"Invalid Directory\")\n txlODB.Focus\n return NIL\n end\n end\n\n\n ' Save settings in ODB.\n \n odbFN = Extension.Find(\"StatMod Zone\").GetFileName.ReturnDir\n odbFN.MergeFile(\"statmodz.odb\")\n if (File.Exists(odbFN)) then\n settingsODB = ODB.Open(odbFN)\n settingsDict = settingsODB.Get(0)\n else\n settingsODB = ODB.Make(odbFN)\n settingsDict = Dictionary.Make(5)\n settingsODB.Add(sett ingsDict)\n end\n settingsDict.Set(\"cbxTime\", cbxTime.GetCurrentValue)\n settingsDict.Set(\"chkSAS\", chkSAS.IsSelected)\n settingsDict.Set(\"chkSPlus\", chkSPlus.IsSelected)\n settingsDict.Set(\"txlODB\", odbDirStr)\n settingsDict.Set(\"txlSAS\", sasFNStr)\n settingsDict.Set(\"txlSASOpts\", txlSASOpts.GetText)\n settingsDict.Set(\"txlSPlus\", splusFNStr)\n settingsDict.Set(\"txlSPlusOpts\", txlSPlusOpts.GetText)\n settingsODB.Commit\n\n\n ' If autoSubmit, force automatic tree selection and plots in PDF\n ' file.\n \n chkA uto = Av.FindDialog(\"SM.TreeSize\").FindByName(\"chkAuto\")\n radPDF = Av.FindDialog(\"SM.TreePlots\").FindByName(\"radPDF\")\n radSPlus = Av.FindDialog(\"SM.TreePlots\").FindByName(\"radSPlus\")\n if (chkSPlus.IsSelected) then\n chkAuto.SetSelected(TRUE)\n chkAuto.SetEnabled(FALSE)\n radPDF.Select\n radSPlus.SetEnabled(FALSE)\n else\n chkAuto.SetEnabled(TRUE)\n radSPlus.SetEnabled(TRUE)\n end\n chkAuto.Click\n \n\n ' Close the dialog.\n \n propDlg.Close\n \n\n' ---------------------------------------------- -----------------------\n\nend\nSELF.BroadcastUpdate\n" ) (Script.1438 Name: "SM.Properties.Open" SourceCode: "' Name: SM.Properties.Open\n'\n' Description: Open script for SM.Properties dialog. Loads settings\n' from extension ODB file.\n'\n' Self: SM.Properties\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retai ned in the code and documentation.\n' ---------------------------------------------------------------------\n\n\n' Get the controls.\n\ncbxTime = SELF.FindByName(\"cbxTime\")\nchkSAS = SELF.FindByName(\"chkSAS\")\nchkSPlus = SELF.FindByName(\"chkSPlus\")\ntxlODB = SELF.FindByName(\"txlODB\")\ntxlSAS = SELF.FindByName(\"txlSAS\")\ntxlSASOpts = SELF.FindByName(\"txlSASOpts\")\ntxlSPlus = SELF.FindByName(\"txlSPlus\")\ntxlSPlusOpts = SELF.FindByName(\"txlSPlusOpts\")\n\n\n' Load settings from ODB.\n\nodbFN = Extension.Find(\"StatMod Zone\").GetF ileName.ReturnDir\nodbFN.MergeFile(\"statmodz.odb\")\nif (File.Exists(odbFN)) then\n settingsODB = ODB.Open(odbFN)\n settingsDict = settingsODB.Get(0)\n cbxTime.FindByValue(settingsDict.Get(\"cbxTime\"))\n cbxTime.SelectCurrent\n chkSAS.SetSelected(settingsDict.Get(\"chkSAS\"))\n chkSAS.Click\n chkSPlus.SetSelected(settingsDict.Get(\"chkSPlus\"))\n chkSPlus.Click\n txlODB.SetText(settingsDict.Get(\"txlODB\"))\n txlSAS.SetText(settingsDict.Get(\"txlSAS\"))\n txlSASOpts.SetText(settingsDict.Get(\"txlSASOpts\"))\n txlSPlus.Se tText(settingsDict.Get(\"txlSPlus\"))\n txlSPlusOpts.SetText(settingsDict.Get(\"txlSPlusOpts\"))\nelse\n cbxTime.FindByValue(60)\n cbxTime.SelectCurrent\n chkSAS.SetSelected(FALSE)\n chkSAS.Click\n chkSPlus.SetSelected(FALSE)\n chkSPlus.Click\n txlODB.SetText(FileName.GetTmpDir.AsString)\n txlSAS.Empty\n txlSASOpts.Empty\n txlSPlus.Empty\n txlSPlusOpts.Empty\nend\n" ) (Script.1439 Name: "SM.Properties.Update" SourceCode: "' Name: SM.Properties.Update\n'\n' Description: Update scripts for controls in SM.Properties.\n'\n' Self: btnODB, btnSAS, btnSPlus, cbxTime, txlODB, txlSAS, txlSASOpts,\n' txlSPlus, txlSPlusOpts\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for pr ofit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\npropDlg = SELF.GetDialog\nautoSAS = propDlg.FindByName(\"chkSAS\").IsSelected\nautoSPlus = propDlg.FindByName(\"chkSPlus\").IsSelected\n\n\n' ---------------------------------------------------------------------\n' btnODB: Enable/disable based on automatic submittal.\n\nif (SELF.GetName = \"btnODB\") then\n SELF.SetEnabled(autoSAS.Not or autoSPlus.Not)\n\n\n' ----------------- ----------------------------------------------------\n' btnSAS: Enable/disable based on SAS automatic submittal.\n\nelseif (SELF.GetName = \"btnSAS\") then\n SELF.SetEnabled(autoSAS)\n\n\n' ---------------------------------------------------------------------\n' btnSPlus: Enable/disable based on S-Plus automatic submittal.\n\nelseif (SELF.GetName = \"btnSPlus\") then\n SELF.SetEnabled(autoSPlus)\n\n\n' ---------------------------------------------------------------------\n' cbxTime: Enable/disable based on automatic submitt al.\n\nelseif (SELF.GetName = \"cbxTime\") then\n SELF.SetEnabled(autoSAS or autoSPlus)\n\n\n' ---------------------------------------------------------------------\n' txlODB: Enable/disable based on automatic submittal.\n\nelseif (SELF.GetName = \"txlODB\") then\n SELF.SetEnabled(autoSAS.Not or autoSPlus.Not)\n\n\n' ---------------------------------------------------------------------\n' txlSAS: Enable/disable based on SAS automatic submittal.\n\nelseif (SELF.GetName = \"txlSAS\") then\n SELF.SetEnabled(autoSAS)\n\n\n' --------- ------------------------------------------------------------\n' txlSASOpts: Enable/disable based on SAS automatic submittal.\n\nelseif (SELF.GetName = \"txlSASOpts\") then\n SELF.SetEnabled(autoSAS)\n\n\n' ---------------------------------------------------------------------\n' txlSPlus: Enable/disable based on S-Plus automatic submittal.\n\nelseif (SELF.GetName = \"txlSPlus\") then\n SELF.SetEnabled(autoSPlus)\n\n\n' ---------------------------------------------------------------------\n' txlSPlusOpts: Enable/disable based on S-Plus automatic submittal.\n\nelseif (SELF.GetName = \"txlSPlusOpts\") then\n SELF.SetEnabled(autoSPlus)\n\n\n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1440 Name: "SM.RandomPoints" SourceCode: "' Name: SM.RandomPoints\n'\n' Description: Chooses random points within the extent of a theme.\n' All points returned are over locations which contain data.\n'\n' Parameters:\n' (0) theFN: FileName of the new point shapefile.\n' (1) numPoints: Number of points.\n' (2) theTheme: The theme that the points must fall in.\n' (3) theField: The field from the theme to be included in the point\n' attributes. If NIL, then no field will be included. If the theme\n' is a grid theme, then the Value field will be automatic ally included\n' as long as this isn't NIL (no other fields will be included).\n' (4) hRes: The smallest horizontal distance between points (in map\n' units).\n' (5) vRes: The smallest vertical distance between points (in map\n' units).\n' (6) thePrj: The view projection (NIL if no projection).\n'\n' Returns: point theme\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the Stat Mod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\n' Get the parameters.\n\ntheFN = SELF.Get(0)\nnumPoints = SELF.Get(1)\ntheTheme = SELF.Get(2)\ntheField = SELF.Get(3)\nhRes = SELF.Get(4)\nvRes = SELF.Get(5)\nthePrj = SELF.Get(6)\n\n\n' Make the new FTab.\n\ntheFN.SetExtension(\"dbf\")\npointFTab = FTa b.MakeNew(theFN, Point)\nshapeField = pointFTab.FindField(\"Shape\")\nidField = Field.Make(\"ID\", #FIELD_DECIMAL, 8, 0)\nxField = Field.Make(\"X\", #FIELD_DECIMAL, 16, 6)\nyField = Field.Make(\"Y\", #FIELD_DECIMAL, 16, 6)\npointFTab.AddFields({idField, xField, yField})\nif (theField <> NIL) then\n if (theTheme.Is(GTheme)) then\n if (theTheme.GetGrid.IsInteger) then\n valueField = Field.Make(\"Value\", #FIELD_DECIMAL, 16, 0)\n else\n valueField = Field.Make(\"Value\", #FIELD_DECIMAL, 16, 6)\n end\n else\n val ueField = theField.Clone\n end\n pointFTab.AddFields({valueField})\nend\n\n\n' Get the sample intervals for the sampling regime.\n\ntheExtent = theTheme.ReturnExtent\nxInterval = (theExtent.GetWidth / hRes) + 2\nyInterval = (theExtent.GetHeight / vRes) + 2\nx0 = theExtent.GetLeft\ny0 = theExtent.GetBottom\n\n\n' Set up user interface.\n\nuserCancel = FALSE\nAv.ShowMsg(\"Sampling...\")\nAv.ShowStopButton\ncount = 0\n\n\n' Find points for a grid theme.\n\nif (theTheme.Is(GTheme)) then\n theGrid = theTheme.GetGrid\n while (count < num Points)\n x = (Number.MakeRandom(0, xInterval) * hRes) + x0\n y = (Number.MakeRandom(0, yInterval) * vRes) + y0\n thePoint = Point.Make(x, y)\n theValue = theGrid.CellValue(thePoint, Prj.MakeNull)\n if (theValue.IsNull.Not) then\n count = count + 1\n if (Av.SetStatus(count / numPoints * 100).Not) then\n userCancel = TRUE\n break\n else\n newRec = pointFTab.AddRecord\n if (thePrj.IsNull.Not) then\n thePoint = thePoint.ReturnUnprojected(thePrj)\n end \n pointFTab.SetValue(shapeField, newRec, thePoint)\n pointFTab.SetValue(idField, newRec, count)\n pointFTab.SetValue(xField, newRec, x)\n pointFTab.SetValue(yField, newRec, y)\n if (theField <> NIL) then\n pointFTab.SetVAlue(valueField, newRec, theValue)\n end\n if ((count mod 50) = 0) then\n pointFTab.Flush\n Av.PurgeObjects\n end\n end\n end\n end\n\n\n' Find points for a polygon theme.\n\nelse\n theFTab = theTheme.GetFTab\n while ( count < numPoints)\n x = (Number.MakeRandom(0, xInterval) * hRes) + x0\n y = (Number.MakeRandom(0, yInterval) * vRes) + y0\n thePoint = Point.Make(x, y)\n theFTab.SelectByPoint(thePoint, 0, #VTAB_SELTYPE_NEW)\n if (theFTab.GetNumSelRecords > 0) then\n count = count + 1\n if (Av.SetStatus(count / numPoints * 100).Not) then\n userCancel = TRUE\n break\n else\n newRec = pointFTab.AddRecord\n if (thePrj.IsNull.Not) then\n thePoint = thePoint.ReturnUnprojecte d(thePrj)\n end\n pointFTab.SetValue(shapeField, newRec, thePoint)\n pointFTab.SetValue(idField, newRec, count)\n pointFTab.SetValue(xField, newRec, x)\n pointFTab.SetValue(yField, newRec, y)\n if (theField <> NIL) then\n theRec = theFTab.GetSelection.GetNextSet(-1)\n theValue = theFTab.ReturnValue(theField, theRec)\n pointFTab.SetValue(valueField, newRec, theValue)\n end\n if ((count mod 50) = 0) then\n pointFTab.Flush\n Av.PurgeObjects\n end\n\n end\n end\n end\n theFTab.SetSelection(theFTab.GetLastSelection)\nend\n\n\n' Clean up and return.\n\nAv.ClearStatus\nAv.ClearMsg\npointFTab.SetEditable(FALSE)\n\nif (userCancel) then\n pointFTab.DeActivate\n File.Delete(theFN)\n theFN.SetExtension(\"shp\")\n File.Delete(theFN)\n theFN.SetExtension(\"shx\")\n File.Delete(theFN)\n pointTheme = NIL\nelse\n pointTheme = FTheme.Make(pointFTab)\nend\n\nreturn pointTheme\n" ) (Script.1441 Name: "SM.RandomSample.Changed" SourceCode: "' Name: SM.RandomSample.Changed\n'\n' Description: Changed scripts for controls in SM.RandomSample.\n'\n' Self: txlHorizontal, txlNumPoints, txlVertical\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retai ned in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nSELF.BroadcastUpdate\n" ) (Script.1442 Name: "SM.RandomSample.Click" SourceCode: "' Name: SM.RandomSample.Click\n'\n' Description: Click scripts for controls in SM.RandomSample.\n'\n' Self: lbtCancel, lbtHelp, lbtOK\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\ntheDialog = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbtCancel: Close dialog.\n\nif (SELF.GetName = \"lbtCancel\") then\n theDialog.Close\n theDialog.FindByName(\"cbxTheme\").Empty\n theDialog.FindByName(\"cbxField\").Empty\n\n\n' ---------------------------------------------------------------------\n' lbtHelp: Open help.\n\nelseif (SELF.GetName = \"lbtHelp\") then\n Av.Run(\"SM.Help\" , SELF)\n\n\n' ---------------------------------------------------------------------\n' lbtOK: Create a random sample.\n\nelseif (SELF.GetName = \"lbtOK\") then\n theDialog.Close\n theTitle = \"Save point shapefile as...\"\n theFN = FileName.GetCWD.MakeTmp(\"sample\", \"shp\")\n theFN = SourceManager.PutDataSet(FTab, theTitle, theFN, TRUE)\n if (theFN <> NIL) then\n nPoints = theDialog.FindByName(\"txlNumPoints\").GetText.AsNumber\n theTheme = theDialog.FindByName(\"cbxTheme\").GetSelection\n theField = theDialog.Find ByName(\"cbxField\").GetSelection\n if (theField.Is(Field).Not and (theField = \"\")) then\n theField = NIL\n end\n hRes = theDialog.FindByName(\"txlHorizontal\").GetText.AsNumber\n vRes = theDialog.FindByName(\"txlVertical\").GetText.AsNumber\n strat = theDialog.FindbyName(\"chkStratify\").IsSelected\n theDialog.FindByName(\"cbxTheme\").Empty\n theDialog.FindByName(\"cbxField\").Empty\n if (strat and (theTheme.Is(FTheme) or theTheme.HasTable.Not)) then\n MsgBox.Error(\"Stratified sampli ng is only supported for\" ++\n \"integer grids.\", \"\")\n return NIL\n end\n thePrj = Av.GetActiveDoc.GetProjection\n \n if (strat.Not) then\n parmList = {theFN, nPoints, theTheme, theField, hRes, vRes,\n thePrj}\n newTheme = Av.Run(\"SM.RandomPoints\", parmList)\n\n else\n theGrid = theTheme.GetGrid\n theVTab = theTheme.GetVTab\n if (theField.Is(Field).Not) then\n theField = theVTab.FindField(\"Value\")\n end\n\n newFTab = FTab.MakeNew(theFN, Point)\n shapeField = newFTab.FindField(\"Shape\")\n idField = Field.Make(\"ID\", #FIELD_DECIMAL, 8, 0)\n xField = Field.Make(\"X\", #FIELD_DECIMAL, 16, 6)\n yField = Field.Make(\"Y\", #FIELD_DECIMAL, 16, 6)\n valueField = Field.Make(\"Value\", #FIELD_DECIMAL, 16, 0)\n newFTab.AddFields({idField, xField, yField, valueField})\n\n theBM = theTheme.GetVTab.GetSelection\n theBM.SetAll\n theID = 0\n\n \n ' Make points for each class.\n \n for each aRec in theBM.Clone\n theB M.ClearAll\n theBM.Set(aRec)\n theValue = theVTab.ReturnValue(theField, aRec)\n tempGrid = theGrid.ExtractSelection\n tempTheme = GTheme.Make(tempGrid)\n tempField = tempGrid.GetVTab.FindField(\"Value\")\n tempFN = FileName.GetTmpDir.MakeTmp(\"xxxsam\", \"shp\")\n parmList = {tempFN, nPoints, tempTheme, tempField, hRes, vRes,\n thePrj}\n tempPtTheme = Av.Run(\"SM.RandomPoints\", parmList)\n tempPtFTab = tempPtTheme.GetFTab\n tempShapeField = tempPt FTab.FindField(\"Shape\")\n tempXField = tempPtFTab.FindField(\"X\")\n tempYField = tempPtFTab.FindField(\"Y\")\n \n\n ' Append temporary records to real table.\n\n for each tmpRec in tempPtFTab\n theShape = tempPtFTab.ReturnValue(tempShapeField, tmpRec)\n theID = theID + 1\n theX = tempPtFTab.ReturnValue(tempXField, tmpRec)\n theY = tempPtFTab.ReturnValue(tempYField, tmpRec)\n\n newRec = newFTab.AddRecord\n newFTab.SetValue(shapeField, newR ec, theShape)\n newFTab.SetValue(idField, newRec, theID)\n newFTab.SetValue(xField, newRec, theX)\n newFTab.SetValue(yField, newRec, theY)\n newFTab.SetValue(valueField, newRec, theValue)\n end 'for each tmpRec in tempPtFTab\n end 'for each aRec in theBM.Clone\n theBM.ClearAll\n newFTab.SetEditable(FALSE)\n newTheme = FTheme.Make(newFTab)\n \n \n ' Delete temporary files.\n \n tempPtFTab.DeActivate\n tempPtTheme = NIL\n tempPt FTab = NIL\n tempShapeField = NIL\n tempXField = NIL\n tempYField = NIL\n tmpRec = NIL\n Av.PurgeObjects\n for each aFN in FileName.GetTmpDir.ReadFiles(\"xxxsam*.shp\")\n file.Delete(aFN)\n end\n for each aFN in FileName.GetTmpDir.ReadFiles(\"xxxsam*.shx\")\n file.Delete(aFN)\n end\n for each aFN in FileName.GetTmpDir.ReadFiles(\"xxxsam*.dbf\")\n file.Delete(aFN)\n end\n \n end 'if strat\n \n Av.GetActiveDoc.AddTheme(newTheme)\n newTheme.Se tVisible(TRUE)\n end\n\n \n' ---------------------------------------------------------------------\n\nend\n " ) (Script.1443 Name: "SM.RandomSample.Open" SourceCode: "' Name: SM.RandomSample.Open\n'\n' Description: Open script for SM.RandomSample.\n'\n' Self: SM.RandomSample\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ------- --------------------------------------------------------------\n\n\n' Find controls.\n\ncbxTheme = SELF.FindByName(\"cbxTheme\")\ncbxField = SELF.FindByName(\"cbxField\")\ntxlNumPoints = SELF.FindByName(\"txlNumPoints\")\ntxtHorizontal = SELF.FindByName(\"txtHorizontal\")\ntxtVertical = SELF.FindByName(\"txtVertical\")\nlbtOK = SELF.FindByName(\"lbtOK\")\n\n\n' Make a list of polygon and grid themes.\n\ntheView = Av.GetActiveDoc\nthemeList = List.Make\nfor each aTheme in theView.GetThemes\n if (aTheme.Is(GTheme)) then\n themeList.Add (aTheme)\n elseif (aTheme.Is(FTheme)) then\n shapeType = aTheme.GetFTab.FindField(\"Shape\").GetType\n if (shapeType = #FIELD_SHAPEPOLY) then\n themeList.Add(aTheme)\n end\n end\nend\nthemeList.Insert(\"\")\n\n\n' Initialize.\n\ncbxTheme.DefineFromList(themeList)\ncbxTheme.SortAscending(FALSE)\ncbxField.Empty\ntxtHorizontal.SetLabel(\"Range:\")\ntxtVertical.SetLabel(\"Range:\")\nlbtOK.SetEnabled(FALSE)\ntxlNumPoints.Focus\n" ) (Script.1444 Name: "SM.RandomSample.Select" SourceCode: "' Name: SM.RandomSample.Select\n'\n' Description: Select script for controls in SM.RandomSample.\n'\n' Self: cbxField, cbxTheme\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and docum entation.\n' ---------------------------------------------------------------------\n\n\nSELF.BroadcastUpdate\n" ) (Script.1445 Name: "SM.RandomSample.Update" SourceCode: "' Name: SM.RandomSample.Update\n'\n' Description: Update scripts for controls in SM.RandomSample.\n'\n' Self: cbxField, lbtOK, txtHorizontal, txtVertical\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is reta ined in the code and documentation.\n' ---------------------------------------------------------------------\n\n\ntheDialog = SELF.GetDialog\ntheTheme = theDialog.FindByName(\"cbxTheme\").GetSelection\n\n\n' ---------------------------------------------------------------------\n' cbxField: If the theme is polygon, fill with fields other than\n' shape. If the theme is grid, just fill with Value field.\n\nif (SELF.GetName = \"cbxField\") then\n if (theTheme.Is(FTheme)) then\n fieldList = theTheme.GetFTab.GetFields.Clone\n fieldList.RemoveObj(theTheme.GetFTab.FindField(\"Shape\"))\n fieldList.Insert(\"\")\n SELF.DefineFromList(fieldList)\n SELF.SortAscending(FALSE)\n elseif (theTheme.Is(GTheme)) then\n fieldList = {\"\", \"Value\"}\n SELF.DefineFromList(fieldList)\n else\n SELF.Empty\n end\n\n\n' ---------------------------------------------------------------------\n' lbtOK: Enable/disable.\n\nelseif (SELF.GetName = \"lbtOK\") then\n numOK = theDialog.FindByName(\"txlNumPoints\").GetText.AsNumber > 0\n th emeOK = theTheme.Is(Theme)\n if (themeOK) then\n hRes = theDialog.FindByName(\"txlHorizontal\").GetText.AsNumber\n hTag = theDialog.FindByName(\"txtHorizontal\").GetTag\n commaIndex = hTag.IndexOf(\",\")\n if (commaIndex > 0) then\n hMin = hTag.Left(commaIndex).AsNumber\n hMax = hTag.Right(hTag.Count - commaIndex - 1).AsNumber\n horizontalOK = (hRes >= hMin) and (hRes <= hMax)\n else\n horizontalOK = FALSE\n end\n vRes = theDialog.FindByName(\"txlVertical\").GetText.AsNumber\n vTag = theDialog.FindByName(\"txtVertical\").GetTag\n commaIndex = vTag.IndexOf(\",\")\n if (commaIndex > 0) then\n vMin = vTag.Left(commaIndex).AsNumber\n vMax = vTag.Right(vTag.Count - commaIndex - 1).AsNumber\n verticalOK = (vRes >= vMin) and (vRes <= vMax)\n else\n verticalOK = FALSE\n end\n else\n horizontalOK = FALSE\n verticalOK = FALSE\n end\n \n SELF.SetEnabled(numOK and themeOK and horizontalOK and verticalOK)\n\n\n' ------------------------------------------------------------------ ---\n' txtHorizontal: Show the minimum horizontal resolution.\n\nelseif (SELF.GetName = \"txtHorizontal\") then\n if (theTheme.Is(Theme)) then\n numPoints = theDialog.FindByName(\"txlNumPoints\").GetText.AsNumber\n theWidth = theTheme.ReturnExtent.GetWidth\n theMin = theWidth / ((2 ^ 31) - 4)\n theMin.SetFormatPrecision(8)\n theLabel = \"Range:\" ++ theMin.AsString ++ \"-\"\n if (numPoints > 0) then\n theMax = theWidth / numPoints\n theMax.SetFormatPrecision(8)\n SELF.SetLabel(theLabel ++ theM ax.AsString ++ \"map units\")\n SELF.SetTag(theMin.AsString + \",\" + theMax.AsString)\n else\n SELF.SetLabel(theLabel ++ \"map units\")\n SELF.SetTag(\"\")\n end\n else\n SELF.SetLabel(\"Range:\")\n SELF.SetTag(\"\")\n end\n \n\n' ---------------------------------------------------------------------\n' txtVertical: Show the minimum vertical resolution.\n\nelseif (SELF.GetName = \"txtVertical\") then\n if (theTheme.Is(Theme)) then\n numPoints = theDialog.FindByName(\"txlNumPoints\").GetText.AsNumber\n theHeight = theTheme.ReturnExtent.GetHeight\n theMin = theHeight / ((2 ^ 31) - 4)\n theMin.SetFormatPrecision(8)\n theLabel = \"Range:\" ++ theMin.AsString ++ \"-\"\n if (numPoints > 0) then\n theMax = theHeight / numPoints\n theMax.SetFormatPrecision(8)\n SELF.SetLabel(theLabel ++ theMax.AsString ++ \"map units\")\n SELF.SetTag(theMin.AsString + \",\" + theMax.AsString)\n else\n SELF.SetLabel(theLabel ++ \"map units\")\n SELF.SetTag(\"\")\n end\n else\n SELF.SetLabel(\"Range:\")\n SELF.SetTag(\"\")\n end\n\n\n' ---------------------------------------------------------------------\n\nend" ) (Script.1446 Name: "SM.ReadModel" SourceCode: "' Name: SM.ReadModel\n'\n' Description: Reads a model file and calls the correct script to\n' actually create the model.\n'\n' Parameters:\n' (0) View\n' (1) Model FileName\n' (2) autoSubmit (Boolean - TRUE if model was automatically submitted\n' to the statistical software)\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associat ed documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\n' Get the view and model file to be read in.\n\ntheView = SELF.Get(0)\nmodelFN = SELF.Get(1)\nautoSubmit = SELF.Get(2)\nMsgBox.Info(\"Wait a second or two and then click OK.\", \"\")\n\n \n' Open the model file and read in parameter information. ParmDict \n' w ill have the left side of the \"=\" in the parameter part of the \n' model file as keys, and the right side of the \"=\" as entries.\n\nparmDict = Dictionary.Make(10)\ninFile = LineFile.Make(modelFN, #FILE_PERM_READ)\nif (inFile = NIL) then\n MsgBox.Error(\"Error opening\" ++ modelFN.AsString)\n return NIL\nend\n\nflag = FALSE\ntheID = NIL\ntheLine = inFile.ReadElt\nwhile (theLine <> NIL)\n if (theLine.Contains(\"*** ARCVIEW PARAMETERS ***\")) then\n flag = TRUE\n end \n if (flag and theLine.Contains(\"=\")) then\n theIndex = theLine.IndexOf(\"=\")\n theID = theLine.Left(theIndex).Trim\n theInfo = theLine.Right(theLine.Count - theIndex - 1).Trim\n parmDict.Add(theID, theInfo)\n end\n if (flag and theLine.Contains(\"=\").Not) then\n if (theID = \"Class headings\") then\n theInfo = theInfo ++ theLine.Trim\n parmDict.Set(theID, theInfo)\n end\n end\n theLine = inFile.ReadElt\nend 'while (theLine <> NIL)\ninFile.Close\n\n\n' Set the work directory to the temporary directory (for temp grids).\n\ntheProject = Av.GetProject\nold WorkDir = theProject.GetWorkDir\ntheProject.SetWorkDir(FileName.GetTmpDir)\n\n\n' Create the new theme.\n\nparmList = {theView, parmDict, modelFN, autoSubmit}\nif (parmDict.Get(\"method\") = \"Logistic\") then\n modelOut = Av.Run(\"SM.LogisticModel\", parmList)\nelseif (parmDict.Get(\"method\") = \"Tree\") then\n modelOut = Av.Run(\"SM.CartModel\", parmList)\nelse\n MsgBox.Error(\"The type of model is not specified.\", \"\")\n return NIL\nend\n\n\n' If model returned a theme, make it the active theme and open an info\n' window.\n\nif (mod elOut.Is(Theme)) then \n activeThemes = theView.GetActiveThemes\n for each aTheme in activeThemes\n aTheme.SetActive(FALSE)\n end\n modelOut.SetVisible(TRUE)\n modelOut.SetActive(TRUE)\n theTitle = \"Model Information for\" ++ modelOut.GetName\n infoFN = modelOut.GetSrcName.AsString.AsFileName\n if (modelOut.Is(FTheme)) then\n infoFN.SetExtension(\"sms\")\n else\n infoFN.SetExtension(\"smg\")\n end\n if (File.Exists(infoFN)) then\n infoWin = TextWin.Make(infoFN, theTitle)\n infoWin.SetFixedFont(TRUE)\n infoWin.Open\n end\nend\n\n\n' Reset the work directory.\n\ntheProject.SetWorkDir(oldWorkDir)\n" ) (Script.1447 Name: "SM.Sample.Apply" SourceCode: "' Name: SM.Sample.Apply\n'\n' Description: Apply scripts for controls in SM.Sample.\n'\n' Self: lbxFields, lbxSample\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nsampleDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbxFields: Run the click script for the Add button.\n\nif (SELF.GetName = \"lbxFields\") then\n sampleDlg.FindByName(\"lbtAdd\").Click\n\n\n' ---------------------------------------------------------------------\n' lbxSample: Run the click script for the Remove button.\n\nelseif (SELF.GetName = \"lbxSample\") then\n sampleDlg.FindByName(\"lbtRemov e\").Click\n\n\n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1448 Name: "SM.Sample.Click" SourceCode: "' Name: SM.Sample.Click\n'\n' Description: Click scripts for controls in SM.Sample.\n'\n' Self: lbtAdd, lbtCancel, lbtHelp, lbtOK, lbtRemove\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the c ode and documentation.\n' ---------------------------------------------------------------------\n\n\nsampleDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbtAdd: Add the selected fields to the sample listbox. The fields\n' listbox will be updated in response to the BroadcastUpdate at the\n' end of this script.\n\nif (SELF.GetName = \"lbtAdd\") then\n selList = sampleDlg.FindByName(\"lbxFields\").GetSelection\n if (selList.Count > 0) then\n \n \n ' For each selected field, add it and the theme to the sample list.\n \n theTheme = sampleDlg.FindByName(\"lbxThemes\").GetSelection.Get(0)\n lbxSample = sampleDlg.FindByName(\"lbxSample\")\n sampleList = lbxSample.GetList\n for each aField in selList\n sampleList.Add({theTheme, aField})\n end\n \n \n ' Fill the sample listbox.\n \n sampleList = Av.Run(\"SM.Library\", {\"Sort2\", sampleList})\n lbxSample.DefineFromList(sampleList)\n \n end\n \n\n' ---------------------------------------------------------- -----------\n' lbtCancel: Close the dialog and empty controls.\n\nelseif (SELF.GetName = \"lbtCancel\") then\n sampleDlg.Close\n sampleDlg.FindByName(\"lbxThemes\").Empty\n sampleDlg.FindByName(\"lbxFields\").Empty\n sampleDlg.FindByName(\"lbxSample\").Empty\n sampleDlg.FindByName(\"cbxTheme\").Empty\n sampleDlg.FindByName(\"lbxPtFields\").Empty\n\n\n' ---------------------------------------------------------------------\n'lbtHelp: Open help.\n\nelseif (SELF.GetName = \"lbtHelp\") then\n Av.Run(\"SM.Help\", SELF)\n\n\n' ------------ ---------------------------------------------------------\n' lbtOK: Close the dialog and sample the data sets.\n\nelseif (SELF.GetName = \"lbtOK\") then\n sampleDlg.Close\n lbxSample = sampleDlg.FindByName(\"lbxSample\")\n cbxTheme = sampleDlg.FindByName(\"cbxTheme\")\n lbxPtFields = sampleDlg.FindByName(\"lbxPtFields\")\n \n if (sampleDlg.FindByName(\"radCSV\").IsSelected) then\n theFN = FileName.GetCWD.MakeTmp(\"sample\", \"txt\")\n exportClass = DText\n exportPattern = \"*.txt\"\n else\n theFN = FileName.GetCWD.Ma keTmp(\"sample\", \"dbf\")\n exportClass = dBASE\n exportPattern = \"*.dbf\"\n end\n theFN = FileDialog.Put(theFN, exportPattern, \"Export as...\")\n\n if (theFN <> NIL) then\n sampleList = lbxSample.GetList\n pointTheme = cbxTheme.GetSelection\n pointFieldList = lbxPtFields.GetSelection\n selRecs = sampleDlg.FindByName(\"chkSelected\").IsSelected\n thePrj = sampleDlg.GetObjectTag.GetProjection\n parmList = {sampleList, pointTheme, pointFieldList, selRecs,\n thePrj, NIL}\n theVTab = Av. Run(\"SM.CreateSample\", parmList)\n if (theVTab <> NIL) then\n newVTab = theVTab.Export(theFN, exportClass, FALSE)\n tempFN = theVTab.GetBaseTableFileName\n theVTab = NIL\n Av.PurgeObjects\n File.Delete(tempFN)\n if (sampleDlg.FindByName(\"chkTable\").IsSelected) then\n theTable = Table.Make(newVTab)\n theTable.SetName(theFN.GetBaseName)\n Av.GetProject.SetModified(TRUE)\n end\n else\n theVTab = NIL\n Av.PurgeObjects\n File.Delete(tempFN)\n end 'i f (theVTab <> NIL)\n end 'if (theFN <> NIL)\n \n \n ' Empty controls.\n \n sampleDlg.FindByName(\"lbxThemes\").Empty\n sampleDlg.FindByName(\"lbxFields\").Empty\n lbxSample.Empty\n cbxTheme.Empty\n lbxPtFields.Empty\n\n\n' ---------------------------------------------------------------------\n' lbtRemove: Remove selected sample fields from the listbox. The\n' fields listbox will be updated in response to the BroadcastUpdate at\n' the end of this script.\n\nelseif (SELF.GetName = \"lbtRemove\") then\n lbxSample = sample Dlg.FindByName(\"lbxSample\")\n if (lbxSample.HasSelection) then\n lbxSample.GoFirstSelected\n rowList = {lbxSample.GetCurrentRow}\n while (lbxSample.GoNextSelected)\n rowList.Add(lbxSample.GetCurrentRow)\n end\n rowList.RemoveDuplicates\n rowList.Sort(FALSE)\n for each aRow in rowList\n lbxSample.GoRow(aRow)\n lbxSample.DeleteRows(1)\n end\n end\n\n\n' ---------------------------------------------------------------------\n\nend\nSELF.BroadcastUpdate\n" ) (Script.1449 Name: "SM.Sample.Open" SourceCode: "' Name: SM.Sample.Open\n'\n' Description: Open script for SM.Sample.\n'\n' Self: SM.Sample\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ------------------------- --------------------------------------------\n\n\n' Find controls.\n\nlbxThemes = SELF.FindByName(\"lbxThemes\")\nlbxFields = SELF.FindByName(\"lbxFields\")\nlbxSample = SELF.FindByName(\"lbxSample\")\ncbxTheme = SELF.FindByName(\"cbxTheme\")\nlbxPtFields = SELF.FindByName(\"lbxPtFields\")\nchkSelected = SELF.FindByName(\"chkSelected\")\nchkTable = SELF.FindByName(\"chkTable\")\nradCSV = SELF.FindByName(\"radCSV\")\nlbtOK = SELF.FindByName(\"lbtOK\")\n\n\n' Set the view as an object tag.\n\ntheView = Av.GetActiveDoc\nSELF.SetObjectTag(theView) \n\n\n' Make lists of polygon, grid, and point themes in the view.\n\npolyList = List.Make\npointList = List.Make\ngridList = List.Make\nfor each aTheme in theView.GetThemes\n if (aTheme.Is(FTheme)) then\n aThemeShape = aTheme.GetFTab.FindField(\"Shape\").GetType\n if (aThemeShape = #FIELD_SHAPEPOLY) then\n polyList.Add(aTheme)\n elseif (aThemeShape = #FIELD_SHAPEPOINT) then\n pointList.Add(aTheme)\n end\n elseif (aTheme.Is(GTheme)) then\n gridList.Add(aTheme)\n end 'if-else\nend 'for each aTheme\npoi ntList.Insert(\"\")\n\n\n' Build VATs for any integer grids that don't already have one.\n\nfor each aTheme in gridList\n aGrid = aTheme.GetGrid\n if (aGrid.IsInteger and aTheme.HasTable.Not) then\n aGrid.BuildVAT\n end\nend\n\n\n' Initialize.\n\nlbxThemes.DefineFromList(polyList + gridList)\nlbxThemes.SortAscending(FALSE)\ncbxTheme.DefineFromList(pointList)\ncbxTheme.SortAscending(FALSE)\nlbtOK.SetEnabled(FALSE)\nradCSV.Select\nlbxThemes.Focus\n" ) (Script.1450 Name: "SM.Sample.Select" SourceCode: "' Name: SM.Sample.Select\n'\n' Description: Select scripts for controls in SM.Sample.\n'\n' Self: cbxTheme, lbxPtFields, lbxThemes\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and do cumentation.\n' ---------------------------------------------------------------------\n\n\nSELF.BroadcastUpdate\n" ) (Script.1451 Name: "SM.Sample.Update" SourceCode: "' Name: SM.Sample.Update\n'\n' Description: Update scripts for controls in SM.Sample.\n'\n' Self: lbtOK, lbxFields, lbxPtFields\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and docum entation.\n' ---------------------------------------------------------------------\n\n\nsampleDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbtOK: Enable/disable based on whether there is enough info to \n' sample.\n\nif (SELF.GetName = \"lbtOK\") then\n sampleOK = sampleDlg.FindByName(\"lbxSample\").GetList.Count > 0\n pointOK = sampleDlg.FindByName(\"cbxTheme\").GetSelection.Is(Theme)\n SELF.SetEnabled(sampleOK and pointOK)\n \n\n' ------------------------------------- --------------------------------\n' lbxFields: Fill with fields in the selected theme. Remove any\n' fields that are in the sample list.\n\nelseif (SELF.GetName = \"lbxFields\") then\n lbxThemes = sampleDlg.FindByName(\"lbxThemes\")\n if (lbxThemes.HasSelection) then\n theTheme = lbxThemes.GetSelection.Get(0)\n if (theTheme.Is(FTheme)) then\n parmList = {\"VisibleFields\", theTheme.GetFTab}\n fieldList = Av.Run(\"SM.Library\", parmList)\n elseif (theTheme.HasTable) then\n parmList = {\"VisibleFields\" , theTheme.GetVTab}\n fieldList = Av.Run(\"SM.Library\", parmList)\n else\n fieldList = {\"Value\"}\n end\n \n \n ' Remove fields that are in the sample list.\n \n for each aRow in sampleDlg.FindByName(\"lbxSample\").GetList\n if (aRow.Get(0) = theTheme) then\n fieldList.RemoveObj(aRow.Get(1))\n end\n end\n \n \n ' Fill the listbox.\n \n SELF.DefineFromList(fieldList)\n SELF.SortAscending(FALSE)\n \n else 'if no selection\n SELF.Empty\n end 'if-else\n\n\n' -------- -------------------------------------------------------------\n' lbxPtFields: Fill with fields from the selected theme.\n\nelseif (SELF.GetName = \"lbxPtFields\") then\n theTheme = sampleDlg.FindByName(\"cbxTheme\").GetSelection\n if ((theTheme <> NIL) and theTheme.Is(FTheme)) then\n parmList = {\"VisibleFields\", theTheme.GetFTab}\n fieldList = Av.Run(\"SM.Library\", parmList)\n SELF.DefineFromList(fieldList)\n else\n SELF.Empty\n end\n\n\n' ---------------------------------------------------------------------\n \nend\n" ) (Script.1452 Name: "SM.Specify.Click" SourceCode: "' Name: SM.Specify.Click\n'\n' Description: Click scripts for controls in SM.Specify.\n'\n' Self: lbtCancel, lbtOK\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' - --------------------------------------------------------------------\n\n\nspecifyDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbtCancel: Close dialog.\n\nif (SELF.GetName = \"lbtCancel\") then\n specifyDlg.Close\n\n\n' ---------------------------------------------------------------------\n' lbtOK: Open the appropriate specification dialog.\n\nelseif (SELF.GetName = \"lbtOK\") then\n specifyDlg.Close\n if (specifyDlg.FindByName(\"radLogistic\").IsSelected) then\n parmDl g = Av.FindDialog(\"SM.LogParms\")\n parmDlg.SetObjectTag(specifyDlg.GetObjectTag)\n parmDlg.Open\n else\n Av.Run(\"SM.ImportTree\", Av.GetActiveDoc)\n end\n\n\n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1453 Name: "SM.Specify.Open" SourceCode: "' Name: SM.Specify.Open\n'\n' Description: Open script for SM.Specify.\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' -------------------------------------------- -------------------------\n\n\nSELF.FindByName(\"radTree\").Select\n" ) (Script.1454 Name: "SM.Status.Close" SourceCode: "' Name: SM.Status.Close\n'\n' Description: Close script for SM.Status\n'\n' Self: SM.Status\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ------------------------ ---------------------------------------------\n\n\nSELF.FindByName(\"txtMsg\").SetLabel(\"\")\nSELF.FindByName(\"txtPercent\").SetLabel(\"\")\n" ) (Script.1455 Name: "SM.Status.SetMessage" SourceCode: "' Name: SM.Status.SetMessage\n'\n' Description: Sets the message for the status dialog.\n'\n' Parameters:\n' (0) String message\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documen tation.\n' ---------------------------------------------------------------------\n\n\nAv.FindDialog(\"SM.Status\").FindByName(\"txtMsg\").SetLabel(SELF)\n" ) (Script.1456 Name: "SM.Status.SetPercent" SourceCode: "' Name: SM.Status.SetPercent\n'\n' Description: Sets the percent done for the status dialog.\n'\n' Parameters:\n' (0) Percent (Number) or NIL (to clear the textbox)\n'\n' Returns: FALSE if user has pushed Stop button, TRUE otherwise \n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\nScript.The.SetNumberFormat(\"d\")\nif (SELF <> NIL) then\n theMsg = SELF.AsString + \"% Done\"\nelse\n theMsg = \"\"\nend\nAv.FindDialog(\"SM.Status\").FindByName(\"txtPercent\").SetLabel(theMsg)\nAv.ShowStopButton\nif (SELF <> NIL) then\n if (Av.SetStatus(SELF)) then\n return TRUE\n else\n return FALSE\n end\nelse\n return TRUE\nend\n" ) (Script.1457 Name: "SM.VectorGrid.Click" SourceCode: "' Name: SM.VectorGrid.Click\n'\n' Description: Click (and changed) scripts for controls in \n' SM.VectorGrid.\n'\n' Self: lbtArea, lbtCancel, lbtHelp, lbtNext, radFourth, radSame, \n' radTarget, radOther, radMax, radMean, radMedian, radMin, radSum,\n' radNN, radBilinear, radCubic, txlOther\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and compon ents, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nconvertDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbtArea: Find the area of the smallest polygon and label radio\n' buttons.\n\nif (SELF.GetName = \"lbtArea\") then\n lbtNext = convertDlg.FindByName(\"lbtNext\")\n txtArea = convertDlg.FindByName(\"txtArea\")\n radFourth = convertDlg.FindByName(\"radFourth\")\n radSame = convertDlg.FindByName(\"radSame\")\n parmList = convertDlg.GetObjectTag\n \n themeIndex = lbtNext.GetObjectTag.Get(0)\n fieldIndex = lbtNext.GetObjectTag.Get(1)\n themeList = parmList.Get(1)\n themeDict = parmList.Get(2)\n \n Script.The.SetNumberFormat(\"d.dddddddddd\")\n\n theTheme = themeList.Get(themeIndex)\n theVTab = theTheme.GetFTab\n theField = themeDict.Get(theTheme).Get(fieldIndex)\n shapeField = theVTab.Fin dField(\"Shape\")\n minArea = theVTab.ReturnValue(shapeField, 1).ReturnArea\n for each aRec in theVTab\n theArea = theVTab.ReturnValue(shapeField, aRec).ReturnArea\n if (theArea < minArea) then\n minArea = theArea\n end\n end\n txtArea.SetLabel(txtArea.GetLabel ++ minArea.AsString)\n txtArea.SetObjectTag(minArea)\n fourthStr = \"(\" + (minArea.Sqrt / 2).AsString + \")\"\n radFourth.SetLabel(radFourth.GetLabel ++ fourthStr)\n sameStr = \"(\" + minArea.Sqrt.AsString + \")\"\n radSame.SetLabel(radSame.GetLabel ++ sameStr)\n\n\n' ---------------------------------------------------------------------\n' lbtCancel: Close dialog and set object tag to NIL.\n\nelseif (SELF.GetName = \"lbtCancel\") then\n convertDlg.SetObjectTag(NIL)\n convertDlg.Close\n\n\n' ---------------------------------------------------------------------\n' lbtHelp: Open help.\n\nelseif (SELF.GetName = \"lbtHelp\") then\n Av.Run(\"SM.Help\", SELF)\n\n\n' ---------------------------------------------------------------------\n' lbtNext: Put the current resample info i nto the resample dictionary\n' and then move to the next field (or close the dialog).\n\nelseif (SELF.GetName = \"lbtNext\") then\n parmList = convertDlg.GetObjectTag\n cellSize = parmList.Get(0)\n themeList = parmList.Get(1)\n themeDict = parmList.Get(2)\n fieldDict = parmList.Get(3)\n classList = parmList.Get(4)\n resampleDict = parmList.Get(5)\n themeIndex = SELF.GetObjectTag.Get(0)\n fieldIndex = SELF.GetObjectTag.Get(1)\n fieldList = themeDict.Get(themeList.Get(themeIndex))\n \n radFourth = convertDlg.FindB yName(\"radFourth\")\n radSame = convertDlg.FindByName(\"radSame\")\n radTarget = convertDlg.FindByName(\"radTarget\")\n txlOther = convertDlg.FindByName(\"txlOther\")\n radMean = convertDlg.FindByName(\"radMean\")\n radSum = convertDlg.FindByName(\"radSum\")\n radBilinear = convertDlg.FindByName(\"radBilinear\")\n radCubic = convertDlg.FindByName(\"radCubic\")\n cpaResample = convertDlg.FindByName(\"cpaResample\")\n \n \n ' Find the minimum area if needed.\n \n if (radFourth.IsSelected or radSame.IsSelected) then\n minAre a = convertDlg.FindByName(\"txtArea\").GetObjectTag\n if (minArea = NIL) then\n theTheme = themeList.Get(themeIndex)\n theVTab = theTheme.GetFTab\n theField = themeDict.Get(theTheme).Get(fieldIndex)\n shapeField = theVTab.FindField(\"Shape\")\n minArea = theVTab.ReturnValue(shapeField, 1).ReturnArea\n for each aRec in theVTab\n theArea = theVTab.ReturnValue(shapeField, aRec).ReturnArea\n if (theArea < minArea) then\n minArea = theArea\n end\n end\n con vertDlg.FindByName(\"txtArea\").SetObjectTag(minArea)\n end\n end\n resampleList = List.Make\n \n \n ' Set cell size.\n \n if (radFourth.IsSelected) then\n newCellSize = minArea.Sqrt / 2\n elseif (radSame.IsSelected) then\n newCellSize = minArea.Sqrt\n elseif (radTarget.IsSelected) then\n newCellSize = cellSize\n elseif (txlOther.GetText.AsNumber > 0) then\n newCellSize = txlOther.GetText.AsNumber\n if (newCellSize > cellSize) then\n theMsg = \"Intermediate cell size cannot be greater than the\" ++\n \"target cell size.\"\n MsgBox.Error(theMsg, \"\")\n txlOther.Focus\n return NIL\n end\n else\n MsgBox.Error(\"Intermediate cell size must be greater than 0.\", \"\")\n txlOther.Focus\n return NIL\n end\n \n \n ' Set resample method.\n \n if (convertDlg.FindByName(\"radMax\").IsSelected) then\n resampleList.Add(\"aggregate\")\n resampleList.Add(#GRID_STATYPE_MAX)\n elseif (convertDlg.FindByName(\"radMean\").IsSelected) then\n resampleList.Add(\"aggregate\")\n resampleList.Add(#GRID_S TATYPE_MEAN)\n elseif (convertDlg.FindByName(\"radMedian\").IsSelected) then\n resampleList.Add(\"aggregate\")\n resampleList.Add(#GRID_STATYPE_MEDIAN)\n elseif (convertDlg.FindByName(\"radMin\").IsSelected) then\n resampleList.Add(\"aggregate\")\n resampleList.Add(#GRID_STATYPE_MIN)\n elseif (convertDlg.FindByName(\"radSum\").IsSelected) then\n resampleList.Add(\"aggregate\")\n resampleList.Add(#GRID_STATYPE_SUM)\n elseif (convertDlg.FindByName(\"radNN\").IsSelected) then\n resampleList.Add(\"resample\")\n resampleList.Add(#GRID_RESTYPE_NEAREST)\n elseif (convertDlg.FindByName(\"radBilinear\").IsSelected) then\n resampleList.Add(\"resample\")\n resampleList.Add(#GRID_RESTYPE_BILINEAR)\n elseif (convertDlg.FindByName(\"radCubic\").IsSelected) then\n resampleList.Add(\"resample\")\n resampleList.Add(#GRID_RESTYPE_CUBIC)\n end\n \n if (resampleList.Get(0) = \"aggregate\") then\n resampleList.Add(convertDlg.FindByName(\"chkData\").IsSelected)\n else\n resampleList.Add(NIL)\n end\n resampleList.Add(newCellSize)\n\n \n ' Add to dictionary.\n \n resampleDict.Set(fieldList.Get(fieldIndex), resampleList) \n\n\n ' Move to next field.\n \n if ((fieldIndex + 1) = fieldList.Count) then\n fieldIndex = 0\n themeIndex = themeIndex + 1\n \n txtArea = convertDlg.FindByName(\"txtArea\")\n radFourth = convertDlg.FindByName(\"radFourth\")\n radSame = convertDlg.FindByName(\"radSame\")\n txtArea.SetLabel(\"Smallest Polygon:\")\n radFourth.SetLabel(\"1/4 of the smallest polygon\")\n radSame.SetLabel(\"Same as the smallest polygon \")\n txtArea.SetObjectTag(NIL)\n else\n fieldIndex = fieldIndex + 1\n end\n \n if ((themeIndex) < themeList.Count) then\n txtTheme = convertDlg.FindByName(\"txtTheme\")\n txtField = convertDlg.FindByName(\"txtField\")\n SELF.SetObjectTag({themeIndex, fieldIndex})\n theTheme = themeList.Get(themeIndex)\n theField = themeDict.Get(theTheme).Get(fieldIndex)\n txtTheme.SetLabel(\"Theme:\" ++ theTheme.GetName)\n txtField.SetLabel(\"Field:\" ++ theField.GetAlias)\n radList = {radMean, radSum, radBiline ar, radCubic}\n if (classList.Find(theField) <> -1) then\n for each aRad in radList\n aRad.SetEnabled(FALSE)\n aRad.SetTag(\"no\")\n end\n else\n for each aRad in radList\n aRad.SetEnabled(TRUE)\n aRad.SetTag(\"show\")\n end\n end\n if (radList.Find(cpaResample.GetSelected) <> -1) then\n convertDlg.FindByName(\"radNN\").Select\n end\n convertDlg.FindByName(\"cpaSize\").GetSelected.BroadcastUpdate\n cpaResample.GetSelected.BroadcastUpdate\n else\n convertDl g.Close\n end\n\n\n' ---------------------------------------------------------------------\n\nend\nSELF.BroadcastUpdate\n" ) (Script.1458 Name: "SM.VectorGrid.Open" SourceCode: "' Name: SM.VectorGrid.Open\n'\n' Description: Open script for SM.VectorGrid. Fills the dialog\n' with the information for the first theme/field. This is a modal\n' dialog, but it does not return anything. Instead, the dialog's\n' Object Tag is set as NIL if the dialog should not return anything.\n' If everything works, then the return value can be considered the\n' last item in the Object Tag (item 5 in the parameter list).\n'\n' Parameters: (passed as an object tag)\n' (0) target cell size (Number)\n' (1) List of themes used in the model\n' (2) Dictionary: key=Theme, info=List of fields used in the model\n' (3) Dictionary: key=Field, info=List of variable names for the field\n' (4) List of fields that are used as classes\n' (5) Dictionary: key=Field, info={convertType, enum, noData, cellSize}\n' where convertType is \"aggregate\" or \"resample\", enum is the enum for\n' the Aggregate or Resample request, noData is TRUE if Aggregate\n' should result in NoData if any of the input cells are NoData, and\n' cellSize is the interm ediate cell size\n'\n' Self: SM.VectorGrid\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\n' Get passed parameters and find controls.\n\nparmList = SELF.GetObjectTag\ncellSize = parmList.Get(0)\nthemeList = parmList.Get(1)\nthemeDict = parmList.Get(2)\nfieldDict = parmList.Get(3)\nclassList = parmList.Get(4)\nresampleDict = parmList.Get(5)\n\ntxtTheme = SELF.FindByName(\"txtTheme\")\ntxtField = SELF.FindByName(\"txtField\")\ntxtArea = SELF.FindByName(\"txtArea\")\nradFourth = SELF.FindByName(\"radFourth\")\nradSame = SELF.FindByName(\"radSame\")\nradTarget = SELF.FindByName(\"radTarget\")\nradMean = SELF.FindByName(\"radMean\" )\nradSum = SELF.FindByName(\"radSum\")\nradNN = SELF.FindByName(\"radNN\")\nradBilinear = SELF.FindByName(\"radBilinear\")\nradCubic = SELF.FindByName(\"radCubic\")\n\n\n' Set index object tag and set control labels.\n\nSELF.FindByName(\"lbtNext\").SetObjectTag({0, 0})\n\nfirstTheme = themeList.Get(0)\nfirstVTab = firstTheme.GetFTab\nfirstField = themeDict.Get(firstTheme).Get(0)\ntxtTheme.SetLabel(\"Theme:\" ++ firstTheme.GetName)\ntxtField.SetLabel(\"Field:\" ++ firstField.GetAlias)\ntxtArea.SetLabel(\"Smallest Polygon:\")\ntxtArea.SetOb jectTag(NIL)\nradFourth.SetLabel(\"1/4 of the smallest polygon\")\nradSame.SetLabel(\"Same as the smallest polygon\")\nradTarget.SetLabel(\"Target cell size (\" + cellSize.AsString + \")\")\n\n\n' If a class variable, then disable inappropriate radio buttons.\n\nradList = {radMean, radSum, radBilinear, radCubic}\nif (classList.Find(firstField) <> -1) then\n for each aRad in radList\n aRad.SetEnabled(FALSE)\n aRad.SetTag(\"no\")\n end\nelse\n for each aRad in radList\n aRad.SetEnabled(TRUE)\n aRad.SetTag(\"show\")\n end\ne nd\n \n\n' Select default radio buttons.\n\nradTarget.Select\nradTarget.Click\nradNN.Select\nradNN.Click\n" ) (Script.1459 Name: "SM.VectorGrid.Update" SourceCode: "' Name: SM.VectorGrid.Update\n'\n' Description: Update scripts for controls in SM.VectorGrid.\n'\n' Self: radMax, radMean, radMedian, radMin, radSum, chkData, txlOther\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nconvertDlg = SELF.GetDialog\ncellSize = convertDlg.GetObjectTag.Get(0)\naggList = {\"radMax\", \"radMean\", \"radMedian\", \"radMin\", \"radSum\"}\nresampleList = {\"radNN\", \"radBilinear\", \"radCubic\"}\n\n\n' ---------------------------------------------------------------------\n' Aggregate buttons: Enable/disable based on the cell size chosen. It\n' makes no sense to use Aggregate if the chosen cell si ze is greater\n' than or equal to the target cell size.\n\nif (aggList.FindByValue(SELF.GetName) <> -1) then\n if (SELF.GetTag = \"show\") then\n otherSize = convertDlg.FindByName(\"txlOther\").GetText.Trim.AsNumber\n if (convertDlg.FindByName(\"radTarget\").IsSelected or\n (convertDlg.FindByName(\"radOther\").IsSelected and \n ((otherSize >= cellSize) or otherSize.IsNull))) then\n SELF.SetEnabled(FALSE)\n if (convertDlg.FindByName(\"cpaResample\").GetSelected = SELF) then\n convertDlg.Find ByName(\"radNN\").Select\n end\n else\n SELF.SetEnabled(TRUE)\n end\n end\n\n\n' ---------------------------------------------------------------------\n' Resample buttons: Enable/disable based on cell size chosen. It\n' makes no sense to use Resample if the chosen cell size is the same\n' as the target cell size.\n\nelseif (resampleList.FindByValue(SELF.GetName) <> -1) then\n if (SELF.GetTag = \"show\") then\n if (convertDlg.FindByName(\"radTarget\").IsSelected) then\n if (SELF.GetName = \"radNN\") then \n SELF.Select\n else\n SELF.SetEnabled(FALSE)\n end\n else\n SELF.SetEnabled(TRUE)\n end\n end\n \n \n' ---------------------------------------------------------------------\n' chkData: Enable/disable based on the resample method. This option\n' isn't needed for Resample.\n\nelseif (SELF.GetName = \"chkData\") then\n if (convertDlg.FindByName(\"radNN\").IsSelected or \n convertDlg.FindByName(\"radBilinear\").IsSelected or \n convertDlg.FindByName(\"radCubic\").IsSelected) then\n SELF.SetEnabled(FALSE)\n else\n SELF.SetEnabled(TRUE)\n end\n\n\n' ---------------------------------------------------------------------\n' txlOther: Enable/disable based on if Other is selected.\n\nelseif (SELF.GetName = \"txlOther\") then\n SELF.SetEnabled(convertDlg.FindByName(\"radOther\").IsSelected)\n SELF.Focus\n\n\n' ---------------------------------------------------------------------\n\nend\n " ) (Script.1460 Name: "SM.WriteODB" SourceCode: "' Name: SM.WriteODB\n'\n' Description: Creates on ODB file containing information needed to\n' read the model back in.\n'\n' Parameters:\n' (0) String denoting the model (\"Logistic\" or \"Tree\")\n' (1) FileName for ODB\n' (2) List of themes\n' (3) Dictionary: info=Field, key=List of variable names\n' (4) Dictionary: info=variable name, key={Theme, Field}\n' If logistic model:\n' (5) Dictionary: info=variable name, key=Dictionary\n' sub-dictionary: info=class level (String), key=dummy value (String)\n' (6) Dictionary: inf o=interaction variable name, key=List of two\n' variable names that make up the interaction\n'\n' Returns: TRUE if able to write the ODB file and FALSE if not\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\n' Get parameters.\n\ntheModel = SELF.Get(0)\nodbFN = SELF.Get(1)\nthemeList = SELF.Get(2)\nfieldDict = SELF.Get(3)\nvarDict = SELF.Get(4)\nif (theModel = \"Logistic\") then\n dummyDict = SELF.Get(5)\n intDict = SELF.Get(6)\nend\n\n\n' Create dictionaries that aren't tied to a view.\n\nthemeDict = Dictionary.Make(1 max (themeList.Count / 2).Floor)\nnewVarDict = Dictionary.Make(varDict.GetSize)\nnewFieldDict = Dic tionary.Make(fieldDict.GetSize)\n\nfor each aTheme in themeList\n themeDict.Add(aTheme, aTheme.Clone)\nend\n\nfor each aVarName in varDict.ReturnKeys\n oldTheme = varDict.Get(aVarName).Get(0)\n oldField = varDict.Get(aVarName).Get(1)\n newTheme = themeDict.Get(oldtheme)\n if (newTheme.Is(FTheme)) then\n newField = newTheme.GetFTab.FindField(oldField.GetName)\n elseif (oldField.Is(Field)) then\n newField = newTheme.GetVTab.FindField(oldField.GetName)\n else\n newField = newTheme\n end\n if (varDict.Get(aVar Name).Count = 3) then\n theStat = varDict.Get(aVarName).Get(2)\n newVarDict.Set(aVarName, {newTheme, newField, theStat})\n else\n newVarDict.Set(aVarName, {newTheme, newField})\n end\n if (newFieldDict.Get(newField) = NIL) then\n newFieldDict.Set(newField, fieldDict.Get(oldField))\n end\nend\n\n\n' Write the ODB.\n\ntheODB = ODB.Make(odbFN)\nif (theODB = NIL) then\n MsgBox.Error(\"Unable to create the file\" ++ odbFN.AsString, \"\")\n return FALSE\nend\ntheODB.Add(newFieldDict)\ntheODB.Add(newVarDict)\nif (theMode l = \"Logistic\") then\n theODB.Add(dummyDict)\n theODB.Add(intDict)\nend\nif (theODB.Commit) then\n return TRUE\nelse\n return FALSE\nend\n\n" ) (Script.1461 Name: "SM.ZonalSample" SourceCode: "' Name: SM.ZonalSample\n'\n' Description: Samples polygon and grid themes according to a polygon\n' theme. Puts the data in a new VTab that can be exported by the user.\n'\n' Parameters:\n' (0) Dictionary where key=Theme, item={{stat, alias}...}\n' (1) Theme containing sample polygons\n' (2) ID field for the polygons\n' (3) List of fields in the polygon theme to be sampled\n' (4) List of aliases for the fields (can be NIL, if want to use the\n' same name -- aliases must be in the same order as the fields)\n' (5) Sel Recs (Boolean - TRUE if using selected records only in point\n' theme)\n' (6) Projection of the view - can be NIL if there are no grids to be\n' sampled\n' (7) FileName to save the the new VTab to (so it can be deleted\n' after export)\n'\n' Returns: \n' Successful: VTab containing the sample\n' Unsuccessful: NIL\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Av enue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nsampleDict = SELF.Get(0)\nzoneTheme = SELF.Get(1)\nzoneIDField = SELF.Get(2)\nzoneFieldList = SELF.Get(3)\nzoneAliasList = SELF.Get(4)\nselRecs = SELF.Get(5)\nthePrj = SELF.Get(6)\noutFN = SELF.Get(7)\nzoneFTab = zoneTheme.GetFTab\nidName = zoneIDField .GetAlias\n\n\n' Save selections.\n\nthemeList = List.Make\nfor each aTheme in sampleDict.ReturnKeys\n if (aTheme.HasTable) then\n aTheme.GetVTab.RememberSelection\n themeList.Add(aTheme)\n end\nend\nzoneTheme.GetFTab.RememberSelection\nthemeList.Add(zoneTheme)\n\n\n' Unselect everything in the zone theme if not using the selection.\nif (selRecs.Not) then\n zoneTheme.GetFTab.GetSelection.ClearAll\nend\n\n\n' Get list of visible fields in the zone FTab and set those that\n' aren't being saved to invisible.\n\nvisibleList = List.Make\nfor each aField in zoneFTab.GetFields\n if (aField.IsVisible) then\n visibleList.Add(aField)\n if (zoneFieldList.Find(aField) = -1) then\n aField.SetVisible(FALSE)\n end\n end\nend\n\n\n' Create the new VTab.\n\ntheFN = FileName.GetTmpDir.MakeTmp(\"zonal\", \"dbf\")\ntheVTab = zoneFTab.Export(theFN, dBASE, selRecs)\nfor each aField in visibleList\n aField.SetVisible(TRUE)\nend\nif (theVTab.HasError) then\n MsgBox.Error(\"Temporary VTab could not be created.\", \"\")\n Av.Run(\"SM.Bail\", {\"zone\", themeList} )\n return NIL\nend\nidField = theVTab.FindField(idName)\n\n\n' Set Aliases for base fields, if necessary.\n\nif (zoneAliasList <> NIL) then\n for each aField in theVTab.GetFields\n index = zoneFieldList.Find(zoneFTab.FindField(aField.GetAlias))\n aField.SetAlias(zoneAliasList.Get(index))\n end\nend \n\n\n' Cycle through the themes to be sampled and create a vtab containing\n' the statistics.\n\nfor each aTheme in sampleDict.ReturnKeys\n for each statList in sampleDict.Get(aTheme)\n theStat = statList.Get(0)\n th eAlias = statList.Get(1)\n \n theGrid = aTheme.GetGrid\n theFN = FileName.GetTmpDir.MakeTmp(\"zonal\", \"dbf\")\n statVTab = theGrid.ZonalStatsTable(zoneFTab, thePrj, zoneIDField,\n FALSE, theFN)\n if (statVTab.HasError) then\n MsgBox.Error(\"Statistics could not be computed for\" ++\n aTheme.GetName + \".\", \"\")\n Av.Run(\"SM.Bail\", {\"zone\", themeList})\n return NIL\n end\n statVTab.FindField(\"Std\").SetAlias(\"Standard Deviation\")\n \n fieldNameList = {idName, theStat}\n for each aField in statVTab.GetFields\n fieldAlias = aField.GetAlias\n if ({idName, theStat}.FindByValue(fieldAlias) = -1) then\n aField.SetVisible(FALSE)\n elseif (fieldAlias = theStat) then\n aField.SetAlias(theAlias)\n end\n end\n \n joinField = statVTab.FindField(idField.GetAlias)\n theVTab.Join(idField, statVTab, joinField)\n end\nend\n\n\n' Return.\n\noutVTab = theVTab.Export(outFN, dBASE, FALSE)\nAv.Run(\"SM.Bail\", {\"zone\", themeList})\nreturn outVTab\n" ) (Script.1462 Name: "SM.ZoneSample.Apply" SourceCode: "' Name: SM.ZoneSample.Apply\n'\n' Description: Apply scripts for controls in SM.ZoneSample.\n'\n' Self: lbxSample, lbxStats\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documenta tion.\n' ---------------------------------------------------------------------\n\n\nsampleDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbxSample: Run the click script for the Remove button.\n\nif (SELF.GetName = \"lbxSample\") then\n sampleDlg.FindByName(\"lbtRemove\").Click\n\n\n' ---------------------------------------------------------------------\n' lbxStats: Run the click script for the Add button.\n\nelseif (SELF.GetName = \"lbxStats\") then\n sampleDlg.FindByName(\" lbtAdd\").Click\n\n\n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1463 Name: "SM.ZoneSample.Click" SourceCode: "' Name: SM.ZoneSample.Click\n'\n' Description: Click scripts for controls in SM.ZoneSample.\n'\n' Self: lbtAdd, lbtCancel, lbtHelp, lbtOK, lbtRemove\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nsampleDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbtAdd: Add the selected grids to the sample listbox.\n\nif (SELF.GetName = \"lbtAdd\") then\n lbxGrids = sampleDlg.FindByName(\"lbxGrids\")\n lbxStats = sampleDlg.FindByName(\"lbxStats\")\n lbxSample = sampleDlg.FindByName(\"lbxSample\")\n\n if (lbxStats.HasSelection) then\n statList = lbxStats.GetSelection\n sampleList = lbxSample.GetList\n floatStatList = {\"Max\", \"Mean\", \"Min\", \"Range\",\n \"Standard Deviation\", \"Sum\"}\n for each aTheme in lbxGrids.GetSelection\n isFloat = aTheme.GetGrid.IsInteger.Not\n for each aStat in statList\n if (isFloat and (floatStatList.FindByValue(aStat) = -1)) then\n theMsg = aStat ++ \"can not be computed for the floating\" ++\n \"point grid\" ++ aTheme.GetName + \".\"\n MsgBox.Warning(theMsg, \"\")\n else\n sampleList.Add({aTheme, aStat})\n end\n end\n end \n sampleList = Av.Run(\"SM.Library\", {\"Sort2\", sampleList})\n lbxSample.DefineFromList(sampleList)\n lbxGrids.SetSelection(Rect.MakeEmpty, FALSE)\n lbxStats.SetSelection(Rect.MakeEmpty, FALSE)\n end\n \n\n' ---------------------------------------------------------------------\n' lbtCancel: Close the dialog and empty controls.\n\nelseif (SELF.GetName = \"lbtCancel\") then\n sampleDlg.SetModalResult(NIL)\n sampleDlg.Close\n sampleDlg.FindByNa me(\"lbxGrids\").Empty\n sampleDlg.FindByName(\"lbxSample\").Empty\n sampleDlg.FindByName(\"cbxZoneTheme\").Empty\n sampleDlg.FindByName(\"cbxIDField\").Empty\n sampleDlg.FindByName(\"lbxZoneFields\").Empty\n\n\n' ---------------------------------------------------------------------\n'lbtHelp: Open help.\n\nelseif (SELF.GetName = \"lbtHelp\") then\n Av.Run(\"SM.Help\", SELF)\n\n\n' ---------------------------------------------------------------------\n' lbtOK: Close the dialog and return the info necessary to sample the\n' data s ets. {{{theme, stat}...}, zoneTheme, idField, {zoneFields...},\n' selRecs, exportDBF, addTable}\n\nelseif (SELF.GetName = \"lbtOK\") then\n lbxSample = sampleDlg.FindByName(\"lbxSample\")\n cbxZoneTheme = sampleDlg.FindByName(\"cbxZoneTheme\")\n cbxIDField = sampleDlg.FindByName(\"cbxIDField\")\n lbxZoneFields = sampleDlg.FindByName(\"lbxZoneFields\")\n \n sampleList = lbxSample.GetList\n zoneTheme = cbxZoneTheme.GetSelection\n idField = cbxIDField.GetSelection\n zoneFields = lbxZoneFields.GetSelection\n selRecs = samp leDlg.FindByName(\"chkSelected\").IsSelected\n exportDBF = sampleDlg.FindByName(\"radDBF\").IsSelected\n addTable = sampleDlg.FindByName(\"chkTable\").IsSelected\n sampleDlg.SetModalResult({sampleList, zoneTheme, idField, zoneFields,\n selRecs, exportDBF, addTable})\n\n sampleDlg.FindByName(\"lbxGrids\").Empty\n lbxSample.Empty\n cbxZoneTheme.Empty\n cbxIDField.Empty\n lbxZoneFields.Empty\n sampleDlg.Close\n\n \n' ---------------------------------------------------------------------\n' lbtRemove: Remove selected sam ple grids from the listbox.\n\nelseif (SELF.GetName = \"lbtRemove\") then\n lbxSample = sampleDlg.FindByName(\"lbxSample\")\n if (lbxSample.HasSelection) then\n lbxSample.GoFirstSelected\n rowList = {lbxSample.GetCurrentRow}\n while (lbxSample.GoNextSelected)\n rowList.Add(lbxSample.GetCurrentRow)\n end\n rowList.RemoveDuplicates\n rowList.Sort(FALSE)\n for each aRow in rowList\n lbxSample.GoRow(aRow)\n lbxSample.DeleteRows(1)\n end\n end\n\n\n' ------------------------------------------- --------------------------\n\nend\nSELF.BroadcastUpdate\n" ) (Script.1464 Name: "SM.ZoneSample.Open" SourceCode: "' Name: SM.ZoneSample.Open\n'\n' Description: Open script for SM.ZoneSample.\n'\n' Self: SM.ZoneSample\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ------------- --------------------------------------------------------\n\n\n' Find controls.\n\nlbxGrids = SELF.FindByName(\"lbxGrids\")\nlbxStats = SELF.FindByName(\"lbxStats\")\nlbxSample = SELF.FindByName(\"lbxSample\")\ncbxZoneTheme = SELF.FindByName(\"cbxZoneTheme\")\ncbxIDField = SELF.FindByName(\"cbxIDField\")\nlbxZoneFields = SELF.FindByName(\"lbxZoneFields\")\nchkSelected = SELF.FindByName(\"chkSelected\")\nradCSV = SELF.FindByName(\"radCSV\")\nchkTable = SELF.FindByName(\"chkTable\")\nlbtOK = SELF.FindByName(\"lbtOK\")\n\n\n' Set the view as an ob ject tag.\n\ntheView = Av.GetActiveDoc\nSELF.SetObjectTag(theView)\n\n\n' Make lists of polygon and grid themes in the view.\n\npolyList = List.Make\ngridList = List.Make\nfor each aTheme in theView.GetThemes\n if (aTheme.Is(FTheme)) then\n aThemeShape = aTheme.GetFTab.FindField(\"Shape\").GetType\n if (aThemeShape = #FIELD_SHAPEPOLY) then\n polyList.Add(aTheme)\n end\n elseif (aTheme.Is(GTheme)) then\n gridList.Add(aTheme)\n end 'if-else\nend 'for each aTheme\npolyList.Insert(\"\")\n\n\n' Build VA Ts for any integer grids that don't already have one.\n\nfor each aTheme in gridList\n aGrid = aTheme.GetGrid\n if (aGrid.IsInteger and aTheme.HasTable.Not) then\n aGrid.BuildVAT\n end\nend\n\n\n' Initialize.\n\nlbxGrids.DefineFromList(gridList)\nlbxGrids.SortAscending(FALSE)\ncbxZoneTheme.DefineFromList(polyList)\ncbxZoneTheme.SortAscending(FALSE)\nlbtOK.SetEnabled(FALSE)\nradCSV.Select\nlbxGrids.Focus\n" ) (Script.1465 Name: "SM.ZoneSample.Select" SourceCode: "' Name: SM.ZoneSample.Select\n'\n' Description: Select scripts for controls in SM.ZoneSample.\n'\n' Self: cbxIDField, cbxZoneTheme, lbxGrids\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the c ode and documentation.\n' ---------------------------------------------------------------------\n\n\nSELF.BroadcastUpdate\n" ) (Script.1466 Name: "SM.ZoneSample.Update" SourceCode: "' Name: SM.ZoneSample.Update\n'\n' Description: Update scripts for controls in SM.ZoneSample.\n'\n' Self: cbxIDField, lbtOK, lbxZoneFields\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the cod e and documentation.\n' ---------------------------------------------------------------------\n\n\nsampleDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' cbxIDField: Fill with fields from the selected theme.\n\nif (SELF.GetName = \"cbxIDField\") then\n theTheme = sampleDlg.FindByName(\"cbxZoneTheme\").GetSelection\n if ((theTheme <> NIL) and theTheme.Is(FTheme)) then\n parmList = {\"VisibleFields\", theTheme.GetFTab}\n fieldList = Av.Run(\"SM.Library\", parmList)\n f ieldList.Insert(\"\")\n SELF.DefineFromList(fieldList)\n else\n SELF.Empty\n end\n\n\n' ---------------------------------------------------------------------\n' lbtOK: Enable/disable based on whether there is enough info to \n' sample.\n\nelseif (SELF.GetName = \"lbtOK\") then\n sampleOK = sampleDlg.FindByName(\"lbxSample\").GetList.Count > 0\n zoneOK = sampleDlg.FindByName(\"cbxZoneTheme\").GetSelection.Is(Theme)\n idOK = sampleDlg.FindByName(\"cbxIDField\").GetSelection.Is(Field)\n SELF.SetEnabled(sampleOK an d zoneOK and idOK)\n \n\n' ---------------------------------------------------------------------\n' lbxZoneFields: Fill with fields in the selected theme. Remove the\n' ID field.\n\nelseif (SELF.GetName = \"lbxZoneFields\") then\n theTheme = sampleDlg.FindByName(\"cbxZoneTheme\").GetSelection\n if ((theTheme <> NIL) and theTheme.Is(FTheme)) then\n parmList = {\"VisibleFields\", theTheme.GetFTab}\n fieldList = Av.Run(\"SM.Library\", parmList)\n \n \n ' Remove the ID field.\n \n theField = sampleDlg.FindByN ame(\"cbxIDField\").GetSelection\n if ((theField <> NIL) and theField.Is(Field)) then\n fieldList.RemoveObj(theField)\n end\n \n \n ' Fill the listbox.\n \n SELF.DefineFromList(fieldList)\n SELF.SortAscending(FALSE)\n \n else 'if no selection\n SELF.Empty\n end 'if-else\n\n\n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1467 Name: "SM.Log.Apply" SourceCode: "' Name: SM.Log.Apply\n'\n' Description: Apply scripts for controls in SM.Log.\n'\n' Self: lbxFields, lbxIndepVars\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' -- -------------------------------------------------------------------\n\n\nlogDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbxFields: Run click script for lbtAddVar.\n\nif (SELF.GetName = \"lbxFields\") then\n logDlg.FindByName(\"lbtAddVar\").Click\n\n\n' ---------------------------------------------------------------------\n' lbxIndepVars: Run click script for lbtRemoveVar.\n\nelseif (SELF.GetName = \"lbxIndepVars\") then\n logDlg.FindByName(\"lbtRemoveVar\").Click\n\n\n' ---- -----------------------------------------------------------------\n\nend\n" ) (Script.1468 Name: "SM.Log.Click" SourceCode: "' Name: SM.Log.Click\n'\n' Description: Click scripts for controls in SM.Log.\n'\n' Self: chkSelRecords, lbtAddVar, lbtCancel, lbtChooseInt, lbtClass,\n' lbtHelp, lbtModel, lbtOK, lbtOutput, lbtRemoveAll, lbtRemoveVar,\n' radAllInt, radChooseInt, radEventsTrials, radNoInt, radSingleTrial\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and compone nts, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nlogDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbtAddVar: Add selected fields to the independent variable list.\n\nif (SELF.GetName = \"lbtAddVar\") then\n\n\n ' Make sure that there is a theme and a field selected. Exit if\n ' there isn't.\n \n selThemeList = logDlg.FindByName(\"lbxThemes\").GetSelection\n selFieldList = logDlg.FindByName(\"lbxFields\").GetSelection\n\n if ((selThemeList.Count = 0) or (selFieldList.Count = 0)) then\n return NIL\n end\n \n \n ' For each selected field, add it and the theme name to the list of\n ' independent variables.\n\n selTheme = selThemeList.Get(0)\n varList = logDlg.FindByName(\"lbxIndepVars\").GetList\n \n for each aField in selFieldList\n varList.Add({selTheme, aField})\n end\n \n \n ' Fill the independent variable listbox.\n \n varList = Av.Run(\"SM.Library\", {\"Sort2\", varList})\n logDlg.FindByName(\"lbxIndepVars\").DefineFromList(varList)\n\n\n' ---------------------------------------------------------------------\n' lbtCancel: Close the dialog.\n\nelseif (SELF.GetName = \"lbtCancel\") then\n logDlg.Close\n\n\n' ---------------------------------------------------------------------\n' lbtChooseInt: Open SM.LogInteract.\n\nelseif (SELF.GetName = \"lbtChooseInt\") then\n intDlg = Av.FindDialog(\"SM.LogInte ract\")\n intDlg.Open\n intDlg.Activate\n\n\n' ---------------------------------------------------------------------\n' lbtClass: Open SM.LogClass.\n\nelseif (SELF.GetName = \"lbtClass\") then\n classDlg = Av.FindDialog(\"SM.LogClass\")\n classDlg.Open\n classDlg.Activate\n\n\n' ---------------------------------------------------------------------\n' lbtHelp: Open help.\n\nelseif (SELF.GetName = \"lbtHelp\") then\n Av.Run(\"SM.Help\", SELF)\n\n \n' ---------------------------------------------------------------------\n' lbtModel : Open SM.LogModel.\n\nelseif (SELF.GetName = \"lbtModel\") then\n modelDlg = Av.FindDialog(\"SM.LogModel\")\n modelDlg.Open\n modelDlg.Activate\n\n\n' ---------------------------------------------------------------------\n' lbtOK: Check that things are okay and call the routine to write the\n' SAS code to a file.\n\nelseif (SELF.GetName = \"lbtOK\") then\n\n\n ' Find other dialogs.\n\n modDlg = Av.FindDialog(\"SM.LogModel\")\n outDlg = Av.FindDialog(\"SM.LogOutput\")\n intDlg = Av.FindDialog(\"SM.LogInteract\")\n classDlg = Av. FindDialog(\"SM.LogClass\")\n\n\n ' If another dialog is open, just beep and exit.\n \n if (modDlg.IsOpen or outDlg.IsOpen or intDlg.IsOpen or \n classDlg.IsOpen) then\n System.Beep\n return NIL\n end\n\n\n ' Find controls in other dialogs.\n\n lbxIncludeVars = modDlg.FindByName(\"lbxIncludeVars\")\n lbxInt = intDlg.FindByName(\"lbxInt\")\n lbxClass = classDlg.FindByName(\"lbxClass\")\n\n \n ' Check dependent variables.\n \n if (logDlg.FindByName(\"radSingleTrial\").IsSelected) then\n numValues = logDlg.FindByNam e(\"txtData\").GetObjectTag.Count\n if (numValues > 10) then \n theMsg = \"There are more than ten unique values for the\" ++\n \"response variable. Do you really want to do a logistic\" ++\n \"regression on these data?\"\n if (MsgBox.YesNo(theMsg, \"Question\", FALSE).Not) then\n logDlg.FindByName(\"cbxResponse\").Focus\n return NIL\n end\n elseif (numValues < 2) then\n theMsg = \"Logistic regression is not possible unless there\" ++\n \"are at least two unique variables for the response\" ++\n \"variable. Choose a new response variable.\"\n MsgBox.Error(theMsg,\"\")\n logDlg.FindByName(\"cbxResponse\").Focus\n return NIL\n end 'if-else numValues\n end 'if radSingleTrial\n \n \n ' Get the dictionaries.\n \n logDict = logDlg.GetObjectTag\n theView = logDict.Get(\"view\")\n viewDict = logDict.Get(theView)\n if (viewDict = NIL) then\n viewDict = Dictionary.Make(11)\n logDict.Set(theView, viewDict)\n end\n\n\n ' Save radio button settings.\n \n ctrlList = {\"cpaIn t\", \"cpaDepVars\", \"cpaLevels\"}\n Av.Run(\"SM.ManageCtrls\", {\"s\", logDlg, ctrlList, logDict})\n Av.Run(\"SM.ManageCtrls\", {\"s\", modDlg, {\"cpaModel\"}, logDict})\n\n \n ' Close the dialog.\n \n closeScript = logDlg.GetClose\n logDlg.SetClose(\"\")\n logDlg.Close\n logDlg.SetClose(closeScript)\n\n \n ' Update include, interaction and class variable lists.\n \n lbxIncludeVars.Update\n lbxInt.Update\n lbxClass.Update\n \n \n ' Make SM.Log changes to the view dictionary.\n \n ctrlList = {\"cbxDepTheme\", \"cbxResponse\", \"c bxTrials\", \"cpaDepVars\",\n \"cpaLevels\", \"lbxIndepVars\"}\n Av.Run(\"SM.ManageCtrls\", {\"s\", logDlg, ctrlList, viewDict})\n\n \n ' Make changes to the view dictionary for other dialogs.\n \n viewDict.Set(\"lbxClass\", lbxClass.GetList)\n viewDict.Set(\"lbxIncludeVars\", lbxIncludeVars.GetList)\n viewDict.Set(\"lbxInt\", lbxInt.GetList)\n\n \n ' Find out if auto submit.\n \n odbFN = Extension.Find(\"StatMod Zone\").GetFileName.ReturnDir\n odbFN.MergeFile(\"statmodz.odb\")\n if (File.Exists(odbFN)) then\n propD ict = ODB.Open(odbFN).Get(0)\n autoSubmit = propDict.Get(\"chkSAS\")\n sasFNStr = propDict.Get(\"txlSAS\")\n optsStr = propDict.Get(\"txlSASOpts\")\n submitStr = sasFNStr ++ optsStr\n timeOut = propDict.Get(\"cbxTime\")\n else\n autoSubmit = FALSE\n end\n\n \n ' If not auto submit, query user for filename, otherwise put it in\n ' the system temp directory. Run the script to create the SAS code.\n \n if (autoSubmit) then\n theFN = FileName.GetTmpDir.MakeTmp(\"logit\", \"sas\")\n else\n theTitle = \"Save S AS program file as...\"\n theFN = FileName.GetCWD.MakeTmp(\"logit\", \"sas\")\n theFN = FileDialog.Put(theFN, \"*.sas\", theTitle)\n if (theFN = NIL) then\n MsgBox.Info(\"No files written.\", \"\")\n return NIL\n end\n end\n \n if (autoSubmit) then\n if (Av.Run(\"SM.WriteSASCode\", {theFN, TRUE})) then\n outputFN = theFN.GetFullName.AsFilename \n outputFN.SetExtension(\"mod\")\n finishFN = outputFN.Clone\n finishFN.SetExtension(\"xsm\")\n if (File.Exists(finishFN)) then\n File.Del ete(finishFN)\n end\n logFN = FileName.GetTmpDir.MakeTmp(\"saslog\", \"log\")\n execStr = sasFNStr ++ \"-sysin\" ++ theFN.AsString ++ \"-log\" ++\n logFN.AsString ++ \"-print\" ++ outputFN.AsString\n System.Execute(execStr)\n parmList = {theView, finishFN, outputFN, {theFN, logFN},\n Date.Now, timeOut}\n Av.Run(\"SM.AutoSubmit\", parmList)\n end\n else\n Av.Run(\"SM.WriteSASCode\", {theFN, FALSE})\n end\n\n\n ' Empty controls in SM.Log.\n \n logDlg.FindByName(\"lbxThemes\").Empty\n log Dlg.FindByName(\"lbxFields\").Empty\n logDlg.FindByName(\"lbxIndepVars\").Empty\n logDlg.FindByName(\"cbxDepTheme\").Empty\n logDlg.FindByName(\"cbxResponse\").Empty\n logDlg.FindByName(\"cbxTrials\").Empty\n logDlg.FindByName(\"cbxDepTheme\").BroadcastUpdate\n \n \n ' Empty controls in SM.LogModel.\n \n modDlg.FindByName(\"lbxIndepVars\").Empty\n modDlg.FindByName(\"lbxIncludeVars\").Empty\n \n \n ' Empty controls in SM.LogClass.\n \n classDlg.FindByName(\"lbxClass\").Empty\n \n \n ' Empty controls in SM.LogInteract.\n \n i ntDlg.FindByName(\"lbxInt\").Empty\n \n\n' ---------------------------------------------------------------------\n' lbtOutput: Open SM.LogOutput.\n\nelseif (SELF.GetName = \"lbtOutput\") then\n outputDlg = Av.FindDialog(\"SM.LogOutput\")\n outputDlg.Open\n outputDlg.Activate\n\n\n' ---------------------------------------------------------------------\n' lbtRemoveAll: Remove all variables from the independent variables\n' list.\n\nelseif (SELF.GetName = \"lbtRemoveAll\") then\n logDlg.FindByName(\"lbxIndepVars\").Empty\n\n\n' ---- -----------------------------------------------------------------\n' lbtRemoveVar: Remove selected variables from the independent\n' variables list.\n\nelseif (SELF.GetName = \"lbtRemoveVar\") then\n lbxIndepVars = logDlg.FindByName(\"lbxIndepVars\")\n if (lbxIndepVars.HasSelection) then\n lbxIndepVars.GoFirstSelected\n rowList = {lbxIndepVars.GetCurrentRow}\n while (lbxIndepVars.GoNextSelected)\n rowList = rowList.Add(lbxIndepVars.GetCurrentRow)\n end\n rowList.RemoveDuplicates\n rowList.Sort(FALS E)\n for each rowNum in rowList\n lbxIndepVars.GoRow(rowNum)\n lbxIndepVars.DeleteRows(1)\n end\n end \n\n\n' ---------------------------------------------------------------------\n\nend\nSELF.BroadcastUpdate\n" ) (Script.1469 Name: "SM.Log.Close" SourceCode: "' Name: SM.Log.Close\n'\n' Description: Close script for SM.Log. Restore settings from when \n' the dialog was opened.\n'\n' Self: SM.Log\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\n' Get dictionary and dialogs.\n\nmodDlg = Av.FindDialog(\"SM.LogModel\")\noutDlg = Av.FindDialog(\"SM.LogOutput\")\nintDlg = Av.FindDialog(\"SM.LogInteract\")\nclassDlg = Av.FindDialog(\"SM.LogClass\")\nchkSelRecords = SELF.FindByName(\"chkSelRecords\")\nlogDict = SELF.GetObjectTag\n\n\n' Close any open dialogs.\nfor each aDlg in {modDlg, outDlg, intDlg, classDlg}\n if (aDlg.IsOpen) then\n aDlg.Close\n end\nend\n\n\n' Reset controls in S M.Log.\n\nctrlList = {\"chkSelRecords\", \"chkTable\", \"cpaDepVars\", \"cpaInt\",\n \"cpaLevels\"}\nAv.Run(\"SM.ManageCtrls\", {\"r\", SELF, ctrlList, logDict})\n\n\n' Reset controls in SM.LogOutput.\n\nctrlList = {\"chkCLOdds\", \"chkCLParm\", \"chkCorrb\", \"chkCovb\", \n \"chkDetails\", \"chkInfluence\", \"chkLackFit\", \"chkRSquare\",\n \"chkSimple\", \"txlAlpha\"}\nAv.Run(\"SM.ManageCtrls\", {\"r\", outDlg, ctrlList, logDict})\n\n\n' Reset controls in SM.LogModel.\n\nctrlList = {\"chkDefault\", \"chkNoInt\", \"cpaModel\", \"txlBa ckStop\", \n \"txlForStop\", \"txlMaxIter\", \"txlMaxSteps\", \"txlSLEntry\",\n \"txlSLStay\"}\nAv.Run(\"SM.ManageCtrls\", {\"r\", modDlg, ctrlList, logDict})\n\n\n' Empty controls in SM.Log.\n\nSELF.FindByName(\"lbxThemes\").Empty\nSELF.FindByName(\"lbxFields\").Empty\nSELF.FindByName(\"lbxIndepVars\").Empty\nSELF.FindByName(\"cbxDepTheme\").Empty\nSELF.FindByName(\"cbxResponse\").Empty\nSELF.FindByName(\"cbxTrials\").Empty\nSELF.FindByName(\"cbxDepTheme\").BroadcastUpdate\n\n\n' Empty controls in SM.LogModel.\n\nmodDlg.FindByName( \"lbxIndepVars\").Empty\nmodDlg.FindByName(\"lbxIncludeVars\").Empty\n\n\n' Empty controls in SM.LogClass.\n\nclassDlg.FindByName(\"lbxClass\").Empty\n\n\n' Empty controls in SM.LogInteract.\n\nintDlg.FindByName(\"lbxInt\").Empty\n" ) (Script.1470 Name: "SM.Log.Open" SourceCode: "' Name: SM.Log.Open\n'\n' Description: Open script for SM.Log dialog. Saves settings from all\n' associated dialogs in case of Cancel. If the dialogs have been\n' opened with the active view previously during the ArcView session,\n' then uses variables from that instance and view-specific controls are\n' reset. Otherwise, clears out variables and view-specific controls\n' are left as is. All other controls are left as is.\n'\n' Self: SM.Log\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\n' Get the active View.\n\ntheView = Av.GetActiveDoc\n\n\n' Get all associated dialogs.\n\nclassDlg = Av.FindDialog(\"SM. LogClass\")\nintDlg = Av.FindDialog(\"SM.LogInteract\")\nmodDlg = Av.FindDialog(\"SM.LogModel\")\noutDlg = Av.FindDialog(\"SM.LogOutput\")\n\n\n' Get the main dictionary and the view dictionary if it exists.\n\nlogDict = SELF.GetObjectTag\nviewDict = logDict.Get(theView)\nlogDict.Set(\"view\", theView)\n\n\n' Get controls in all dialogs.\n\ncbxDepTheme = SELF.FindByName(\"cbxDepTheme\")\nlbxIndepVars = SELF.FindByName(\"lbxIndepVars\")\nlbxThemes = SELF.FindByName(\"lbxThemes\")\nlbxClass = classDlg.FindByName(\"lbxClass\")\nlbxInt = intDlg.F indByName(\"lbxInt\")\nlbxIncludeVars = modDlg.FindByName(\"lbxIncludeVars\")\n\n\n' Restore radio button settings for SM.Log.\n\nctrlList = {\"cpaDepVars\", \"cpaInt\", \"cpaLevels\"}\nAv.Run(\"SM.ManageCtrls\", {\"r\", SELF, ctrlList, logDict})\n\n\n' Restore radio button settings for modDlg.\n\nAv.Run(\"SM.ManageCtrls\", {\"r\", modDlg, {\"cpaModel\"}, logDict})\n\n\n' Save other settings from SM.Log.\n\nctrlList = {\"chkSelRecords\", \"chkTable\"}\nAv.Run(\"SM.ManageCtrls\", {\"s\", SELF, ctrlList, logDict})\n\n\n' Save other settings from modDlg.\n\nct rlList = {\"chkDefault\", \"chkNoInt\", \"txlBackStop\", \"txlForStop\",\n \"txlMaxIter\", \"txlMaxSteps\", \"txlSLEntry\", \"txlSLStay\"}\nAv.Run(\"SM.ManageCtrls\", {\"s\", modDlg, ctrlList, logDict})\n\n\n' Save other settings from outDlg.\n\nctrlList = {\"chkCLOdds\", \"chkCLParm\", \"chkCorrb\", \"chkCovb\", \n \"chkDetails\", \"chkInfluence\", \"chkLackFit\", \"chkRSquare\",\n \"chkSimple\", \"txlAlpha\"}\nAv.Run(\"SM.ManageCtrls\", {\"s\", outDlg, ctrlList, logDict})\n\n\n' Make lists of polygon, grid, and point themes in t he view.\n\nthemeList = theView.GetThemes\npolyThemeList = List.Make\npointThemeList = List.Make\ngridThemeList = List.Make\nfor each aTheme in themeList\n if (aTheme.Is(FTheme)) then\n aThemeShape = aTheme.GetFTab.FindField(\"Shape\").GetType\n if (aThemeShape = #FIELD_SHAPEPOLY) then\n polyThemeList.Add(aTheme)\n elseif (aThemeShape = #FIELD_SHAPEPOINT) then\n pointThemeList.Add(aTheme)\n end\n elseif (aTheme.Is(GTheme)) then\n gridThemeList.Add(aTheme)\n end 'if-else\nend 'for each aTheme\npointT hemeList.Insert(\"\")\n\n\n' Build VATs for any integer grids that don't already have one.\n\nfor each aTheme in gridThemeList\n aGrid = aTheme.GetGrid\n if (aGrid.IsInteger and aTheme.HasTable.Not) then\n aGrid.BuildVAT\n end\nend\n\n\n' Fill the \"available theme\" controls.\n\nlbxThemes.DefineFromList(polyThemeList + gridThemeList)\nlbxThemes.SortAscending(FALSE)\ncbxDepTheme.DefineFromList(pointThemeList)\ncbxDepTheme.SortAscending(FALSE)\n\n\n' If there is a view dictionary, use values from that dictionary to\n' initialize controls. (If there is a view dictionary, then that\n' means that radio buttons have already been selected.)\n\nif (viewDict <> NIL) then\n\n\n ' Fill the independent variable listbox and make sure the variables\n ' are still valid.\n \n varList = viewDict.Get(\"lbxIndepVars\")\n for each aVar in varList.Clone\n theTheme = aVar.Get(0)\n if (theTheme.Is(FTheme)) then\n if (polyThemeList.Find(theTheme) = -1) then\n varList.RemoveObj(aVar)\n elseif (theTheme.GetFTab.GetFields.Find(a Var.Get(1)) = -1) then\n varList.RemoveObj(aVar)\n end\n elseif (gridThemeList.Find(theTheme) = -1) then\n varList.RemoveObj(aVar)\n elseif (theTheme.HasTable and \n (theTheme.GetVTab.GetFields.Find(aVar.Get(1)) = -1)) then\n varList.RemoveObj(aVar)\n end\n end\n lbxIndepVars.DefineFromList(varList)\n lbxIndepVars.BroadcastUpdate\n \n \n ctrlList = {\"cbxDepTheme\", \"cbxResponse\", \"cbxTrials\", \"cpaDepVars\",\n \"cpaLevels\"}\n Av.Run(\"SM.ManageCtrls\", {\"r\", SELF, ctr lList, viewDict})\n\n\n ' Fill the include listboxes.\n \n lbxClass.DefineFromList(viewDict.Get(\"lbxClass\"))\n lbxClass.Update\n lbxIncludeVars.DefineFromList(viewDict.Get(\"lbxIncludeVars\"))\n lbxIncludeVars.Update\n lbxInt.DefineFromList(viewDict.Get(\"lbxInt\"))\n lbxInt.Update\n \nend\n\n\nlbxThemes.Focus\n" ) (Script.1471 Name: "SM.Log.Select" SourceCode: "' Name: SM.Log.Select\n'\n' Description: Select scripts for controls in SM.Log.\n'\n' Self: cbxDepTheme, cbxResponse, cbxTrials, lbxThemes\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the cod e and documentation.\n' ---------------------------------------------------------------------\n\n\nSELF.BroadcastUpdate\n" ) (Script.1472 Name: "SM.Log.Update" SourceCode: "' Name: SM.Log.Update\n'\n' Description: Update scripts for controls in SM.Log.\n'\n' Self: cbxTrials, cpaDepVars, cpaLevels, lbtChooseInt, lbtOK, \n' lbxFields, txtResponse\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyrig ht\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nlogDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' cbxTrials: Show/hide \"Trials\" combo box based on chosen syntax.\n\nif (SELF.GetName = \"cbxTrials\") then\n showTrials = logDlg.FindByName(\"radEventsTrials\").IsSelected\n SELF.SetVisible(showTrials)\n logDlg.FindByName(\"txtTrials\").SetVisible(showTrials)\n \n\n' ------------------------- --------------------------------------------\n' cpaDepVars: Synchronize dependent field combo boxes.\n\nelseif (SELF.GetName = \"cpaDepVars\") then\n\n\n ' Find controls.\n \n cbxResponse = logDlg.FindByName(\"cbxResponse\")\n cbxTrials = logDlg.FindByName(\"cbxTrials\")\n isEventsTrials = logDlg.FindByName(\"radEventsTrials\").IsSelected\n \n \n ' If no dependent theme selected, empty combo boxes.\n \n theTheme = logDlg.FindByName(\"cbxDepTheme\").GetSelection\n if (theTheme.Is(FTheme).Not) then\n logDlg.FindByName(\"c bxResponse\").Empty\n logDlg.FindByName(\"cbxTrials\").Empty\n \n else 'if a theme is selected\n\n \n 'Get the current selections and a list of possible fields.\n \n theFTab = theTheme.GetFTab\n responseField = cbxResponse.GetSelection\n trialsField = cbxTrials.GetSelection\n responseFieldList = Av.Run(\"SM.Library\", {\"VisibleFields\", theFTab})\n if (isEventsTrials) then\n for each aField in responseFieldList.Clone\n if (aField.IsTypeNumber.Not) then\n responseFieldList.RemoveObj( aField)\n end\n end\n end\n responseFieldList.Insert(\"\")\n trialsFieldList = responseFieldList.Clone\n \n \n ' Remove used fields from lists and populate the combo boxes.\n \n if (isEventsTrials and trialsField.Is(Field)) then\n responseFieldList.RemoveObj(trialsField)\n end\n if (responseField.Is(Field)) then\n trialsFieldList.RemoveObj(responseField)\n end\n \n cbxResponse.DefineFromList(responseFieldList)\n cbxResponse.SortAscending(FALSE)\n cbxTrials.Defin eFromList(trialsFieldList)\n cbxTrials.SortAscending(FALSE)\n \n \n ' Select the correct rows.\n \n cbxResponse.FindByValue(responseField)\n cbxResponse.SelectCurrent\n cbxTrials.FindByValue(trialsField)\n cbxTrials.SelectCurrent\n \n end 'if-else theme selected\n \n\n' ---------------------------------------------------------------------\n' cpaLevels: Show/hide the level ordering information depending on\n' which syntax and response variables are chosen.\n\nelseif (SELF.GetName = \"cpaLevels\" ) then\n cbxResponse = logDlg.FindByName(\"cbxResponse\")\n txtData = logDlg.FindByName(\"txtData\")\n txtLevel = logDlg.FindByName(\"txtLevel\")\n txtResponseLevels = logDlg.FindByName(\"txtResponseLevels\")\n radHighValue = logDlg.FindByName(\"radHighValue\")\n radLowValue = logDlg.FindByName(\"radLowValue\")\n\n\n ' If event/trial syntax is chosen, then hide all controls.\n \n if (logDlg.FindByName(\"radSingleTrial\").IsSelected.Not) then\n txtResponseLevels.SetVisible(FALSE)\n txtData.SetVisible(FALSE)\n txtLevel .SetVisible(FALSE)\n radLowValue.SetVisible(FALSE)\n radHighValue.SetVisible(FALSE)\n\n \n ' Else if no response variable is chosen, only show the \"Response\n ' Levels\" text.\n \n elseif (cbxResponse.GetSelection.Is(Field).Not) then\n txtResponseLevels.SetVisible(TRUE)\n txtData.SetVisible(FALSE)\n txtLevel.SetVisible(FALSE)\n radLowValue.SetVisible(FALSE)\n radHighValue.SetVisible(FALSE)\n \n \n ' Else show all controls and fill them according to the response\n ' variable.\n \n else\n theF ield = cbxResponse.GetSelection\n theFTab = logDlg.FindByName(\"cbxDepTheme\").GetSelection.GetFTab\n \n \n ' Summarize only uses the selection, so clear the selection if\n ' using all records.\n\n useAll = logDlg.FindByName(\"chkSelRecords\").IsSelected.Not\n if (useAll) then\n theSelection = theFTab.GetSelection.Clone\n theFTab.GetSelection.ClearAll\n theFTab.UpdateSelection\n end\n\n\n ' Get a list of all unique values of the response variable and tag \n ' the list to txtData.\n\n tempFN = FileName.GetTmpDir.MakeTmp(\"xxxsm\", \"dbf\")\n tempVTab = theFTab.Summarize(tempFN, dBASE, theField, {theField},\n {#VTAB_SUMMARY_FIRST})\n tempField = tempVTab.FindField(theField.GetAlias)\n valueList = List.Make\n for each aRec in tempVTab\n valueList.Add(tempVTab.ReturnValueString(tempField, aRec))\n end\n valueList.Sort(TRUE)\n txtData.SetObjectTag(valueList)\n \n\n ' Delete the temporary file created by Summarize.\n\n tempVTab = NIL\n tempField = NIL\n Av.PurgeOb jects\n File.Delete(tempFN)\n\n\n ' Reset the selection if necessary.\n\n if (useAll) then\n theFTab.SetSelection(theSelection)\n theFTab.UpdateSelection\n end\n\n \n ' Make a string that will show the values of the response variable\n ' and set it as the label for txtData.\n \n valueStr = \"\"\n for each aValue in valueList\n valueStr = valueStr ++ aValue\n end\n if (valueStr.Count > 18) then\n valueStr = valueList.Get(0).Left(6) ++ \"...\" ++\n valueList.Get( valueList.Count - 1).Left(6)\n end\n txtData.SetLabel(valueStr)\n \n \n ' Set the low and high values of the response variable as labels\n ' for the radio buttons.\n \n if (valueList.Count >= 2) then\n radLowValue.SetLabel(valueList.Get(0))\n radHighValue.SetLabel(valueList.Get(valueList.Count - 1))\n if (SELF.GetSelected = NIL) then\n radHighValue.Select\n end\n else\n radLowValue.SetLabel(\"\")\n radHighValue.SetLabel(valueList.Get(0))\n radHighValue.Select\n end\n \n \n ' Make the controls visible.\n \n txtResponseLevels.SetVisible(TRUE)\n txtData.SetVisible(TRUE)\n txtLevel.SetVisible(TRUE)\n radLowValue.SetVisible(TRUE)\n radHighValue.SetVisible(TRUE)\n \n end 'if single-trial sytax with a response field chosen\n\n\n' ---------------------------------------------------------------------\n' lbtChooseInt: Enable/disable the \"Choose interactions\" button.\n\nelseif (SELF.GetName = \"lbtChooseInt\") then\n SELF.SetEnabled(logDlg.FindByName(\"radChooseInt \").IsSelected)\n\n\n' ---------------------------------------------------------------------\n' lbtOK: Enable/disable the \"OK\" button based on the existence of\n' independent and dependent variables.\n\nelseif (SELF.GetName = \"lbtOK\") then\n indepOK = (logDlg.FindByName(\"lbxIndepVars\").GetList.Count > 0)\n responseOK = logDlg.FindByName(\"cbxResponse\").GetSelection.Is(Field)\n if (logDlg.FindByName(\"radEventsTrials\").IsSelected) then\n trialsOK = logDlg.FindByName(\"cbxTrials\").GetSelection.Is(Field)\n else\n tr ialsOK = TRUE\n end\n \n if (indepOK and responseOK and trialsOK) then\n SELF.SetEnabled(TRUE)\n else\n SELF.SetEnabled(FALSE)\n end\n\n\n' ---------------------------------------------------------------------\n' lbxFields: Remove any fields from the \"Available Fields\" listbox\n' that are in the \"Independent Variables\" listbox.\n\nelseif (SELF.GetName = \"lbxFields\") then\n\n\n ' If there isn't a theme selected then empty the field listbox.\n \n selectionList = logDlg.FindByName(\"lbxThemes\").GetSelection\n if (s electionList.Count > 0) then\n theTheme = selectionList.Get(0)\n else\n return NIL\n end\n\n \n ' Remove fields from field list that are in variable list and fill\n ' field box.\n \n if (theTheme.Is(FTheme)) then\n parmList = {\"VisibleFields\", theTheme.GetFTab}\n fieldList = Av.Run(\"SM.Library\", parmList)\n elseif (theTheme.HasTable) then\n parmList = {\"VisibleFields\", theTheme.GetVTab}\n fieldList = Av.Run(\"SM.Library\", parmList)\n else\n fieldList = {\"Value\"}\n end\n \n for each aVar in log Dlg.FindByName(\"lbxIndepVars\").GetList\n if (aVar.Get(0) = theTheme) then\n fieldList.RemoveObj(aVar.Get(1))\n end\n end\n SELF.DefineFromList(fieldList)\n SELF.SortAscending(FALSE)\n\n\n' ---------------------------------------------------------------------\n' txtResponse: Change label on cbxResponse based on the chosen syntax.\n\nelseif (SELF.GetName = \"txtResponse\") then\n if (logDlg.FindByName(\"radSingleTrial\").IsSelected) then\n SELF.SetLabel(\"Response:\")\n else\n SELF.SetLabel(\"Events:\")\n end\n \n\n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1473 Name: "SM.LogClass.Apply" SourceCode: "' Name: SM.LogClass.Apply\n'\n' Description: Apply scripts for controls in SM.LogClass.\n'\n' Self: lbxClass\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ------- --------------------------------------------------------------\n\n\nclassDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbxClass: Turn icon on/off. Only turn it off if the field is\n' numeric.\n\nif (SELF.GetName = \"lbxClass\") then\n theIcon = Icon.MakeFromResName(\"Icons.Check\")\n mainList = SELF.GetList\n rowList = mainList.Get(SELF.GetCurrentRow)\n \n if (rowList.Get(0) = \"\") then\n rowList.Set(0, theIcon)\n elseif (rowList.Get(2).IsTypeNumber) then\n rowL ist.Set(0, \"\")\n end\n\n SELF.DefineFromList(mainList)\n\n\n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1474 Name: "SM.LogClass.Click" SourceCode: "' Name: SM.LogClass.Click\n'\n' Description: Click scripts for controls in SM.LogClass.\n'\n' Self: lbtCancel, lbtOK\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nclassDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbtCancel: Close the dialog.\n\nif (SELF.GetName = \"lbtCancel\") then\n classDlg.Close\n\n\n' ---------------------------------------------------------------------\n' lbtOK: Close the dialog.\n\nelseif (SELF.GetName = \"lbtOK\") then\n closeScript = classDlg.GetClose\n classDlg.SetClose(\"\")\n classDlg.Close\n classDlg.SetClose(closeScript)\n \n\n ' ---------------------------------------------------------------------\n\nend\n" ) (Script.1475 Name: "SM.LogClass.Close" SourceCode: "' Name: SM.LogClass.Close\n'\n' Description: Close script for SM.LogClass. Restore original\n' settings.\n'\n' Self: SM.LogClass\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and docu mentation.\n' ---------------------------------------------------------------------\n\n\ntheDict = SELF.GetObjectTag\nAv.Run(\"SM.ManageCtrls\", {\"r\", SELF, {\"lbxClass\"}, theDict})\n" ) (Script.1476 Name: "SM.LogClass.Open" SourceCode: "' Name: SM.LogClass.Open\n'\n' Description: Open script for SM.LogClass. Saves settings in case\n' of Cancel.\n'\n' Self: SM.LogClass\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\n' Make a dictionary of values in case of Cancel.\n\ntheDict = SELF.GetObjectTag\nif (theDict = NIL) then\n theDict = Dictionary.Make(1)\n SELF.SetObjectTag(theDict)\nend\n\nAv.Run(\"SM.ManageCtrls\", {\"s\", SELF, {\"lbxClass\"}, theDict})\n\n\n' Initialize.\n\nSELF.FindByName(\"lbxClass\").Update\nSELF.FindByName(\"lbxClass\").Focus\n" ) (Script.1477 Name: "SM.LogClass.Update" SourceCode: "' Name: SM.LogClass.Update\n'\n' Description: Update scripts for controls in SM.LogClass.\n'\n' Self: lbxClass\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ----- ----------------------------------------------------------------\n\n\nclassDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbxClass: Get rid of interactions that are no longer possible.\n\nif (SELF.GetName = \"lbxClass\") then\n varList = Av.FindDialog(\"SM.Log\").FindByName(\"lbxIndepVars\").GetList\n oldList = SELF.GetList\n newList = List.Make\n keepList = List.Make\n theIcon = Icon.MakeFromResName(\"Icons.Check\")\n \n \n ' Make a list of all possible classes.\n \n f or each aVar in varList\n theField = aVar.Get(1)\n if (theField.Is(Field) and theField.IsTypeNumber) then\n newList.Add({\"\"} + aVar)\n elseif (theField.Is(Field)) then\n newList.Add({theIcon} + aVar)\n end\n end\n \n \n ' Get rid of any classes that are no longer variables.\n\n for each newVar in newList.Clone\n found = FALSE\n for each oldVar in oldList.Clone\n if (newVar.Get(2) = oldVar.Get(2)) then\n keepList.Add(oldVar)\n oldList.RemoveObj(oldVar)\n found = TRUE\n break\n end\n end\n if (found.Not) then\n keepList.Add(newVar)\n end\n end\n \n SELF.DefineFromList(keepList)\n \n\n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1478 Name: "SM.LogEncode.Click" SourceCode: "' Name: SM.LogEncode.Click\n'\n' Description: Click scripts for controls in SM.LogEncode.\n'\n' Self: lbtCancel, lbtHelp, lbtOK, radEffect, radGLM, radRef, radPoly\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notic e is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nencodeDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbtCancel: Close dialog and set object tag to NIL.\n\nif (SELF.GetName = \"lbtCancel\") then\n encodeDlg.SetObjectTag(NIL)\n encodeDlg.Close\n\n\n' ---------------------------------------------------------------------\n' lbtHelp: Open help.\n\nelseif (SELF.GetName = \"lbtHelp\") then\n Av.Run(\"SM.Hel p\", SELF)\n\n\n' ---------------------------------------------------------------------\n' lbtNext: Put the current encoding information into the infoList and\n' then move to the next field (or close the dialog).\n\nelseif (SELF.GetName = \"lbtNext\") then\n parmList = encodeDlg.GetObjectTag\n fieldList = parmList.Get(0)\n fieldDict = parmList.Get(1)\n fieldIndex = SELF.GetObjectTag\n theField = fieldList.Get(fieldIndex)\n \n radEffect = encodeDlg.FindByName(\"radEffect\")\n radGLM = encodeDlg.FindByName(\"radGLM\")\n r adRef = encodeDlg.FindByName(\"radRef\")\n radPoly = encodeDlg.FindByName(\"radPoly\")\n lbxRef = encodeDlg.FindByName(\"lbxRef\")\n txtField = encodeDlg.FindByName(\"txtField\")\n txtTheme = encodeDlg.FindByName(\"txtTheme\")\n \n \n ' Add information to dictionary.\n \n if (radEffect.IsSelected or radRef.IsSelected) then\n selList = lbxRef.GetSelection\n if (selList.IsEmpty) then\n MsgBox.Error(\"You must choose a reference level\", \"Error\")\n return NIL\n else\n level = selList.Get(0)\n end\n els e\n level = NIL\n end\n if (radEffect.IsSelected) then\n fieldDict.Get(theField).Add(\"effect\")\n elseif(radGLM.IsSelected) then\n fieldDict.Get(theField).Add(\"glm\")\n elseif(radRef.IsSelected) then\n fieldDict.Get(theField).Add(\"ref\")\n else\n fieldDict.Get(theField).Add(\"poly\")\n end\n fieldDict.Get(theField).Add(level)\n\n\n ' Move to next field\n \n fieldIndex = fieldIndex + 1\n if (fieldIndex < fieldList.Count) then\n SELF.SetObjectTag(fieldIndex)\n theField = fieldList.Get(fieldIndex)\n t heTheme = fieldDict.Get(theField).Get(0)\n txtTheme.SetLabel(\"Theme:\" ++ theTheme.GetName)\n txtField.SetLabel(\"Field:\" ++ theField.GetAlias)\n lbxRef.DefineFromList(fieldDict.Get(theField).Get(1))\n else\n encodeDlg.Close\n end\n\n\n' ---------------------------------------------------------------------\n\nend\nSELF.BroadcastUpdate\n" ) (Script.1479 Name: "SM.LogEncode.Open" SourceCode: "' Name: SM.LogEncode.Open\n'\n' Description: Open script for SM.LogEncode. Fills the dialog with\n' the information for the first theme/field. This dialog is modal,\n' but it doesn't return anything. Instead, the dictionary passed as\n' second parameter through the object tag has information added to it.\n' The {Theme, levelList} list has {encoding, level} added to the end\n' of it. Encoding is \"effect\", \"glm\", \"ref\", or \"poly\" and level is\n' one of the strings from levelList. If level isn't needed then it\n ' will be set to NIL. If the dialog should not return anything (user\n' cancels) then the object tag is set to NIL.\n'\n' Parameters: (passed as an object tag)\n' (0) List of class fields \n' (1) Dictionary: key=Field, info={theme, levelList}\n'\n' Self: SM.LogEncode\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated doc umentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\n' Get parameters and controls.\n\nparmList = SELF.GetObjectTag\nfieldList = parmList.Get(0)\nfieldDict = parmList.Get(1)\n\nradEffect = SELF.FindByName(\"radEffect\")\ntxtTheme = SELF.FindByName(\"txtTheme\")\ntxtField = SELF.FindByName(\"txtField\")\nlbxRef = SELF.FindByName(\"lbxRef\")\n\n\n' Initialize dialo g.\n\nSELF.FindByName(\"lbtNext\").SetObjectTag(0)\ntheField = fieldList.Get(0)\ntxtTheme.SetLabel(\"Theme:\" ++ fieldDict.Get(theField).Get(0).GetName)\ntxtField.SetLabel(\"Field:\" ++ theField.GetAlias)\nlbxRef.DefineFromList(fieldDict.Get(theField).Get(1))\nradEffect.Select\nradEffect.Click\nlbxRef.Focus\n" ) (Script.1480 Name: "SM.LogEncode.Update" SourceCode: "' Name: SM.LogEncode.Update\n'\n' Description: Update scripts for controls in SM.LogEncode.\n'\n' Self: lbxRef, txtRef\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation. \n' ---------------------------------------------------------------------\n\n\nencodeDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbxRef: Enable/disable based on encoding method chosen.\n\nif (SELF.GetName = \"lbxRef\") then\n radEffect = encodeDlg.FindByName(\"radEffect\")\n radRef = encodeDlg.FindByName(\"radRef\")\n SELF.SetEnabled(radEffect.IsSelected or radRef.IsSelected)\n\n\n' ---------------------------------------------------------------------\n' txtRef: Enable /disable based on encoding method chosen.\n\nelseif (SELF.GetName = \"txtRef\") then\n radEffect = encodeDlg.FindByName(\"radEffect\")\n radRef = encodeDlg.FindByName(\"radRef\")\n SELF.SetEnabled(radEffect.IsSelected or radRef.IsSelected)\n\n\n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1481 Name: "SM.LogInteract.Apply" SourceCode: "' Name: SM.LogInteract.Apply\n'\n' Description: Apply scripts for controls in SM.LogInteract.\n'\n' Self: lbxInt\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' --- ------------------------------------------------------------------\n\n\nintDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbxInt: Turn icon on/off.\n\nif (SELF.GetName = \"lbxInt\") then\n theIcon = Icon.MakeFromResName(\"Icons.Check\")\n mainList = SELF.GetList\n rowList = mainList.Get(SELF.GetCurrentRow)\n \n if (rowList.Get(0) = \"\") then\n rowList.Set(0, theIcon)\n else\n rowList.Set(0, \"\")\n end\n \n SELF.DefineFromList(mainList)\n\n\n' ------------------------ ---------------------------------------------\n\nend\n" ) (Script.1482 Name: "SM.LogInteract.Click" SourceCode: "' Name: SM.LogInteract.Click\n'\n' Description: Click scripts for controls in SM.LogInteract.\n'\n' Self: lbtCancel, lbtOK\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentat ion.\n' ---------------------------------------------------------------------\n\n\nintDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbtCancel: Close Dialog.\n\nif (SELF.GetName = \"lbtCancel\") then\n intDlg.Close\n\n\n' ---------------------------------------------------------------------\n' lbtOK: Close the dialog.\n\nelseif (SELF.GetName = \"lbtOK\") then\n closeScript = intDlg.GetClose\n intDlg.SetClose(\"\")\n intDlg.Close\n intDlg.SetClose(closeScript)\n \n\n' -------- -------------------------------------------------------------\n\nend\n" ) (Script.1483 Name: "SM.LogInteract.Close" SourceCode: "' Name: SM.LogInteract.Close\n'\n' Description: Close script for SM.LogInteract. Restore original\n' settings.\n'\n' Self: SM.LogInteract\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\ntheDict = SELF.GetObjectTag\nSELF.FindByName(\"lbxInt\").DefineFromList(theDict.Get(\"lbxInt\"))\n" ) (Script.1484 Name: "SM.LogInteract.Open" SourceCode: "' Name: SM.LogInteract.Open\n'\n' Description: Open script for SM.LogInteract. Saves settings in \n' case of Cancel.\n'\n' Self: SM.LogInteract\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in th e code and documentation.\n' ---------------------------------------------------------------------\n\n\nlbxInt = SELF.FindByName(\"lbxInt\")\nlbxInt.Update\nlbxInt.Focus\n\n\n' Make a dictionary of values in case of Cancel.\n\ntheDict = SELF.GetObjectTag\nif (theDict = NIL) then\n theDict = Dictionary.Make(1)\n SELF.SetObjectTag(theDict)\nend\n\ntheDict.Set(\"lbxInt\", lbxInt.GetList)\n" ) (Script.1485 Name: "SM.LogInteract.Update" SourceCode: "' Name: SM.LogInteract.Update\n'\n' Description: Update scripts for controls in SM.LogInteract.\n'\n' Self: lbxInt\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' - --------------------------------------------------------------------\n\n\nintDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbxInt: Get rid of interactions that are no longer possible.\n\nif (SELF.GetName = \"lbxInt\") then\n varList = Av.FindDialog(\"SM.Log\").FindByName(\"lbxIndepVars\").GetList\n oldList = SELF.GetList\n newList = List.Make\n keepList = List.Make\n \n \n ' Make a list of all possible interactions.\n \n if (varList.Count > 1) then\n for each n1 in 0..(varList.Count - 2)\n var1 = varList.Get(n1)\n for each n2 in (n1 + 1)..(varList.Count - 1)\n var2 = varList.Get(n2)\n newList.Add({\"\"} + var1 + {\"*\"} + var2)\n end\n end\n \n \n ' Get rid of any interactions that aren't possible anymore.\n \n for each newInt in newList.Clone\n field1 = newInt.Get(2)\n field2 = newInt.Get(5)\n found = FALSE\n for each oldInt in oldList.Clone\n if ((field1 = oldInt.Get(2)) and (field2 = oldInt.Get(5))) then\n ke epList.Add(oldInt)\n oldList.RemoveObj(oldInt)\n found = TRUE\n break\n end\n end\n if (found.Not) then\n keepList.Add(newInt)\n end\n end\n \n SELF.DefineFromList(keepList)\n \n \n ' If there aren't enough variables for interactions, empty the \n ' listbox. \n \n else 'if not (varList.Count > 1)\n SELF.Empty\n \n end\n\n\n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1486 Name: "SM.LogisticModel" SourceCode: "' Name: SM.LogisticModel\n'\n' Description: Creates a new shapefile containing the results of a\n' logisitic regression model.\n'\n' Parameters:\n' (0) View\n' (1) Dictionary: key=String denoting a paramter, info=parameter (Str)\n' (2) Model FileName\n' (3) autoSubmit (Boolean - TRUE if model was automatically submitted\n' to the statistical software)\n'\n' Returns: Theme if successful, NIL otherwise\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\ntheView = SELF.Get(0)\nparmDict = SELF.Get(1)\nmodelFN = SELF.Get(2)\nautoSubmit = SELF.Get(3)\nodbFN = parmDict.Get(\"ODB File\").AsFileName\n\n\n' Create some lists to hold VTabs to be deactivated when script ends\n' and set bailList.\n\njoinList = List.Make\nvtabList = List.Make\nif (autoSubmit) then\n bailList = {\"log\", joinList, vtabList, NIL, NIL, modelFN, odbFN}\nelse\n bailList = {\"log\", joinList, vtabList, NIL, NIL, NIL, NIL}\nend\n\n\n' Check for convergence.\n\nif (parmDict.Get(\"Convergence Status\").Contains (\"0\").Not) then\n theMsg = \"There is a convergence problem with this model. Do you\" ++\n \"want to continue anyway?\" + NL + NL + \"(Open\" ++ \n modelFN.A sString ++ \"in a text editor for further details.)\"\n if (MsgBox.YesNo(theMsg, \"Warning\", FALSE).Not) then\n Av.Run(\"SM.Bail\", bailList)\n return NIL\n end\nend\n\n\n' Get ODB information.\n\ntheODB = ODB.OpenAndInstall(odbFN)\nif (theODB = NIL) then\n Av.Run(\"SM.Bail\", bailList)\n MsgBox.Error(odbFN.AsString ++ \"could not be loaded.\", \"\")\n return NIL\nend\nfieldDict = theODB.Get(0)\nvarDict = theODB.Get(1)\ndummyDict = theODB.Get(2)\nintDict = theODB.Get(3)\ndummyInfoDict = dummyDict.Get(\"info\")\n\n\n' Make a list of all the final model variables and find the intercepts.\n\nidList = {\"ODB File\", \"Method\", \"Link Function\", \"Convergence Status\",\n \"Model Log Likelihood\"}\n\nvarList = List.Make\nintList = List.Make\ncheckVarList = List.Make\ninterceptDict = Dictionary.Make(2)\n\nfor each aKey in parmDict.ReturnKeys\n if (idList.FindByValue(aKey) = -1) then\n parmValue = parmDict.Get(aKey)\n if (parmValue.Contains(\"E\")) then\n parmValue = Av.Run(\"SM.Library\", {\"Sci2Float\", parmValue})\n if (parmValue = NIL) then \n Av.Run(\"SM.Bail\", bailList)\n MsgBox.Error(\"Problem with parameter estimate for\" ++ aKey, \"\")\n return NIL\n else\n parmDict.Set(aKey, parmValue)\n end\n end\n if (aKey.Left(6) = \"interc\") then \n interceptNum = aKey.Right(2)\n if (interceptNum.IsNumber.Not) then\n interceptNum = aKey.Right(1)\n if (interceptNum.IsNumber.Not) then\n interceptNum = \"1\"\n end\n end\n interceptDict.Add(interceptNum.AsNumber, parmDict.Get(aKey))\n elseif ((varDict.Get(aKey) <> NIL) and parmValue.IsNumber and \n (parmValue.AsNumber <> 0)) then\n varList.Add(aKey)\n checkVarList.Add(aKey)\n elseif ((intDict.Get(aKey) <> NIL) and parmValue.IsNumber and\n (parmValue.AsNumber <> 0)) then\n intList.Add(aKey)\n checkVarList.Add(intDict.Get(aKey).Get(0))\n checkVarList.Add(intDict.Get(aKey).Get(1))\n elseif ((varDict.Get(aKey) = NIL) and (intDict.Get(aKey) = NIL)) \n then \n Av.Run(\"SM.Bail\", bailList)\n MsgBox.Error(\"No data for variable\" ++ aKey ++ \"in\" ++ \n odbFN.AsString, \"\")\n return NIL\n end\n end\nend\ncheckVarList.RemoveDuplicates\nnumVars = varList.Count\nintList.Sort(TRUE)\nclassList = List.Make\ndictSize = 1 max (numVars / 2).Floor\nthemeDict = Dictionary.Make(dictSize)\naliasDict = Dictionary.Make(dictSize)\n\nparmList = {theView, checkVarList, themeDict, fieldDict, varDict,\n aliasDict, classList}\nAv.Run(\"SM.GetFields\", parmList)\n\ninterceptList = interceptDict.ReturnKeys\nif (interceptList .Count = 0) then\n interceptList.Add(0)\n interceptDict.Set(0, \"0\")\nend\ninterceptList.Sort(TRUE)\nnumIntercepts = interceptList.Count\n\n\n' Add variable information to the info file.\n\ntempDir = FileName.GetTmpDir\ntempInfoFN = tempDir.MakeTmp(\"xxxinf\", \"txt\")\nFile.Copy(modelFN, tempInfoFN)\ninfoFile = LineFile.Make(tempInfoFN, #FILE_PERM_APPEND)\nif (infoFile = NIL) then\n Av.Run(\"SM.Bail\", bailList)\n MsgBox.Error(\"Error creating\" ++ tempInfoFN.AsString, \"\")\n return NIL\nend\ninfoFile.WriteElt(NL + NL + \"VARIABLE DEFINITIONS\")\n\nfor each aTheme in themeDict.ReturnKeys\n for each aField in themeDict.Get(aTheme)\n varNameList = fieldDict.Get(aField)\n if (classList.Find(aField) = -1) then\n infoFile.WriteElt(NL + varNameList.Get(0))\n infoFile.WriteElt(\" Theme:\" ++ aTheme.GetName)\n if (aField.Is(Field)) then\n infoFile.WriteElt(\" Field:\" ++ aField.GetAlias)\n else\n infoFile.WriteElt(\" Field: Value\")\n end\n else\n varNameList.Sort(TRUE)\n levelList = dummyDict.Get(var NameList.Get(0)).ReturnKeys\n levelList.Sort(TRUE)\n encodeType = dummyInfoDict.Get(varNameList.Get(0)).Get(0)\n refLevel = dummyInfoDict.Get(varNameList.Get(0)).Get(1)\n infoFile.WriteElt(NL + \"Dummy variables for:\")\n infoFile.WriteElt(\" Theme:\" ++ aTheme.GetName)\n infoFile.WriteElt(\" Field:\" ++ aField.GetAlias)\n infoFile.WriteElt(\" Encoding:\" ++ encodeType)\n if (refLevel <> NIL) then\n infoFile.WriteElt(\" Reference Level:\" ++ refLevel)\n end\n infoStr = NL + \"Level\" + String.MakeBuffer(15)\n for each varName in varNameList\n bufferStr = String.MakeBuffer(10 - varName.Count)\n infoStr = infoStr + varName + bufferStr\n end\n infoFile.WriteElt(infoStr)\n for each aLevel in levelList\n infoStr = aLevel + String.MakeBuffer(20 - aLevel.Count)\n for each varName in varNameList\n theValue = dummyDict.Get(varName).Get(aLevel)\n bufferStr = String.MakeBuffer(10 - theValue.Count)\n infoStr = infoStr + theValue + BufferStr\n end\n infoFile.WriteElt(infoStr)\n end 'for each aLevel\n end 'if-else varNameList.Count\n end 'for each aField\nend 'for each aTheme\n\n\nintList.Sort(TRUE)\nfor each varName in intList\n infoList = intDict.Get(varName)\n infoFile.WriteElt(NL + varName)\n infoFile.WriteElt(\" \" + infoList.Get(0) ++ \"*\" ++ infoList.Get(1))\nend\ninfoFile.Close\n\n\n' Get the red color ramp for the legend.\n\nfor each aRamp in SymbolList.GetPreDefined(#SYMLIST_TYPE_COLORRAMP)\n if (aRamp.GetName = \"Red Monochromatic\") then \n redColorRamp = aRamp\n break\n end\nend\n\n\n' Check number of polygon and grid themes.\n\nthemeList = themeDict.ReturnKeys\n\nif (themeList.Count = 0) then\n Av.Run(\"SM.Bail\", bailList)\n MsgBox.Error(\"This model only has an intercept. No model output\" ++\n \"will be computed.\", \"\")\n return NIL\nend\n\npolyThemeList = List.Make\ngridThemeList = List.Make\ngridThemeNameList = List.Make\n\nfor each aTheme in themeDict.ReturnKeys\n if (aTheme.Is(FTheme)) then\n polyThemeList.Add(aThem e)\n elseif (aTheme.Is(GTheme)) then\n gridThemeList.Add(aTheme)\n gridThemeNameList.Add(\"Same as\" ++ aTheme.GetName)\n end\nend\n\n\n' If there are any grids, then the output will be a grid.\n\nif (gridThemeList.Count > 0) then\n\n\n ' Save the old GridVerifyEnum and set it to automatically overwrite.\n \n oldGVE = Grid.GetVerify\n Grid.SetVerify(#GRID_VERIFY_OFF)\n bailList.Set(3, oldGVE)\n\n \n ' Find out where to save the final grid.\n\n if (autoSubmit) then\n gridFN = FileName.GetCWD.MakeTmp(\"logit\", \"\")\n else\n gridFNStr = modelFN.AsString\n gridFN = gridFNStr.Left(gridFNStr.IndexOf(\".\")).AsFileName\n end\n theTitle = \"Save output grid as...\"\n gridFN = SourceManager.PutDataSet(Grid, theTitle, gridFN, TRUE)\n if (gridFN = NIL) then\n Av.Run(\"SM.Bail\", bailList)\n return NIL\n end\n gridDir = gridFN.Clone\n gridDir.StripFile\n\n\n ' Find out if user wants to keep intermediate grids.\n \n theMsg = \"Do you want intermediate grids saved and added to the\" ++\n \"view? This will take up a lot of s pace.\"\n keepGrids = MsgBox.YesNo(theMsg, \"Intermediate Grids\", FALSE)\n\n \n ' Get cell size and extent. Can't use current analysis environment\n ' because of a bug with AnalysisEnvironment.GetCellSize request.\n \n aGrid = gridThemeList.Get(0).GetGrid\n maxCellSize = aGrid.GetCellSize\n minCellSize = maxCellSize\n extent = aGrid.GetExtent\n for each aTheme in gridThemeList\n aGrid = aTheme.GetGrid\n aCellSize = aGrid.GetCellSize\n if (aCellSize > maxCellSize) then\n maxCellSize = aCellSize\n e lseif (aCellSize < minCellSize) then\n minCellSize = aCellSize\n end\n extent = extent.IntersectWith(aGrid.GetExtent)\n end\n for each aTheme in polyThemeList\n extent = extent.IntersectWith(aTheme.ReturnExtent)\n end\n\n gridThemeNameList.Insert(\"Minimum cell size\")\n gridThemeNameList.Insert(\"Maximum cell size\")\n gridThemeNameList.Add(\"Other\")\n choiceStr = MsgBox.ListAsString(gridThemeNameList,\n \"Choose a cell size for the final grid:\", \"Cell Size\")\n if (choiceStr = NIL) then\n Av.Run(\"SM.Bail\", bailList)\n return NIL\n end\n if (choiceStr.Contains(\"Same as\")) then\n themeName = choiceStr.Right(choiceStr.Count - 8)\n cellSize = theView.FindTheme(themeName).GetGrid.GetCellSize\n elseif (choiceStr.Contains(\"Maximum\")) then\n cellSize = maxCellSize\n elseif (choiceStr.Contains(\"Minimum\")) then\n cellSize = minCellSize\n else\n flag = TRUE\n while (flag)\n dStr = maxCellSize.AsString\n cSize = MsgBox.Input(\"Cell size:\", \"Custom Cell Size\", dStr)\n if (cSize = NIL) then\n Av.Run(\"SM.Bail\", bailList)\n return NIL\n elseif (cSize.IsNumber) then\n cellSize = cSize.AsNumber\n flag = FALSE\n end\n end\n end\n gridSize = {cellSize, extent}\n\n oldAE = theView.GetExtension(AnalysisEnvironment)\n newAE = oldAE.Clone\n theView.SetExtension(newAE)\n newAE.Activate\n aeList = {theView, oldAE}\n bailList.Set(4, aeList)\n \n\n ' Convert grids.\n \n parmList = {\"log\", theView, keepGrids, varList.Count, themeDict,\n fieldDict, classList, ext ent, cellSize, intDict, intList,\n dummyDict, joinList, vtabList}\n gridDict = Av.Run(\"SM.ConvertGrids\", parmList)\n if (gridDict = NIL) then\n Av.Run(\"SM.Bail\", bailList)\n return NIL\n end\n \n\n ' Make a prediction grid for each intercept. Use a delayed run for\n ' Bail so that it will run even if the user stops the process.\n \n Av.Run(\"SM.Status.SetMessage\", \"Creating the prediction grids...\")\n Av.Run(\"SM.Status.SetPercent\", NIL)\n Av.DelayedRun(\"SM.Bail\", bailList, 0)\n for each anIntercept in interceptList\n interceptGrid = interceptDict.Get(anIntercept).AsNumber.AsGrid\n \n \n ' Create a script that will do the map algebra for the logit.\n \n logitStr = \"gridDict = SELF.Get(0)\" + NL + \n \"intGrid = SELF.Get(1)\" + NL + \"newGrid = intGrid\"\n for each varName in (varList + intList)\n logitStr = logitStr + \" + (\" + parmDict.Get(varName) +\n \".AsGrid * gridDict.Get(\" + varName.Quote + \"))\"\n end\n logitStr = logitStr + NL + \"newGrid.GetStatistics\" + NL +\n \"if (newGrid.HasError) then\" + NL +\n \" return NIL\" + NL + \"else\" + NL + \n \" return newGrid\" + NL + \"end\"\n logitScript = Script.Make(logitStr)\n if (logitScript.HasError) then\n MsgBox.Error(\"Error creating logit grid.\", \"\")\n return NIL\n end\n logitGrid = logitScript.DoIt({gridDict, interceptGrid})\n if (logitGrid.Is(Grid).Not) then\n MsgBox.Error(\"Error creating logit grid.\", \"\")\n return NIL\n end\n if (keepGrids) then\n logitTheme = GTheme.Make(logitGrid)\n logitName = \"Logit\"\n if (numIntercepts > 1) then\n logitName = logitName ++ \"Intercept\" ++ anIntercept.AsString\n end\n logitTheme.SetName(logitName)\n theView.AddTheme(logitTheme)\n Av.GetProject.SetModified(TRUE)\n end\n\n \n ' Compute the prediction grid.\n \n predGrid = 1.AsGrid / (1.AsGrid + logitGrid.Negate.Exp)\n predGrid.GetStatistics\n if (predGrid.HasError) then\n MsgBox.Error(\"Error creating prediction grid.\", \"\")\n return NIL\n end\n if (numIntercepts = 1) then\n if (predGrid.SaveDataSet(gridFN).Not) then\n theMsg = \"Unable to save prediction grid to\" ++ gridFN.AsString\n MsgBox.Warning(theMsg, \"\")\n else\n infoFN = gridFN.Clone\n infoFN.SetExtension(\"smg\")\n File.Copy(tempInfoFN, infoFN)\n predName = gridFN.GetBaseName\n end\n else\n newFN = (gridFN.AsString + \"_\" + anIntercept.AsString).AsFileName\n if (File.Exists(newFN)) then\n theTitle = \"Save intercept\" ++ anIntercept.AsString ++\n \"grid as...\"\n newFN = SourceManager.PutDataSet(Grid, theTitle, newFN, TRUE)\n end\n if (newFN = NIL) then\n return NIL\n end\n if (predGrid.SaveDataSet(newFN).Not) then\n theMsg = \"Unable to save prediction grid to\" ++ newFN.AsString\n MsgBox.Warning(theMsg, \"\")\n else\n infoFN = newFN.Clone\n infoFN.SetExtension(\"smg\")\n File.Copy(tempInfoFN, infoFN)\n end\n predName = gri dFN.GetBaseName\n end\n\n predTheme = GTheme.Make(predGrid)\n if (numIntercepts > 1) then\n predName = predName ++ \"Intercept\" ++ anIntercept.AsString\n end\n predTheme.SetName(predName)\n\n\n ' Modify the legend so it has 10 classes and is a red colorramp.\n \n theLegend = predTheme.GetLegend\n theLegend.SetLegendType(#LEGEND_TYPE_COLOR)\n theLegend.Interval(predTheme, \"Value\", 10)\n num = 0.0\n theClasses = theLegend.GetClassifications\n for each n in 0..9\n theClasses.Set(n , Classification.Make(num, (num + 0.1)))\n num = num + 0.1\n end\n theLegend.GetSymbols.RampSavedColors(redColorRamp)\n theLegend.GetNullSymbol.GetColor.SetTransparent(TRUE)\n\n \n ' Add the Theme to the View.\n\n theView.AddTheme(predTheme)\n Av.GetProject.SetModified(TRUE)\n if ((numIntercepts = 1) or (anIntercept = 1)) then\n finalTheme = predTheme\n end\n \n end 'for each anIntercept\n\n \n' Polygon output.\n\nelse 'if gridThemeList.Count = 0\n\n\n ' Get the name for the new shapefile .\n\n if (autoSubmit) then\n shpFN = FileName.GetCWD.MakeTmp(\"logit\", \"shp\")\n else \n shpFN = modelFN.Clone\n shpFN.SetExtension(\"shp\")\n end\n theTitle = \"Save output shapefile as...\"\n shpFN = SourceManager.PutDataSet(FTab, theTitle, shpFN, TRUE)\n if (shpFN = NIL) then\n Av.Run(\"SM.Bail\", bailList)\n return NIL \n end\n\n \n ' Make the new theme by intersection.\n\n parmList = {theView, shpFN, themeDict.Clone, aliasDict}\n newTheme = Av.Run(\"SM.Intersect\", parmList)\n if (newTheme = NIL) then \n Av.Run(\"SM.Bail\", bailList)\n MsgBox.Error(\"Theme intersection failed.\", \"\")\n return NIL\n end\n newFTab = newTheme.GetFTab\n newFTab.SetEditable(TRUE)\n Av.Run(\"SM.Status.SetMessage\", \"Calculating predictions...\")\n Av.Run(\"SM.Status.SetPercent\", NIL)\n \n \n ' Call Bail with a delayed run.\n \n Av.DelayedRun(\"SM.Bail\", bailList, 0)\n \n\n ' Create dummy variables and store info for calculations.\n\n classDict = Dictionary.Make(numVars)\n for each varName in varList\n theField = varDict.Get(varName ).Get(1)\n varNameList = fieldDict.Get(theField)\n if (varNameList.Count > 1) then\n baseField = newFTab.FindField(aliasDict.Get(theField))\n if (classDict.Get(baseField) = NIL) then\n fieldList = List.Make\n nameList = List.Make\n for each dummyName in varNameList\n fieldList.Add(Field.Make(dummyName, #FIELD_FLOAT, 4, 0))\n nameList.Add(dummyName)\n end\n newFTab.AddFields(fieldList)\n classDict.Add(baseField, {nameList, fieldList})\n end 'if (classDict.Get...\n end 'if (varNameList.Count...\n end 'for each varName\n\n\n ' Compute values for class variables.\n \n numRecs = newFTab.GetNumRecords\n count = 0\n Av.ShowMsg(\"Calculating dummy variables...\")\n Av.ShowStopButton\n \n for each aRec in newFTab\n count = count + 1\n if (Av.SetStatus(count / numRecs * 100) = NIL) then\n return NIL\n end\n for each baseField in classDict.ReturnKeys\n theLevel = newFTab.ReturnValueString(baseField, aRec)\n nameList = classDict.Get(bas eField).Get(0)\n fieldList = classDict.Get(baseField).Get(1)\n for each n in 0..(nameList.Count - 1)\n dummyName = nameList.Get(n)\n dummyField = fieldList.Get(n)\n dummyValue = dummyDict.Get(dummyName).Get(theLevel)\n if (dummyValue <> NIL) then\n newFTab.SetValueNumber(dummyField, aRec, dummyValue.AsNumber)\n else\n newFTab.SetValueNumber(dummyField, aRec, Number.MakeNull)\n end\n end 'for each n\n end 'for each baseField\n end 'for each aR ec\n\n\n ' Create interaction variables.\n \n numIntVars = intList.Count\n count = 0\n Av.ShowMsg(\"Calculating interaction variables...\")\n Av.ShowStopButton\n \n for each varName in intList\n if (Av.SetStatus(count / numIntVars * 100) = NIL) then\n return NIL\n end\n newFTab.GetSelection.ClearAll\n newField = Field.Make(varName, #FIELD_DECIMAL, 16, 4)\n newFTab.AddFields({newField})\n intVarList = intDict.Get(varName)\n calcStr = \"[\" + intVarList.Get(0) + \"] * [\" + intVarList.Get(1) + \n \"]\"\n newFTab.Calculate(calcStr, newField)\n end\n\n\n ' Make a prediction field for each intercept.\n\n for each anIntercept in interceptList\n \n \n ' Make a calculation string.\n \n logitStr = interceptDict.Get(anIntercept).AsString\n for each varName in (varList + intList)\n logitStr = logitStr ++ \"+ ((\" + parmDict.Get(varName) + \")*[\" +\n varName + \"])\"\n end\n \n calcStr = \"1/(1+(\" + Number.GetEuler.AsString + \"^(-(\" + \n logitStr + \"))))\"\n\n \n ' Calculate the prediction.\n \n if (numIntercepts = 1) then\n predFieldName = \"Prediction\"\n else\n predFieldName = \"Prediction\" + anIntercept.AsString\n end\n predField = Field.Make(predFieldName, #FIELD_DECIMAL, 16, 8)\n newFTab.AddFields({predField})\n if (newFTab.Calculate(calcStr, predField).Not) then\n newFTab.SetEditable(FALSE)\n MsgBox.Error(\"Prediction could not be calculated.\", \"\")\n return NIL\n end\n end\n\n newFTab.SetEditable(FALSE)\n\n\n ' Modify the legend so it has 10 classes and is a red colorramp.\n \n theLegend = newTheme.GetLegend\n theLegend.SetLegendType(#LEGEND_TYPE_COLOR)\n if (numIntercepts = 1) then\n theLegend.Interval(newTheme, \"Prediction\", 10)\n else\n theLegend.Interval(newTheme, \"Prediction1\", 10)\n end\n num = 0.0\n theClasses = theLegend.GetClassifications\n for each n in 0..9\n theClasses.Set(n, Classification.Make(num, (num + 0.1)))\n num = num + 0.1\n end\n theLegend.GetSymbols.RampSavedColors(redColorRamp)\n theLegend.GetNullSy mbol.GetColor.SetTransparent(TRUE)\n\n\n ' Add the Theme to the View.\n \n newTheme.SetName(shpFN.GetBaseName)\n theView.AddTheme(newTheme)\n Av.GetProject.SetModified(TRUE)\n finalTheme = newTheme\n\n\n ' Rename the info file.\n\n infoFN = shpFN.Clone\n infoFN.SetExtension(\"sms\")\n File.Copy(tempInfoFN, infoFN)\n\nend 'if-else gridOut\n\n\n' Return.\n\nreturn finalTheme\n" ) (Script.1487 Name: "SM.LogModel.Apply" SourceCode: "' Name: SM.LogModel.Apply\n'\n' Description: Apply scripts for controls in SM.LogModel.\n'\n' Self: lbxIncludeVars, lbxIndepVars\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and docu mentation.\n' ---------------------------------------------------------------------\n\n\nmodDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbxIncludeVars: Run click script for lbtRemove.\n\nif (SELF.GetName = \"lbxIncludeVars\") then\n modDlg.FindByName(\"lbtRemove\").Click\n\n\n' ---------------------------------------------------------------------\n' lbxIndepVars: Run click script for lbtAdd.\n\nelseif (SELF.GetName = \"lbxIndepVars\") then\n modDlg.FindByName(\"lbtAdd\").C lick\n\n\n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1488 Name: "SM.LogModel.Click" SourceCode: "' Name: SM.LogModel.Click\n'\n' Description: Click scripts for controls in SM.LogModel.\n'\n' Self: chkDefault, lbtAdd, lbtCancel, lbtHelp, lbtOK, lbtRemove,\n' radNone, radBackward, radForward, radStepwise\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nmodDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbtAdd: Add variables to the include list and remove them from the \n' variable list.\n\nif (SELF.GetName = \"lbtAdd\") then\n lbxIncludeVars = modDlg.FindByName(\"lbxIncludeVars\")\n lbxIndepVars = modDlg.FindByName(\"lbxIndepVars\")\n if (lbxIndepVars.HasS election) then\n includeList = lbxIncludeVars.GetList\n flag = lbxIndepVars.GoFirstSelected\n while (flag)\n theTheme = lbxIndepVars.GetCurrentValue\n lbxIndepVars.GoRowColumn(lbxIndepVars.GetCurrentRow, 1)\n theField = lbxIndepVars.GetCurrentValue\n includeList.Add({theTheme, theField})\n flag = lbxIndepVars.GoNextSelected\n end\n includeList = Av.Run(\"SM.Library\", {\"Sort2\", includeList})\n lbxIncludeVars.DefineFromList(includeList)\n end\n\n\n' -------------------------------- -------------------------------------\n' lbtCancel: Close the dialog.\n\nelseif (SELF.GetName = \"lbtCancel\") then\n modDlg.Close\n\n\n' ---------------------------------------------------------------------\n' lbtHelp: Open help.\n\nelseif (SELF.GetName = \"lbtHelp\") then\n Av.Run(\"SM.Help\", SELF)\n\n \n' ---------------------------------------------------------------------\n' lbtOK: Check to make sure values are okay settings.\n\nelseif (SELF.GetName = \"lbtOK\") then\n\n\n ' Create error messages.\n \n bsMsg = \"The minimu m number of variables in the final model must\" ++\n \"be between zero and the number of independent variables,\" ++\n \"inclusive.\"\n fsMsg = \"The maximum number of variables in the final model must\" ++\n \"be between zero and the number of independent variables,\" ++\n \"inclusive.\"\n msMsg = \"The maximum number of times a variable can be added or\" ++\n \"removed from the model must be greater than 0.\"\n sleMsg = \"The significance level for adding variables must be\" ++\n \"between 0 and 1.\"\n slsMsg = \"The significance level for removing variables must be\" ++\n \"between 0 and 1.\"\n miMsg = \"The maximum number of iterations must be greater than 0.\"\n \n \n ' If not using default parameter values, check to make sure entered\n ' values are valid.\n \n if (modDlg.FindByName(\"chkDefault\").IsSelected.Not) then\n numVars = modDlg.FindByName(\"lbxIndepVars\").GetRowCount + \n modDlg.FindByName(\"lbxIncludeVars\").GetRowCount\n \n \n ' Make sure BackStop is okay.\n \n txlBackStop = modDlg.FindByName(\"tx lBackStop\")\n if (txlBackStop.IsEnabled and txlBackStop.GetText.IsNull.Not) then\n backStop = txlBackStop.GetText.AsNumber\n if ((backStop < 0) or (backStop > numVars)) then\n MsgBox.Error(bsMsg, \"\")\n txlBackStop.Focus\n return NIL\n end\n end\n \n \n ' Make sure ForStop is okay.\n \n txlForStop = modDlg.FindByName(\"txlForStop\")\n if (txlForStop.IsEnabled and txlForStop.GetText.IsNull.Not) then\n forStop = txlForStop.GetText.AsNumber\n if ((forStop < 0) or (forStop > numVars)) then\n MsgBox.Error(fsMsg, \"\")\n txlForStop.Focus\n return NIL\n end\n end\n \n \n ' Make sure MaxSteps is okay.\n \n txlMaxSteps = modDlg.FindByName(\"txlMaxSteps\")\n if (txlMaxSteps.IsEnabled and txlMaxSteps.GetText.IsNull.Not and\n (txlMaxSteps.GetText.AsNumber < 1)) then\n MsgBox.Error(msMsg, \"\")\n txlMaxSteps.Focus\n return NIL\n end\n \n \n ' Make sure SLEntry is okay.\n \n txlSLEntry = modDlg.FindByName(\"txlSLEntry\")\n if (tx lSLEntry.IsEnabled and txlSLEntry.GetText.IsNull.Not) then\n slEntry = txlSLEntry.GetText.AsNumber\n if ((slEntry < 0) or (slEntry > 1)) then\n MsgBox.Error(sleMsg, \"\")\n txlSLEntry.Focus\n return NIL\n end\n end\n \n \n ' Make sure SLStay is okay.\n \n txlSLStay = modDlg.FindByName(\"txlSLStay\")\n if (txlSLStay.IsEnabled and txlSLStay.GetText.IsNull.Not) then\n slStay = txlSLStay.GetText.AsNumber\n if ((slStay < 0) or (slStay > 1)) then\n MsgBox.Error(sl sMsg, \"\")\n txlSLStay.Focus\n return NIL\n end\n end\n \n \n ' Make sure MaxIter is okay.\n \n txlMaxIter = modDlg.FindByName(\"txlMaxIter\")\n if (txlMaxIter.IsEnabled and txlMaxIter.GetText.IsNull.Not and\n (txlMaxIter.GetText.AsNumber < 1)) then\n MsgBox.Error(miMsg, \"\")\n txlMaxIter.Focus\n return NIL\n end\n \n end\n \n \n ' If got this far, everything is okay, so save radio button state\n ' and close the dialog.\n \n mainDict = Av.FindDialog(\"SM.Log\").GetObjectT ag\n Av.Run(\"SM.ManageCtrls\", {\"s\", modDlg, {\"cpaModel\"}, mainDict})\n \n closeScript = modDlg.GetClose\n modDlg.SetClose(\"\")\n modDlg.Close\n modDlg.SetClose(closeScript)\n \n\n' ---------------------------------------------------------------------\n' lbtRemove: Remove variables from the include list and add them to\n' the variable list.\n\nelseif (SELF.GetName = \"lbtRemove\") then\n lbxIncludeVars = modDlg.FindByName(\"lbxIncludeVars\")\n lbxIndepVars = modDlg.FindByName(\"lbxIndepVars\")\n if (lbxIncludeVars.HasSe lection) then\n lbxIncludeVars.GoFirstSelected\n rowList = {lbxIncludeVars.GetCurrentRow}\n while (lbxIncludeVars.GoNextSelected)\n rowList.Add(lbxIncludeVars.GetCurrentRow)\n end\n rowList.RemoveDuplicates\n rowList.Sort(FALSE)\n for each rowNum in rowList\n lbxIncludeVars.GoRow(rowNum)\n lbxIncludeVars.DeleteRows(1)\n end\n end\n\n\n' ---------------------------------------------------------------------\n\nend\nSELF.BroadcastUpdate\n" ) (Script.1489 Name: "SM.LogModel.Close" SourceCode: "' Name: SM.LogModel.Close\n'\n' Description: Close script for SM.LogModel. Restore original\n' settings.\n'\n' Self: SM.LogModel\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and docu mentation.\n' ---------------------------------------------------------------------\n\n\ntheDict = SELF.GetObjectTag\nctrlList = {\"chkDefault\", \"chkNoInt\", \"lbxIncludeVars\", \"txlBackStop\",\n \"txlForStop\", \"txlMaxIter\", \"txlMaxSteps\", \"txlSLEntry\",\n \"txlSLStay\"}\nAv.Run(\"SM.ManageCtrls\", {\"r\", SELF, ctrlList, theDict})\n" ) (Script.1490 Name: "SM.LogModel.Open" SourceCode: "' Name: SM.LogModel.Open\n'\n' Description: Open script for SM.LogModel. Saves settings in case\n' of Cancel.\n'\n' Self: SM.LogModel\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\n' Initialize radio buttons.\n\nmainDict = Av.FindDialog(\"SM.Log\").GetObjectTag\nAv.Run(\"SM.ManageCtrls\", {\"r\", SELF, {\"cpaModel\"}, mainDict})\n\n\n' Make a dictionary of values in case of Cancel.\n\ntheDict = SELF.GetObjectTag\nif (theDict = NIL) then\n theDict = Dictionary.Make(6)\n SELF.SetObjectTag(theDict)\nend\n\nctrlList = {\"chkDefault\", \"chkNoInt\", \"lbxIncludeVars\", \"txlBackStop\",\n \"txlForStop\", \"txlMaxIter\", \"tx lMaxSteps\", \"txlSLEntry\",\n \"txlSLStay\"}\nAv.Run(\"SM.ManageCtrls\", {\"s\", SELF, ctrlList, theDict})\n\n\n' Fill the independent variable list and make sure include list is OK\n' by running the Update.\n\nSELF.FindByName(\"cpaVars\").Update\nSELF.FindByName(\"lbxIncludeVars\").Update\n\nSELF.FindByName(\"lbxIndepVars\").Focus\n" ) (Script.1491 Name: "SM.LogModel.Update" SourceCode: "' Name: SM.LogModel.Update\n'\n' Description: Update scripts for controls in SM.LogModel.\n'\n' Self: cpaDefault, cpaVars, lbxIncludeVars\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nmodDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' cpaDefault: Enable/disable controls based on which selection\n' method is selected and whether or not user wants to use default\n' settings.\n\nif (SELF.GetName = \"cpaDefault\") then\n\n if (modDlg.FindByName(\"chkDefault\").IsSelected) then\n SELF.SetEnabled(FALSE)\n \n else\n SELF.SetEnabled(TRUE)\n \n \n ' Find out which selection method is selected.\n \n isBack = modDlg.FindByName(\"radBackward\").IsSelected\n isFor = modDlg.FindByName(\"radForward\").IsSelected\n isStep = modDlg.FindByName(\"radStepwise\").IsSelected\n \n \n ' Enable/disable controls.\n \n modDlg.FindByName(\"txlBackStop\").SetEnabled(isBack)\n modDlg.FindByName(\"txtBackStop\").SetEnabled(isBack)\n modDlg.FindByName(\"txlForStop\").SetEnabled(isFor)\n modDlg.FindByName(\"txtForStop\").SetEnabled(isFor)\n modDlg.FindByName(\"txlMaxSteps\" ).SetEnabled(isStep)\n modDlg.FindByName(\"txtMaxSteps\").SetEnabled(isStep)\n modDlg.FindByName(\"txlSLEntry\").SetEnabled(isFor or isStep)\n modDlg.FindByName(\"txtSLEntry\").SetEnabled(isFor or isStep)\n modDlg.FindByName(\"txlSLStay\").SetEnabled(isBack or isStep)\n modDlg.FindByName(\"txtSLStay\").SetEnabled(isBack or isStep)\n \n end\n\n\n' ---------------------------------------------------------------------\n' cpaVars: Enable/disable Variables control panel based on selection\n' method.\n\nelseif (SELF.Ge tName = \"cpaVars\") then\n SELF.SetEnabled(modDlg.FindByName(\"radNone\").IsSelected.Not)\n\n\n' ---------------------------------------------------------------------\n' lbxIncludeVars: Synchronize independent variable list and include\n' variable list.\n\nelseif (SELF.GetName = \"lbxIncludeVars\") then\n varList = Av.FindDialog(\"SM.Log\").FindByName(\"lbxIndepVars\").GetList\n includeList = SELF.GetList\n \n for each includeVar in includeList.Clone\n found = FALSE\n for each indepVar in varList.Clone\n if ((incl udeVar.Get(0) = indepVar.Get(0)) and\n (includeVar.Get(1) = indepVar.Get(1))) then\n varList.RemoveObj(indepVar)\n found = TRUE\n break\n end\n end\n if (found.Not) then\n includeList.RemoveObj(includeVar)\n end\n end\n \n modDlg.FindByName(\"lbxIndepVars\").DefineFromList(varList)\n SELF.DefineFromList(includeList)\n\n\n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1492 Name: "SM.LogOutput.Click" SourceCode: "' Name: SM.LogOutput.Click\n'\n' Description: Click scripts for controls in SM.LogOutput.\n'\n' Self: chkCLOdds, chkCLParm, lbtCancel, lbtHelp, lbtOK\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\noutDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbtCancel: Close the dialog.\n\nif (SELF.GetName = \"lbtCancel\") then\n outDlg.Close\n\n \n' ---------------------------------------------------------------------\n' lbtHelp: Open help.\n\nelseif (SELF.GetName = \"lbtHelp\") then\n Av.Run(\"SM.Help\", SELF)\n\n\n' ------------------------------------------------------ ---------------\n' lbtOK: Check to make sure entries in the dialog are valid. If they\n' are, dialog closes.\n\nelseif (SELF.GetName = \"lbtOK\") then\n\n alphaWarning = \"Alpha will default to 0.05.\"\n alphaError = \"Alpha must be between 0 and 1.\"\n \n txlAlpha = outDlg.FindByName(\"txlAlpha\")\n if (txlAlpha.IsEnabled) then\n alpha = txlAlpha.GetText.AsNumber\n if (alpha.IsNull) then\n MsgBox.Warning(alphaWarning, \"\")\n elseif ((alpha <= 0) or (alpha >= 1)) then\n MsgBox.Error(alphaError, \"\")\n txlAlpha.Focus\n return NIL\n end\n end\n \n closeScript = outDlg.GetClose\n outDlg.SetClose(\"\")\n outDlg.Close\n outDlg.SetClose(closeScript)\n \n\n' ---------------------------------------------------------------------\n\nend\nSELF.BroadcastUpdate\n" ) (Script.1493 Name: "SM.LogOutput.Close" SourceCode: "' Name: SM.LogOutput.Close\n'\n' Description: Close script for SM.LogOutput. Restore original\n' settings.\n'\n' Self: SM.LogOutput\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and d ocumentation.\n' ---------------------------------------------------------------------\n\n\ntheDict = SELF.GetObjectTag\nctrlList = {\"chkCLParm\", \"chkCLOdds\", \"chkCorrb\", \"chkCovb\", \n \"chkDetails\", \"chkInfluence\", \"chkLackFit\", \"chkRSquare\", \n \"chkSimple\", \"txlAlpha\"}\nAv.Run(\"SM.ManageCtrls\", {\"r\", SELF, ctrlList, theDict})\n" ) (Script.1494 Name: "SM.LogOutput.Open" SourceCode: "' Name: SM.LogOutput.Open\n'\n' Description: Open script for SM.LogOutput. Saves settings in case\n' of Cancel.\n'\n' Self: SM.LogOutput\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\n' Store current settings in case of Cancel.\n\ntheDict = SELF.GetObjectTag\nif (theDict = NIL) then\n theDict = Dictionary.Make(10)\n SELF.SetObjectTag(theDict)\nend\n\nctrlList = {\"chkCLParm\", \"chkCLOdds\", \"chkCorrb\", \"chkCovb\", \n \"chkDetails\", \"chkInfluence\", \"chkLackFit\", \"chkRSquare\", \n \"chkSimple\", \"txlAlpha\"}\nAv.Run(\"SM.ManageCtrls\", {\"s\", SELF, ctrlList, theDict})\n" ) (Script.1495 Name: "SM.LogOutput.Update" SourceCode: "' Name: SM.LogOutput.Update\n'\n' Description: Update scripts for controls in SM.LogOutput.\n'\n' Self: txlAlpha\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' --- ------------------------------------------------------------------\n\n\noutDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' txlAlpha: Enable/disable the confidence interval Alpha textline\n' based on whether confidence intervals are chosen for output.\n\nif (SELF.GetName = \"txlAlpha\") then\n if (outDlg.FindByName(\"chkCLParm\").IsSelected or \n outDlg.FindByName(\"chkCLOdds\").IsSelected) then\n SELF.SetEnabled(TRUE)\n else\n SELF.SetEnabled(FALSE)\n end\n \n\n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1496 Name: "SM.LogParms.Changed" SourceCode: "' Name: SM.LogParms.Changed\n'\n' Description: Changed scripts for controls in SM.LogParms and\n' SM.LogParmsAdd.\n'\n' Self: txlIntercept (SM.LogParms), txlParm (SM.LogParmsAdd)\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this co pyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nSELF.BroadcastUpdate\n" ) (Script.1497 Name: "SM.LogParms.Click" SourceCode: "' Name: SM.LogParms.Click\n'\n' Description: Click scripts for controls in SM.LogParms.\n'\n' Self: chkIntercept, lbtAdd, lbtCancel, lbtDelete, lbtHelp, lbtInt,\n' lbtOK\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' ---------------------------------------------------------------------\n\n\nparmsDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' chkIntercept: Enable/disable the Intercept textline.\n\nif (SELF.GetName = \"chkIntercept\") then\n parmsDlg.FindByName(\"txlIntercept\").SetEnabled(SELF.IsSelected)\n SELF.BroadcastUpdate\n\n\n' ---------------------------------------------------------------------\n' lbtAdd: Open SM.LogParms Add dialog.\n\nelseif (SELF.GetName = \"lbtAdd\") then\n Av.FindDialog(\"SM.LogParmsAdd\").Open\n\n\n' ---------------------------------------------------------------------\n' lbtCancel: Close the SM.LogParms dialog.\n\nelseif (SELF.GetName = \"lbtCancel\") then\n parmsDlg.Close\n parmsDlg.FindByName(\"lbxParms\").Empty\n Av.FindDialog(\"SM.LogParmsInt\").FindByName(\"lbxInt\").Empty\n Av.FindDialog(\"SM.LogParmsAdd\").FindByName(\"cbxTheme\").Empty\n Av.FindDialog(\"SM.LogParmsAdd\").FindByName(\"cbxField\").Empty\n\n\n' -------------- -------------------------------------------------------\n' lbtDelete: Deletes the selected parameters.\n\nelseif (SELF.GetName = \"lbtDelete\") then\n lbxParms = parmsDlg.FindByName(\"lbxParms\")\n if (lbxParms.HasSelection) then\n lbxParms.GoFirstSelected\n rowList = {lbxParms.GetCurrentRow}\n while (lbxParms.GoNextSelected)\n rowList.Add(lbxParms.GetCurrentRow)\n end\n rowList.RemoveDuplicates\n rowList.Sort(FALSE)\n for each aRow in rowList\n lbxParms.GoRow(aRow)\n lbxParms.DeleteRows (1)\n end\n end\n lbxParms.BroadcastUpdate\n\n\n' ---------------------------------------------------------------------\n' lbtHelp: Open help.\n\nelseif (SELF.GetName = \"lbtHelp\") then\n Av.Run(\"SM.Help\", SELF)\n\n\n' ---------------------------------------------------------------------\n' lbtInt: Open the SM.LogParmsInt dialog.\n\nelseif (SELF.GetName = \"lbtInt\") then\n Av.FindDialog(\"SM.LogParmsInt\").Open\n\n\n' ---------------------------------------------------------------------\n' lbtOK: Run the model.\n\nelseif (S ELF.GetName = \"lbtOK\") then\n parmsDlg.Close\n theView = parmsDlg.GetObjectTag\n lbxParms = parmsDlg.FindByName(\"lbxParms\")\n addDlg = Av.FindDialog(\"SM.LogParmsAdd\")\n\n \n ' Create the dictionaries.\n \n dictSize = 1 max (lbxParms.GetRowCount / 2).Floor\n dummyDict = Dictionary.Make(1)\n fieldDict = Dictionary.Make(dictSize)\n intDict = Dictionary.Make(dictSize)\n parmDict = Dictionary.Make(dictSize)\n prefixDict = Dictionary.Make(dictSize)\n varDict = Dictionary.Make(dictSize)\n themeList = List.Make\n \n \n ' Add intercept to parmDict.\n \n if (parmsDlg.FindByName(\"chkIntercept\").IsSelected) then\n theIntercept = parmsDlg.FindByName(\"txlIntercept\").GetText\n else\n theIntercept = \"0\"\n end\n parmDict.Add(\"intercept\", theIntercept)\n parmDict.Add(\"Convergence Status\", \"0\")\n \n \n ' Cycle through the variables and add to dictionaries.\n\n for each aVar in lbxParms.GetList\n theParm = aVar.Get(0)\n theTheme = aVar.Get(1)\n theField = aVar.Get(2)\n if (theField.Is(Field).Not) then\n theField = theTheme\n thePrefix = theField.GetName.Left(6)\n else\n thePrefix = theField.GetAlias.Left(6)\n end\n \n parmList = {\"MakeVarName\", thePrefix, prefixDict, NIL}\n varName = Av.Run(\"SM.Library\", parmList)\n parmDict.Add(varName, theParm.AsString)\n varDict.Add(varName, {theTheme, theField})\n fieldDict.Add(theField, {varName})\n themeList.Add(theTheme)\n end\n themeList.RemoveDuplicates\n\n \n ' Add interactions to dictionary.\n\n lbxInt = Av.FindDialog(\"SM.LogParmsInt\").FindByName(\"l bxInt\")\n lbxInt.Update\n for each anInt in lbxInt.GetList\n if (anInt.Get(0).Is(Number)) then\n var1 = fieldDict.Get(anInt.Get(2)).Get(0)\n var2 = fieldDict.Get(anInt.Get(5)).Get(0)\n parmList = {\"MakeVarName\", \"int\", prefixDict, NIL}\n varName = Av.Run(\"SM.Library\", parmList)\n intDict.Add(varName, {var1, var2})\n parmDict.Add(varName, anInt.Get(0).AsString)\n end\n end\n \n \n ' Write the ODB.\n \n odbFN = FileName.GetTmpDir.MakeTmp(\"xxxodb\", \"odb\")\n odbOK = Av.Run(\"SM.WriteO DB\", {\"Logistic\", odbFN, themeList, \n fieldDict, varDict, dummyDict, intDict})\n if (odbOK.Not) then\n MsgBox.Error(\"Unable to create temporary file\" ++ odbFN.AsString,\n \"\")\n File.Delete(odbFN)\n lbxParms.Empty\n lbxInt.Empty\n addDlg.FindByName(\"cbxTheme\").Empty\n addDlg.FindByName(\"cbxField\").Empty\n return NIL\n end\n parmDict.Add(\"ODB File\", odbFN.AsString)\n\n\n ' Create the mod file.\n\n modFN = FileName.GetCWD.MakeTmp(\"logit\", \"mod\")\n modFile = LineFile.Ma ke(modFN, #FILE_PERM_WRITE)\n if (modFile = NIL) then\n MsgBox.Error(\"Error creating\" ++ modFN.AsString, \"\")\n File.Delete(odbFN)\n File.Delete(modFN)\n lbxParms.Empty\n lbxInt.Empty\n addDlg.FindByName(\"cbxTheme\").Empty\n addDlg.FindByName(\"cbxField\").Empty\n return NIL\n end\n modFile.WriteElt(\"Model Parameters:\" + NL)\n for each aParm in parmDict.ReturnKeys\n if (aParm.Contains(\"Convergence\").Not and \n aParm.Contains(\"ODB File\").Not) then\n modFile.WriteElt(aParm + \":\" ++ par mDict.Get(aParm))\n end\n end\n modFile.Close\n\n\n ' Set the work directory to the temporary directory (for temp grids).\n \n theProject = Av.GetProject\n oldWorkDir = theProject.GetWorkDir\n theProject.SetWorkDir(FileName.GetTmpDir)\n\n \n ' If a theme was created without errors, make it the active theme\n ' and open an info window.\n\n parmList = {theView, parmDict, modFN, FALSE}\n modelOut = Av.Run(\"SM.LogisticModel\", parmList)\n\n if (modelOut.Is(Theme)) then\n for each aTheme in theView.GetActiveThem es\n aTheme.SetActive(FALSE)\n end\n modelOut.SetVisible(TRUE)\n modelOut.SetActive(TRUE)\n \n theTitle = \"Model Information for\" ++ modelOut.GetName\n infoFN = modelOut.GetSrcName.AsString.AsFileName\n if (modelOut.Is(FTheme)) then\n infoFN.SetExtension(\"sms\")\n else\n infoFN.SetExtension(\"smg\")\n end\n if (File.Exists(infoFN)) then\n infoWin = TextWin.Make(infoFN, theTitle)\n infoWin.SetFixedFont(TRUE)\n infoWin.Open\n end\n end\n\n\n ' Clean up and empty contro ls.\n \n theProject.SetWorkDir(oldWorkDir)\n File.Delete(odbFN)\n File.Delete(modFN)\n lbxParms.Empty\n lbxInt.Empty\n addDlg.FindByName(\"cbxTheme\").Empty\n addDlg.FindByName(\"cbxField\").Empty\n \n \n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1498 Name: "SM.LogParms.Open" SourceCode: "' Name: SM.LogParms.Open\n'\n' Description: Open script for SM.LogParms dialog. Empties the\n' listbox and textline.\n'\n' Self: SM.LogParmsAdd\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in th e code and documentation.\n' ---------------------------------------------------------------------\n\n\n' Find controls.\n\nchkIntercept = SELF.FindByName(\"chkIntercept\")\nlbtOK = SELF.FindByName(\"lbtOK\")\nlbxParms = SELF.FindByName(\"lbxParms\")\ntxlIntercept = SELF.FindByName(\"txlIntercept\")\n\n\n' Initialize controls.\n\nchkIntercept.SetSelected(TRUE)\nchkIntercept.Click\nlbtOK.SetEnabled(FALSE)\nlbxParms.Empty\ntxlIntercept.Empty\ntxlIntercept.Focus\n" ) (Script.1499 Name: "SM.LogParms.Update" SourceCode: "' Name: SM.LogParms.Update\n'\n' Description: Update scripts for controls in SM.LogParms.\n'\n' Self: lbtOK\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' -------- -------------------------------------------------------------\n\n\nparmsDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbtOK: Enable/disable the OK button.\n\nif (SELF.GetName = \"lbtOK\") then\n if (parmsDlg.FindByName(\"chkIntercept\").IsSelected) then\n interceptOK = parmsDlg.FindByName(\"txlIntercept\").IsEmpty.Not\n else\n interceptOK = TRUE\n end\n parmsOK = parmsDlg.FindByName(\"lbxParms\").GetRowCount > 0\n\n SELF.SetEnabled(interceptOK and parmsOK)\n\n\n' ----- ----------------------------------------------------------------\n\nend\n" ) (Script.1500 Name: "SM.LogParmsAdd.Click" SourceCode: "' Name: SM.LogParmsAdd.Click\n'\n' Description: Click scripts for controls in SM.LogParmsAdd.\n'\n' Self: lbtCancel, lbtHelp, lbtOK\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and d ocumentation.\n' ---------------------------------------------------------------------\n\n\naddDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbtCancel: Close the dialog.\n\nif (SELF.GetName = \"lbtCancel\") then\n addDlg.Close\n\n\n' ---------------------------------------------------------------------\n' lbtHelp: Open help.\n\nelseif (SELF.GetName = \"lbtHelp\") then\n Av.Run(\"SM.Help\", SELF)\n\n\n' ---------------------------------------------------------------------\n' lb tOK: Add the variable to the list.\n\nelseif (SELF.GetName = \"lbtOK\") then\n addDlg.Close\n lbxParms = Av.FindDialog(\"SM.LogParms\").FindByName(\"lbxParms\")\n parmList = lbxParms.GetList\n theParm = addDlg.FindByName(\"txlParm\").GetText.AsNumber\n theTheme = addDlg.FindByName(\"cbxTheme\").GetSelection\n theField = addDlg.FindByName(\"cbxField\").GetSelection\n parmList.Add({theParm, theTheme, theField})\n lbxParms.DefineFromList(parmList)\n lbxParms.BroadcastUpdate\n\n\n' --------------------------------------------- ------------------------\n\nend\n" ) (Script.1501 Name: "SM.LogParmsAdd.Open" SourceCode: "' Name: SM.LogParmsAdd.Open\n'\n' Description: Open script for SM.LogParmsAdd dialog. Fills combo\n' boxes.\n'\n' Self: SM.LogParmsAdd\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code an d documentation.\n' ---------------------------------------------------------------------\n\n\n' Get the active View and find controls.\n\ntheView = Av.FindDialog(\"SM.LogParms\").GetObjectTag\ncbxTheme = SELF.FindByName(\"cbxTheme\")\nlbtOK = SELF.FindByName(\"lbtOK\")\ntxlParm = SELF.FindByName(\"txlParm\")\n\n\n' Initialize controls.\n\ntxlParm.Empty\nlbtOK.SetEnabled(FALSE)\nthemeList = List.Make\nfor each aTheme in theView.GetThemes\n if (aTheme.Is(FTheme)) then\n themeShape = aTheme.GetFTab.FindField(\"Shape\").GetType\n if (themeShape = #FIELD_SHAPEPOLY) then\n themeList.Insert(aTheme)\n end\n elseif (aTheme.Is(GTheme)) then\n themeList.Add(aTheme)\n end\nend\nthemeList.Insert(\"\")\ncbxTheme.DefineFromList(themeList)\ncbxTheme.SortAscending(FALSE)\ncbxTheme.Select\ncbxTheme.Focus\n" ) (Script.1502 Name: "SM.LogParmsAdd.Select" SourceCode: "' Name: SM.LogParmsAdd.Select\n'\n' Description: Select scripts for controls in SM.LogParmsAdd.\n'\n' Self: cbxTheme, cbxField\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and docume ntation.\n' ---------------------------------------------------------------------\n\n\nSELF.BroadcastUpdate\n" ) (Script.1503 Name: "SM.LogParmsAdd.Update" SourceCode: "' Name: SM.LogParmsAdd.Update\n'\n' Description: Update scripts for controls in SM.LogParmsAdd.\n'\n' Self: cbxField, lbtOK\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documenta tion.\n' ---------------------------------------------------------------------\n\n\naddDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' cbxField: Fill the cbxField combo box.\n\nif (SELF.GetName = \"cbxField\") then\n theTheme = addDlg.FindByName(\"cbxTheme\").GetSelection\n if (theTheme.Is(Theme)) then\n if (theTheme.Is(FTheme)) then\n parmList = {\"VisibleFields\", theTheme.GetFTab}\n fieldList = Av.Run(\"SM.Library\", parmList)\n for each aField in fieldLi st.Clone\n if (aField.IsTypeNumber.Not) then\n fieldList.RemoveObj(aField)\n end\n end\n elseif (theTheme.HasTable) then\n parmList = {\"VisibleFields\", theTheme.GetVTab}\n fieldList = Av.Run(\"SM.Library\", parmList)\n for each aField in fieldList.Clone\n if (aField.IsTypeNumber.Not) then\n fieldList.RemoveObj(aField)\n end\n end\n else\n fieldList = {\"Value\"}\n end\n fieldList.Insert(\"\")\n SELF.DefineFromList(fieldLis t)\n else\n SELF.Empty\n end\n\n\n' ---------------------------------------------------------------------\n' lbtOK: Enable/disable the OK button based on user entries.\n\nelseif (SELF.GetName = \"lbtOK\") then\n parmOK = addDlg.FindByName(\"txlParm\").IsEmpty.Not\n themeOK = (addDlg.FindByName(\"cbxTheme\").GetSelection <> NIL)\n fieldOK = (addDlg.FindByName(\"cbxField\").GetSelection <> NIL)\n SELF.SetEnabled(parmOK and themeOK and fieldOK)\n\n\n' ---------------------------------------------------------------------\n\nen d\n" ) (Script.1504 Name: "SM.LogParmsInt.Apply" SourceCode: "' Name: SM.LogParmsInt.Apply\n'\n' Description: Apply scripts for controls in SM.LogParmsInt.\n'\n' Self: lbxInt\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution for\n' use, copying, modification, or redistribution of the StatMod Avenue\n' scripts and components, and associated documentation, provided such\n' code and documentation are not sold for profit and this copyright\n' notice is retained in the code and documentation.\n' --- ------------------------------------------------------------------\n\n\nintDlg = SELF.GetDialog\n\n\n' ---------------------------------------------------------------------\n' lbxInt: Run click script for Add button.\n\nif (SELF.GetName = \"lbxInt\") then\n intDlg.FindByName(\"lbtAdd\").Click\n \n\n' ---------------------------------------------------------------------\n\nend\n" ) (Script.1505 Name: "SM.LogParmsInt.Click" SourceCode: "' Name: SM.LogParmsInt.Click\n'\n' Description: Click scripts for controls in SM.LogParmsInt.\n'\n' Self: lbtAdd, lbtCancel, lbtDelete, lbtHelp, lbtOK\n'\n' Copyright Notice\n'\n' Copyright (c) 2002 Christine M. Garrard\n'\n' Permission is hereby granted to any individual or institution f