/3.1
(Extension.1
	Name:	"MGE Viewer"
	Dependencies:	"$AVHOME/ext32/cadview.avx\n$AVHOME/bin32/avdlog.dll\n"
	FirstRootClassName:	"DocGUI"
	Roots:	2
	Roots:	17
	Roots:	239
	Roots:	263
	Roots:	289
	Roots:	367
	Roots:	368
	Roots:	369
	Roots:	370
	Roots:	371
	Roots:	372
	Roots:	373
	Roots:	374
	Roots:	375
	Roots:	376
	Roots:	377
	Roots:	378
	Roots:	379
	Roots:	380
	Roots:	381
	Roots:	382
	Roots:	383
	Roots:	384
	Roots:	385
	Roots:	386
	Roots:	387
	Roots:	388
	Roots:	389
	Roots:	390
	Roots:	391
	Roots:	392
	Roots:	393
	Roots:	394
	Roots:	395
	Roots:	396
	Roots:	397
	Roots:	398
	Roots:	399
	Roots:	400
	Roots:	401
	Roots:	402
	Roots:	403
	Roots:	404
	Roots:	405
	Roots:	406
	Roots:	407
	Roots:	408
	Roots:	409
	Roots:	410
	Roots:	411
	Roots:	412
	Roots:	413
	Roots:	414
	Roots:	415
	Roots:	416
	Roots:	417
	Roots:	418
	Roots:	419
	Roots:	420
	Roots:	421
	Roots:	422
	Roots:	423
	Roots:	424
	Roots:	425
	Roots:	426
	Roots:	427
	Roots:	428
	Roots:	429
	Roots:	430
	Roots:	431
	Roots:	432
	Roots:	433
	Roots:	434
	Roots:	435
	Version:	31
	About:	"Reads Intergraph's MGE and Bentley's MicroStation GeoGraphics data into ArcView"
	UnloadScript:	414
	InstallScript:	411
	UninstallScript:	413
	ExtVersion:	3100
)

(DocGUI.2
	Name:	"Key_View"
	Type:	"view"
	Modified:	1
	Visible:	1
	MenuBar:	3
	ButnBar:	4
	Popups:	5
	ToolBar:	6
	Icon:	16
)

(MenuBar.3
)

(ButnBar.4
)

(PopupSet.5
)

(ToolBar.6
	Child:	7
)

(ToolMenu.7
	Help:	"Point//Select an area of interest by a point"
	Icon:	8
	Cursor:	"Cursors.Bullseye"
	Apply:	"MGE.SelectAOITool"
	Click:	"MGE.SelectAOIPoint.Click"
	Child:	9
	Child:	10
	Child:	12
	Child:	14
)

(AVIcon.8
	Name:	"Point"
	Res:	"Icons.Point"

)

(Tool.9
	Help:	"Point//Select an area of interest by a point"
	Icon:	8
	Cursor:	"Cursors.Bullseye"
	Apply:	"MGE.SelectAOITool"
	Click:	"MGE.SelectAOIPoint.Click"
)

(Tool.10
	Help:	"View//Select an area of interest by a rectangle"
	Icon:	11
	Cursor:	"Cursors.CrossHair"
	Apply:	"MGE.SelectAOITool"
	Click:	"MGE.SelectAOIView.Click"
)

(AVIcon.11
	Name:	"Box"
	Res:	"Icons.Box"

)

(Tool.12
	Help:	"Fence//Select an area of interest by a polygon"
	Icon:	13
	Cursor:	"Cursors.CrossHair"
	Apply:	"MGE.SelectAOITool"
	Click:	"MGE.SelectAOIFence.Click"
)

(AVIcon.13
	Name:	"SelectPoly"
	Res:	"Icons.SelectPoly"

)

(Tool.14
	Help:	"All//Select all"
	Icon:	15
	Cursor:	"Cursors.Default"
	Click:	"MGE.SelectAOIAll.Click"
)

(AVIcon.15
	Name:	"Classify"
	Res:	"Icons.Classify"

)

(AVIcon.16
	Name:	"DefaultDocument"
	Res:	"Icons.DefaultDocument"

)

(DocGUI.17
	Name:	"MGEView"
	Type:	"View"
	Modified:	1
	Visible:	1
	MenuBar:	18
	ButnBar:	124
	Popups:	167
	ToolBar:	186
	NewScript:	"MGE.Load"
	OpenScript:	"Doc.Open"
	ActionScript:	"Doc.Action"
	NewUpdateScript:	"Doc.NewUpdate"
	OpenUpdateScript:	"Doc.OpenUpdate"
	ActionUpdateScript:	"Doc.ActionUpdate"
	Title:	"MGE Views"
	Icon:	238
)

(MenuBar.18
	Child:	19
	Child:	31
	Child:	51
	Child:	72
	Child:	94
	Child:	108
	Child:	114
	Child:	120
)

(PMenu.19
	InternalName:	"File"
	Child:	20
	Child:	21
	Child:	22
	Child:	23
	Child:	24
	Child:	25
	Child:	26
	Child:	27
	Child:	28
	Child:	29
	Child:	30
	Label:	"&File"
)

(Choice.20
	Help:	"Closes the active component"
	HelpTopic:	"Close"
	Label:	"&Close"
	Click:	"Project.CloseDoc"
	Shortcut:	"Keys.None"
)

(Choice.21
	Help:	"Closes all components"
	HelpTopic:	"Close_All"
	Label:	"Close &All"
	Click:	"Project.CloseAll"
	Shortcut:	"Keys.None"
)

(Space.22
)

(Choice.23
	Help:	"Allows you to specify the current working directory"
	HelpTopic:	"Set_Working_Directory"
	Label:	"Set &Working Directory..."
	Click:	"Project.SetProjectWorkDir"
	Shortcut:	"Keys.None"
)

(Choice.24
	Help:	"Saves the current project"
	HelpTopic:	"Save_Project"
	Label:	"&Save Project"
	Click:	"Project.Save"
	Shortcut:	"Keys.Ctrl+S"
)

(Space.25
)

(Choice.26
	Help:	"Prints the view"
	HelpTopic:	"Print"
	Label:	"&Print..."
	Click:	"View.Print"
	Shortcut:	"Keys.None"
)

(Choice.27
	Help:	"Edits the printer and the printing options"
	HelpTopic:	"Print_Setup"
	Label:	"P&rint Setup..."
	Click:	"Project.PrintSetup"
	Shortcut:	"Keys.None"
)

(Choice.28
	Help:	"Exports the view"
	HelpTopic:	"Export"
	Update:	"View.HasThemesUpdate"
	Label:	"&Export..."
	Click:	"View.ExportDisp"
	Shortcut:	"Keys.None"
)

(Space.29
)

(Choice.30
	Help:	"Exits ArcView"
	HelpTopic:	"Exit"
	Label:	"E&xit"
	Click:	"Project.Exit"
	Shortcut:	"Keys.None"
)

(PMenu.31
	InternalName:	"Edit"
	Child:	32
	Child:	33
	Child:	34
	Child:	35
	Child:	36
	Child:	37
	Child:	38
	Child:	39
	Child:	40
	Child:	41
	Child:	42
	Child:	43
	Child:	44
	Child:	45
	Child:	46
	Child:	47
	Child:	48
	Child:	49
	Child:	50
	Label:	"&Edit"
)

(Choice.32
	Help:	"Cuts the active themes to the clipboard"
	HelpTopic:	"Cut_Themes"
	Update:	"View.ActiveDeletableThemesUpdate"
	Label:	"Cut T&hemes"
	Click:	"View.CutThemes"
	Shortcut:	"Keys.None"
)

(Choice.33
	Help:	"Copies the active themes to the clipboard"
	HelpTopic:	"Copy_Themes"
	Update:	"View.ActiveThemesUpdate"
	Label:	"Cop&y Themes"
	Click:	"View.CopyThemes"
	Shortcut:	"Keys.None"
)

(Choice.34
	Help:	"Removes the active themes from the view"
	HelpTopic:	"Delete_Themes"
	Update:	"View.ActiveDeletableThemesUpdate"
	Label:	"De&lete Themes"
	Click:	"View.DeleteThemes"
	Shortcut:	"Keys.None"
)

(Space.35
)

(Choice.36
	Disabled:	1
	Help:	"Undo the last edit to graphics on a view"
	HelpTopic:	"Undo_Graphic_Edit_on_a_view"
	Update:	"View.UndoEditUpdate"
	Label:	"&Undo Graphic Edit"
	Click:	"View.UndoEdit"
	Shortcut:	"Keys.Ctrl+Z"
)

(Choice.37
	Disabled:	1
	Invisible:	1
	Help:	"Redo the last edit operation on a theme that was undone"
	HelpTopic:	"Redo_Edit_on_a_view"
	Update:	"View.RedoEditUpdate"
	Label:	"&Redo Feature Edit"
	Click:	"View.RedoEdit"
	Shortcut:	"Keys.Ctrl+Y"
)

(Space.38
)

(Choice.39
	Disabled:	1
	Help:	"Cuts the selected graphics to the clipboard"
	HelpTopic:	"Cut_Graphics"
	Update:	"View.CutUpdate"
	Label:	"Cu&t Graphics"
	Click:	"View.CutGraphics"
	Shortcut:	"Keys.Ctrl+X"
)

(Choice.40
	Disabled:	1
	Help:	"Copies the selected graphics to the clipboard"
	HelpTopic:	"Copy_Graphics"
	Update:	"View.CopyUpdate"
	Label:	"&Copy Graphics"
	Click:	"View.CopyGraphics"
	Shortcut:	"Keys.Ctrl+C"
)

(Choice.41
	Disabled:	1
	Help:	"Removes the selected graphics from the view"
	HelpTopic:	"Delete_Graphics"
	Update:	"View.DeleteUpdate"
	Label:	"&Delete Graphics"
	Click:	"View.DeleteGraphics"
	Shortcut:	"Keys.Del"
)

(Space.42
)

(Choice.43
	Disabled:	1
	Help:	"Combines the selected polygons"
	HelpTopic:	"Combine_Graphics"
	Update:	"View.CombineUpdate"
	Label:	"Com&bine Graphics"
	Click:	"View.CombineGraphics"
	Shortcut:	"Keys.None"
)

(Choice.44
	Disabled:	1
	Help:	"Unions the selected graphics to create a new graphic"
	HelpTopic:	"Union_Graphics"
	Update:	"View.UnionUpdate"
	Label:	"U&nion Graphics"
	Click:	"View.UnionGraphics"
	Shortcut:	"Keys.None"
)

(Choice.45
	Disabled:	1
	Help:	"Subtracts one selected polygon from the other selected polygon"
	HelpTopic:	"Subtract_Graphics"
	Update:	"View.SubtractUpdate"
	Label:	"&Subtract Graphics"
	Click:	"View.SubtractGraphics"
	Shortcut:	"Keys.None"
)

(Choice.46
	Disabled:	1
	Help:	"Creates a new polygon from the area  of overlap between the selected polygons"
	HelpTopic:	"Intersect_Graphics"
	Update:	"View.IntersectUpdate"
	Label:	"&Intersect Graphics"
	Click:	"View.IntersectGraphics"
	Shortcut:	"Keys.None"
)

(Space.47
)

(Choice.48
	Disabled:	1
	Help:	"Inserts the contents of the clipboard"
	HelpTopic:	"Paste"
	Update:	"View.PasteUpdate"
	Label:	"&Paste"
	Click:	"View.Paste"
	Shortcut:	"Keys.Ctrl+V"
)

(Space.49
)

(Choice.50
	Disabled:	1
	Help:	"Selects all graphics in the view"
	HelpTopic:	"Select_All_Graphics"
	Update:	"View.HasGraphicsUpdate"
	Label:	"Select &All Graphics"
	Click:	"Graphic.SelectAll"
	Shortcut:	"Keys.None"
)

(PMenu.51
	InternalName:	"View"
	Child:	52
	Child:	53
	Child:	54
	Child:	55
	Child:	56
	Child:	57
	Child:	58
	Child:	59
	Child:	60
	Child:	61
	Child:	62
	Child:	63
	Child:	64
	Child:	65
	Child:	66
	Child:	67
	Child:	68
	Child:	69
	Child:	70
	Child:	71
	Label:	"&View"
)

(Choice.52
	Help:	"Displays the dialog box to edit properties of the view"
	HelpTopic:	"View_Properties"
	Label:	"&Properties..."
	Click:	"View.Properties"
	Shortcut:	"Keys.None"
)

(Space.53
)

(Choice.54
	Help:	"Inserts themes into the view"
	HelpTopic:	"Add_Theme"
	Label:	"&Add Theme..."
	Click:	"View.Add"
	Shortcut:	"Keys.Ctrl+T"
)

(Choice.55
	Disabled:	1
	Help:	"Displays a dialog box to create a geocoded theme"
	HelpTopic:	"Geocode_Addresses"
	Update:	"View.GeocodeUpdate"
	Label:	"&Geocode Addresses..."
	Click:	"View.Geocode"
	Shortcut:	"Keys.None"
)

(Choice.56
	Help:	"Displays a dialog box to create an XY or dynamic segmentation event-based theme "
	HelpTopic:	"Add_Event_Theme"
	Update:	"View.AddEventUpdate"
	Label:	"Add &Event Theme..."
	Click:	"View.AddEvent"
	Shortcut:	"Keys.None"
)

(Choice.57
	Help:	"Creates a new theme"
	HelpTopic:	"New_Theme"
	Label:	"&New Theme..."
	Click:	"View.NewTheme"
	Shortcut:	"Keys.None"
)

(Choice.58
	Help:	"Makes all themes visible"
	HelpTopic:	"Themes_On_Themes_Off"
	Update:	"View.HasThemesUpdate"
	Label:	"&Themes On"
	Click:	"View.ThemesOn"
	Shortcut:	"Keys.None"
)

(Choice.59
	Help:	"Makes all themes invisible"
	HelpTopic:	"Themes_On_Themes_Off"
	Update:	"View.HasThemesUpdate"
	Label:	"T&hemes Off"
	Click:	"View.ThemesOff"
	Shortcut:	"Keys.Esc"
)

(Space.60
)

(Choice.61
	Help:	"Create a Layout from the View"
	HelpTopic:	"Layout_menu_choice"
	Update:	"View.HasThemesUpdate"
	Label:	"La&yout..."
	Click:	"View.Layout"
	Shortcut:	"Keys.None"
)

(Space.62
)

(Choice.63
	Help:	"Zooms to the extent of all themes"
	HelpTopic:	"Zoom_to_Full_Extent"
	Update:	"View.HasDataUpdate"
	Label:	"Full E&xtent"
	Click:	"View.ZoomFullExtent"
	Shortcut:	"Keys.None"
)

(Choice.64
	Help:	"Zooms in on the center of the display"
	HelpTopic:	"Zoom_In"
	Update:	"View.HasDataUpdate"
	Label:	"Zoom &In"
	Click:	"View.ZoomIn"
	Shortcut:	"Keys.None"
)

(Choice.65
	Help:	"Zooms out from the center of the display"
	HelpTopic:	"Zoom_Out"
	Update:	"View.HasDataUpdate"
	Label:	"Zoom &Out"
	Click:	"View.ZoomOut"
	Shortcut:	"Keys.None"
)

(Choice.66
	Help:	"Zooms to the extent of active themes"
	HelpTopic:	"Zoom_to_Active_Theme"
	Update:	"View.ActiveThemesUpdate"
	Label:	"&Zoom To Themes"
	Click:	"View.ZoomToThemes"
	Shortcut:	"Keys.None"
)

(Choice.67
	Help:	"Zooms to the extent of the selected features"
	HelpTopic:	"Zoom_to_Selected"
	Update:	"View.SelectableThemesUpdate"
	Label:	"Zoom To &Selected"
	Click:	"View.ZoomToSelected"
	Shortcut:	"Keys.None"
)

(Choice.68
	Help:	"Goes back to the previous extent you were viewing"
	HelpTopic:	"Zoom_Previous"
	Update:	"View.UndoZoomUpdate"
	Label:	"Zoom Pre&vious"
	Click:	"View.UndoZoom"
	Shortcut:	"Keys.None"
)

(Space.69
)

(Choice.70
	Help:	"Finds features in the active themes using the text you enter"
	HelpTopic:	"Find"
	Update:	"View.TabularThemesUpdate"
	Label:	"&Find..."
	Click:	"View.Find"
	Shortcut:	"Keys.Ctrl+F"
)

(Choice.71
	Disabled:	1
	Help:	"Locates an address in the active, matchable theme"
	HelpTopic:	"Locate_Address"
	Update:	"View.LocateUpdate"
	Label:	"&Locate Address..."
	Click:	"View.Locate"
	Shortcut:	"Keys.None"
)

(PMenu.72
	InternalName:	"Theme"
	Child:	73
	Child:	74
	Child:	75
	Child:	76
	Child:	77
	Child:	78
	Child:	79
	Child:	80
	Child:	81
	Child:	82
	Child:	83
	Child:	84
	Child:	85
	Child:	86
	Child:	87
	Child:	88
	Child:	89
	Child:	90
	Child:	91
	Child:	92
	Child:	93
	Label:	"&Theme"
)

(Choice.73
	Help:	"Displays the dialog box to edit properties of the active theme"
	HelpTopic:	"Theme_Properties"
	Update:	"View.ActiveThemesUpdate"
	Label:	"&Properties..."
	Click:	"View.ThemeProperties"
	Shortcut:	"Keys.None"
)

(Space.74
)

(Choice.75
	Disabled:	1
	Help:	"Starts or stops editing of shapefile"
	HelpTopic:	"Start_Stop_Editing_in_a_view"
	Update:	"View.ToggleEditingUpdate"
	Label:	"Start &Editing"
	Click:	"View.ToggleEditing"
	Shortcut:	"Keys.None"
)

(Choice.76
	Disabled:	1
	Help:	"Save edits to the source shapefile"
	HelpTopic:	"Save_edits_theme"
	Update:	"View.SaveEditsUpdate"
	Label:	"Save Ed&its"
	Click:	"View.SaveEdits"
	Shortcut:	"Keys.None"
)

(Choice.77
	Disabled:	1
	Help:	"Saves edits to a new shapefile"
	HelpTopic:	"Save_edits_as_theme"
	Update:	"View.SaveEditsUpdate"
	Label:	"Save E&dits As..."
	Click:	"View.SaveEditsAs"
	Shortcut:	"Keys.None"
)

(Choice.78
	Help:	"Converts a theme to a shapefile"
	HelpTopic:	"Convert_to_Shapefile"
	Update:	"View.ExportUpdate"
	Label:	"Convert to &Shapefile..."
	Click:	"View.Export"
	Shortcut:	"Keys.None"
)

(Space.79
)

(Choice.80
	Help:	"Displays the legends of the active themes"
	HelpTopic:	"Edit_Legend"
	Update:	"View.ActiveThemesUpdate"
	Label:	"Edit &Legend..."
	Click:	"View.EditLegendClick"
	Shortcut:	"Keys.None"
)

(Choice.81
	Help:	"Shows or hides the active themes' legends"
	HelpTopic:	"Hide_show_Legend"
	Update:	"View.ActiveThemesUpdate"
	Label:	"&Hide/Show Legend"
	Click:	"View.ToggleLegend"
	Shortcut:	"Keys.None"
)

(Space.82
)

(Choice.83
	Disabled:	1
	Help:	"Displays the Re-match dialog for re-matching addresses"
	HelpTopic:	"Re_match_Addresses"
	Update:	"View.EditMatchUpdate"
	Label:	"&Re-match Addresses..."
	Click:	"View.EditMatch"
	Shortcut:	"Keys.None"
)

(Space.84
)

(Choice.85
	Help:	"Labels features in active, visible themes"
	HelpTopic:	"Auto_label"
	Update:	"View.LabelThemesUpdate"
	Label:	"&Auto-label..."
	Click:	"View.LabelThemes"
	Shortcut:	"Keys.Ctrl+L"
)

(Choice.86
	Disabled:	1
	Help:	"Removes any labels from active themes"
	HelpTopic:	"Remove_Labels"
	Update:	"View.RemoveThemeLabelsUpdate"
	Label:	"Rem&ove Labels"
	Click:	"View.RemoveThemeLabels"
	Shortcut:	"Keys.Ctrl+R"
)

(Choice.87
	Disabled:	1
	Help:	"Removes the overlapping labels from active themes, if they are still green."
	HelpTopic:	"Remove_Overlapping_Labels"
	Update:	"View.RemoveOverlapThemeLabelsUpdate"
	Label:	"Remove Overlappi&ng Labels"
	Click:	"View.RemoveOverlapThemeLabels"
	Shortcut:	"Keys.None"
)

(Choice.88
	Disabled:	1
	Help:	"Converts selected overlapping labels to symbol of selected good label"
	HelpTopic:	"Convert_Overlapping_Labels"
	Update:	"View.ConvertOverlapLabelsUpdate"
	Label:	"&Convert Overlapping Labels"
	Click:	"View.ConvertOverlapLabels"
	Shortcut:	"Keys.Ctrl+O"
)

(Space.89
)

(Choice.90
	Help:	"Opens the tables of the active themes"
	HelpTopic:	"Open_Theme_Table"
	Update:	"View.TabularThemesUpdate"
	Label:	"&Table..."
	Click:	"View.ShowTable"
	Shortcut:	"Keys.None"
)

(Choice.91
	Help:	"Displays the Query Builder to select features with a logical expression"
	HelpTopic:	"Query_Builder"
	Update:	"View.AttributeThemesUpdate"
	Label:	"&Query..."
	Click:	"View.Query"
	Shortcut:	"Keys.Ctrl+Q"
)

(Choice.92
	Help:	"Selects features in the active themes using another theme's features"
	HelpTopic:	"Select_By_Theme"
	Update:	"View.SelectableThemesUpdate"
	Label:	"Select &By Theme..."
	Click:	"View.SelectByTheme"
	Shortcut:	"Keys.None"
)

(Choice.93
	Help:	"Unselects the selected features of all active themes"
	HelpTopic:	"Clear_Selected_Features"
	Update:	"View.AttributeThemesUpdate"
	Label:	"Clear Selected &Features"
	Click:	"View.ClearSelect"
	Shortcut:	"Keys.None"
)

(PMenu.94
	InternalName:	"Graphics"
	Child:	95
	Child:	96
	Child:	97
	Child:	98
	Child:	99
	Child:	100
	Child:	101
	Child:	102
	Child:	103
	Child:	104
	Child:	105
	Child:	106
	Child:	107
	Label:	"&Graphics"
)

(Choice.95
	Disabled:	1
	Help:	"Displays the property editor for the selected graphic"
	HelpTopic:	"Graphic_Properties"
	Update:	"Graphic.HasSelectionUpdate"
	Label:	"&Properties..."
	Click:	"Graphic.Edit"
	Shortcut:	"Keys.None"
)

(Space.96
)

(Choice.97
	Disabled:	1
	Help:	"Displays a dialog box to adjust size and position of selected graphic"
	HelpTopic:	"Size_and_Position"
	Update:	"Graphic.SingleSelectionUpdate"
	Label:	"&Size and Position..."
	Click:	"Graphic.SizePos"
	Shortcut:	"Keys.None"
)

(Choice.98
	Disabled:	1
	Help:	"Aligns the selected graphics"
	HelpTopic:	"Align"
	Update:	"Graphic.HasSelectionUpdate"
	Label:	"&Align..."
	Click:	"Graphic.Align"
	Shortcut:	"Keys.Ctrl+A"
)

(Space.99
)

(Choice.100
	Disabled:	1
	Help:	"Moves selected graphics in front of other graphics"
	HelpTopic:	"Bring_to_Front_on_a_view"
	Update:	"Graphic.HasSelectionUpdate"
	Label:	"Bring to &Front"
	Click:	"Graphic.ToFront"
	Shortcut:	"Keys.None"
)

(Choice.101
	Disabled:	1
	Help:	"Moves selected graphics behind other graphics"
	HelpTopic:	"Send_to_Back_on_a_view"
	Update:	"Graphic.HasSelectionUpdate"
	Label:	"Send to &Back "
	Click:	"Graphic.ToBack"
	Shortcut:	"Keys.None"
)

(Choice.102
	Disabled:	1
	Help:	"Groups selected graphics"
	HelpTopic:	"Group_on_a_view"
	Update:	"Graphic.GroupUpdate"
	Label:	"&Group"
	Click:	"Graphic.Group"
	Shortcut:	"Keys.Ctrl+G"
)

(Choice.103
	Disabled:	1
	Help:	"Ungroups selected graphics"
	HelpTopic:	"Ungroup_on_a_view"
	Update:	"Graphic.UngroupUpdate"
	Label:	"&Ungroup"
	Click:	"Graphic.Ungroup"
	Shortcut:	"Keys.Ctrl+U"
)

(Space.104
)

(Choice.105
	Disabled:	1
	Help:	"Associates selected graphics with active themes"
	HelpTopic:	"Attach_Graphics"
	Update:	"View.AddGraphicsUpdate"
	Label:	"A&ttach Graphics"
	Click:	"View.AddGraphics"
	Shortcut:	"Keys.None"
)

(Choice.106
	Disabled:	1
	Help:	"Removes association between graphics and active themes"
	HelpTopic:	"Detach_Graphics"
	Update:	"View.ClearGraphicsUpdate"
	Label:	"&Detach Graphics"
	Click:	"View.ClearGraphics"
	Shortcut:	"Keys.None"
)

(Space.107
)

(PMenu.108
	InternalName:	"Window"
	Child:	109
	Child:	110
	Child:	111
	Child:	112
	Child:	113
	Label:	"&Window"
)

(Choice.109
	Help:	"Arranges windows as non-overlapping tiles"
	HelpTopic:	"Tile"
	Label:	"&Tile"
	Click:	"Project.Tile"
	Shortcut:	"Keys.None"
)

(Choice.110
	Help:	"Arranges windows"
	HelpTopic:	"Cascade"
	Label:	"&Cascade"
	Click:	"Project.Cascade"
	Shortcut:	"Keys.None"
)

(Choice.111
	Help:	"Arranges iconified windows"
	HelpTopic:	"Arrange_Icons"
	Label:	"&Arrange Icons"
	Click:	"Project.ArrangeIcons"
	Shortcut:	"Keys.None"
)

(Space.112
)

(Choice.113
	Help:	"Shows the symbol window"
	HelpTopic:	"Show_Symbol_Window"
	Label:	"Show Symbol Window..."
	Click:	"Project.ShowHideSymWin"
	Shortcut:	"Keys.Ctrl+P"
)

(PMenu.114
	InternalName:	"Help"
	Child:	115
	Child:	116
	Child:	117
	Child:	118
	Child:	119
	Label:	"&Help"
)

(Choice.115
	Help:	"Displays the dialog for browsing and searching ArcView's help system"
	HelpTopic:	"Help_on_Help_Topics"
	Label:	"Help &Topics..."
	Click:	"Project.HelpTopics"
	Shortcut:	"Keys.None"
)

(Choice.116
	Help:	"Provides instructions for how to obtain help from ArcView"
	HelpTopic:	"Help_on_How_to_Get_Help"
	Label:	"&How to Get Help..."
	Click:	"Project.HelpHelp"
	Shortcut:	"Keys.None"
)

(Space.117
)

(Choice.118
	Help:	"Provides information about ArcView"
	HelpTopic:	"About"
	Label:	"&About ArcView..."
	Click:	"Project.About"
	Shortcut:	"Keys.None"
)

(Space.119
)

(PMenu.120
	Child:	121
	Child:	122
	Child:	123
	Label:	"&MGE"
)

(Choice.121
	Help:	"Split the active themes into features ..."
	Label:	"&Split into Features"
	Click:	"MGE.SplitThemes"
	Shortcut:	"Keys.None"
)

(Choice.122
	Help:	"Opens MGE theme table"
	Label:	"&Open Table"
	Click:	"MGE.ShowTable"
	Shortcut:	"Keys.None"
)

(Choice.123
	Help:	"Displays the Query Builder to select features with a logical expression"
	Label:	"MGE Feature &Query"
	Click:	"MGE.query"
	Shortcut:	"Keys.None"
)

(ButnBar.124
	Child:	125
	Child:	127
	Child:	128
	Child:	130
	Child:	131
	Child:	133
	Child:	135
	Child:	137
	Child:	138
	Child:	140
	Child:	142
	Child:	144
	Child:	145
	Child:	147
	Child:	149
	Child:	151
	Child:	153
	Child:	155
	Child:	157
	Child:	158
	Child:	160
	Child:	162
	Child:	163
	Child:	165
	Child:	166
)

(Butn.125
	Help:	"Save Project//Saves the current project"
	HelpTopic:	"Save_Project"
	Icon:	126
	Click:	"Project.Save"
)

(AVIcon.126
	Name:	"Save"
	Res:	"Icons.Save"

)

(Space.127
)

(Butn.128
	Help:	"Add Theme//Inserts themes into the view"
	HelpTopic:	"Add_Theme"
	Icon:	129
	Click:	"View.Add"
)

(AVIcon.129
	Name:	"AddTheme"
	Res:	"Icons.AddTheme"

)

(Space.130
)

(Butn.131
	Help:	"Theme Properties//Displays the dialog box to edit properties of the active theme"
	HelpTopic:	"Theme_Properties"
	Update:	"View.ActiveThemesUpdate"
	Icon:	132
	Click:	"View.ThemeProperties"
)

(AVIcon.132
	Name:	"Props"
	Res:	"Icons.Props"

)

(Butn.133
	Help:	"Edit Legend//Displays the legends of the active themes"
	HelpTopic:	"Edit_Legend"
	Update:	"View.ActiveThemesUpdate"
	Icon:	134
	Click:	"View.EditLegendClick"
)

(AVIcon.134
	Name:	"Legend"
	Res:	"Icons.Legend"

)

(Butn.135
	Help:	"Open Theme Table//Opens the tables of the active themes"
	HelpTopic:	"Open_Theme_Table"
	Update:	"View.TabularThemesUpdate"
	Icon:	136
	Click:	"MGE.ShowTable"
)

(AVIcon.136
	Name:	"Table"
	Res:	"Icons.Table"

)

(Space.137
)

(Butn.138
	Help:	"Find//Finds features in the active themes using the text you enter"
	HelpTopic:	"Find"
	Update:	"View.TabularThemesUpdate"
	Icon:	139
	Click:	"View.Find"
)

(AVIcon.139
	Name:	"Find"
	Res:	"Icons.Find"

)

(Butn.140
	Disabled:	1
	Help:	"Locate Address//Locates an address in the active, matchable theme"
	HelpTopic:	"Locate_Address"
	Update:	"View.LocateUpdate"
	Icon:	141
	Click:	"View.Locate"
)

(AVIcon.141
	Name:	"AddMatch"
	Res:	"Icons.AddMatch"

)

(Butn.142
	Help:	"Query Builder//Displays the Query Builder to select features with a logical expression"
	HelpTopic:	"Query_Builder"
	Update:	"View.AttributeThemesUpdate"
	Icon:	143
	Click:	"View.Query"
)

(AVIcon.143
	Name:	"QueryBuilder"
	Res:	"Icons.QueryBuilder"

)

(Space.144
)

(Butn.145
	Help:	"Zoom to Full Extent//Zooms to the extent of all themes"
	HelpTopic:	"Zoom_to_Full_Extent"
	Update:	"View.HasDataUpdate"
	Icon:	146
	Click:	"View.ZoomFullExtent"
)

(AVIcon.146
	Name:	"ZoomView"
	Res:	"Icons.ZoomView"

)

(Butn.147
	Help:	"Zoom to Active Theme(s)//Zooms to the extent of active themes"
	HelpTopic:	"Zoom_to_Active_Theme"
	Update:	"View.ActiveThemesUpdate"
	Icon:	148
	Click:	"View.ZoomToThemes"
)

(AVIcon.148
	Name:	"ZoomTheme"
	Res:	"Icons.ZoomTheme"

)

(Butn.149
	Help:	"Zoom to Selected//Zooms to the extent of the selected features"
	HelpTopic:	"Zoom_to_Selected"
	Update:	"View.SelectableThemesUpdate"
	Icon:	150
	Click:	"View.ZoomToSelected"
)

(AVIcon.150
	Name:	"ZoomToSelected"
	Res:	"Icons.ZoomToSelected"

)

(Butn.151
	Help:	"Zoom In//Zooms in on the center of the display"
	HelpTopic:	"Zoom_In"
	Update:	"View.HasDataUpdate"
	Icon:	152
	Click:	"View.ZoomIn"
)

(AVIcon.152
	Name:	"ZoomIn"
	Res:	"Icons.ZoomIn"

)

(Butn.153
	Help:	"Zoom Out//Zooms out from the center of the display"
	HelpTopic:	"Zoom_Out"
	Update:	"View.HasDataUpdate"
	Icon:	154
	Click:	"View.ZoomOut"
)

(AVIcon.154
	Name:	"ZoomOut"
	Res:	"Icons.ZoomOut"

)

(Butn.155
	Help:	"Zoom to Previous Extent//Goes back to the previous extent you were viewing"
	HelpTopic:	"Zoom_Previous"
	Update:	"View.UndoZoomUpdate"
	Icon:	156
	Click:	"View.UndoZoom"
)

(AVIcon.156
	Name:	"ZoomPrevious"
	Res:	"Icons.ZoomPrevious"

)

(Space.157
)

(Butn.158
	Disabled:	1
	Help:	"Select Features Using Graphic//Selects features in active themes using selected graphics"
	HelpTopic:	"Select_Features_Using_Graphic"
	Update:	"View.SpatialSelectUpdate"
	Icon:	159
	Click:	"View.SpatialSelect"
)

(AVIcon.159
	Name:	"SpatialSelect"
	Res:	"Icons.SpatialSelect"

)

(Butn.160
	Help:	"Clear Selected Features//Unselects the selected features of all active themes"
	HelpTopic:	"Clear_Selected_Features"
	Update:	"View.AttributeThemesUpdate"
	Icon:	161
	Click:	"View.ClearSelect"
)

(AVIcon.161
	Name:	"SelectNone"
	Res:	"Icons.SelectNone"

)

(Space.162
)

(Butn.163
	Help:	"Help//Gets help about the next button, tool, or menu choice you click"
	HelpTopic:	"Help_button"
	Icon:	164
	Click:	"Help.Tool"
)

(AVIcon.164
	Name:	"HelpTool"
	Res:	"Icons.HelpTool"

)

(Space.165
)

(Space.166
)

(PopupSet.167
	Child:	168
)

(Popup.168
	Child:	169
	Child:	170
	Child:	171
	Child:	172
	Child:	173
	Child:	174
	Child:	175
	Child:	176
	Child:	177
	Child:	178
	Child:	179
	Child:	180
	Child:	181
	Child:	182
	Child:	183
	Child:	184
	Child:	185
	Label:	"Menu"
)

(Choice.169
	Disabled:	1
	Invisible:	1
	Help:	"Deletes the last entered point on the line or polygon being drawn"
	Update:	"View.DelLastPointUpdate"
	Label:	"Delete Last Point"
	Click:	"View.DeleteLastPoint"
	Shortcut:	"Keys.None"
)

(Choice.170
	Help:	"Undo the last edit to features in a theme"
	HelpTopic:	"Undo_Feature_Edit_on_a_view"
	Update:	"View.UndoEditUpdate"
	Label:	"Undo Feature Edit"
	Click:	"View.UndoEdit"
	Shortcut:	"Keys.None"
)

(Choice.171
	Disabled:	1
	Help:	"Redo the last edit operation on a theme that was undone"
	Update:	"View.RedoEditUpdate"
	Label:	"Redo Feature Edit"
	Click:	"View.RedoEdit"
	Shortcut:	"Keys.None"
)

(Space.172
)

(Choice.173
	Help:	"Turns general snapping on"
	Update:	"View.ToggleGeneralSnapUpdate"
	Label:	"Enable General Snapping"
	Click:	"View.ToggleGeneralSnap"
	Shortcut:	"Keys.None"
)

(Choice.174
	Help:	"Turns interactive snapping on"
	Update:	"View.ToggleInteractiveSnapUpdate"
	Label:	"Enable Interactive Snapping"
	Click:	"View.ToggleInteractiveSnap"
	Shortcut:	"Keys.None"
)

(Space.175
)

(Choice.176
	Disabled:	1
	Invisible:	1
	Help:	"Snaps the next entered point to the nearest vertex within the user tolerance"
	Update:	"View.InteractiveSnapUpdate"
	Label:	"Snap to Vertex"
	Click:	"View.SnapToVertex"
	Shortcut:	"Keys.None"
)

(Choice.177
	Disabled:	1
	Invisible:	1
	Help:	"Snaps the next entered point to the nearest line segment"
	Update:	"View.InteractiveSnapUpdate"
	Label:	"Snap to Boundary"
	Click:	"View.SnapToBoundary"
	Shortcut:	"Keys.None"
)

(Choice.178
	Disabled:	1
	Invisible:	1
	Help:	"Snaps the next entered point to the nearest node common to two or more features"
	Update:	"View.InteractiveSnapUpdate"
	Label:	"Snap to Intersection"
	Click:	"View.SnapToIntersection"
	Shortcut:	"Keys.None"
)

(Choice.179
	Disabled:	1
	Invisible:	1
	Help:	"Snaps the next entered point to the nearest endpoint of an existing line"
	Update:	"View.SnapToEndPointUpdate"
	Label:	"Snap to Endpoint"
	Click:	"View.SnapToEndPoint"
	Shortcut:	"Keys.None"
)

(Space.180
)

(Choice.181
	Help:	"Unselects the selected features in all active themes"
	Update:	"View.AttributeThemesUpdate"
	Label:	"Clear Selection"
	Click:	"View.ClearSelect"
	Shortcut:	"Keys.None"
)

(Choice.182
	Help:	"Zooms in at point where you click to bring up popup menu"
	Update:	"View.HasDataUpdate"
	Label:	"Zoom In"
	Click:	"View.PopupZoomIn"
	Shortcut:	"Keys.None"
)

(Choice.183
	Help:	"Zooms out from point where you click to bring up popup menu"
	Update:	"View.HasDataUpdate"
	Label:	"Zoom Out"
	Click:	"View.PopupZoomOut"
	Shortcut:	"Keys.None"
)

(Choice.184
	Help:	"Zooms to the extent of the selected features"
	Update:	"View.SelectableThemesUpdate"
	Label:	"Zoom to Selected"
	Click:	"View.ZoomToSelected"
	Shortcut:	"Keys.None"
)

(Choice.185
	Help:	"Centers display on point where you click to bring up popup"
	Update:	"View.HasDataUpdate"
	Label:	"Pan"
	Click:	"View.PopupPan"
	Shortcut:	"Keys.None"
)

(ToolBar.186
	Child:	187
	Child:	189
	Child:	191
	Child:	193
	Child:	195
	Child:	197
	Child:	199
	Child:	201
	Child:	203
	Child:	205
	Child:	207
	Child:	209
	Child:	211
	Child:	230
	Child:	235
	Child:	236
)

(Tool.187
	Help:	"Identify//Provides information about a feature"
	HelpTopic:	"Identify_tool"
	Update:	"View.IdentifyUpdate"
	Icon:	188
	Cursor:	"Cursors.ID"
	Apply:	"MGE.Identify2"
)

(AVIcon.188
	Name:	"ID"
	Res:	"Icons.ID"

)

(Tool.189
	Help:	"Pointer//Selects, moves, and resizes graphics"
	HelpTopic:	"Pointer_tool"
	Update:	"View.HasDataUpdate"
	Icon:	190
	Cursor:	"Cursors.Select"
	Apply:	"View.Select"
	Click:	"View.SelectTool"
)

(AVIcon.190
	Name:	"Select"
	Res:	"Icons.Select"

)

(Tool.191
	Disabled:	1
	Help:	"Vertex Edit//Adds, moves, and deletes vertices of features and graphics"
	HelpTopic:	"Vertex_Edit_tool"
	Update:	"View.SelectToEditUpdate"
	Icon:	192
	Cursor:	"Cursors.SelectEdit"
	Apply:	"View.SelectToEdit"
	Click:	"View.SelectToEditTool"
)

(AVIcon.192
	Name:	"SelectEdit"
	Res:	"Icons.SelectEdit"

)

(Tool.193
	Help:	"Select Feature//Selects features in the active themes by pointing or dragging"
	HelpTopic:	"Select_Feature_tool"
	Update:	"View.SelectableThemesUpdate"
	Icon:	194
	Cursor:	"Cursors.Default"
	Apply:	"View.SelectPoint"
)

(AVIcon.194
	Name:	"FeatureSelect"
	Res:	"Icons.FeatureSelect"

)

(Tool.195
	Help:	"Zoom In//Zooms in at a point you click or zooms in on a rectangle you drag"
	HelpTopic:	"Zoom_In_tool"
	Update:	"View.HasDataUpdate"
	Icon:	196
	Cursor:	"Cursors.ZoomIn"
	Apply:	"View.ZoomInTool"
)

(AVIcon.196
	Name:	"ZoomInTool"
	Res:	"Icons.ZoomInTool"

)

(Tool.197
	Help:	"Zoom Out//Zooms out from a point you click or zooms out to include a rectangle you drag"
	HelpTopic:	"Zoom_Out_tool"
	Update:	"View.HasDataUpdate"
	Icon:	198
	Cursor:	"Cursors.ZoomOut"
	Apply:	"View.ZoomOutTool"
)

(AVIcon.198
	Name:	"ZoomOutTool"
	Res:	"Icons.ZoomOutTool"

)

(Tool.199
	Help:	"Pan//Drags the display in the direction you move the cursor"
	HelpTopic:	"Pan_tool"
	Update:	"View.HasDataUpdate"
	Icon:	200
	Cursor:	"Cursors.Pan"
	Apply:	"View.Pan"
)

(AVIcon.200
	Name:	"Pan"
	Res:	"Icons.Pan"

)

(Tool.201
	Help:	"Measure//Measures distance"
	HelpTopic:	"Measure_tool"
	Update:	"View.HasDataUpdate"
	Icon:	202
	Cursor:	"Cursors.Measure"
	Apply:	"View.Measure"
)

(AVIcon.202
	Name:	"Measure"
	Res:	"Icons.Measure"

)

(Tool.203
	Disabled:	1
	Help:	"Hot Link//Follows a hot link in the active themes"
	HelpTopic:	"Hot_Link_tool"
	Update:	"View.HotLinkUpdate"
	Icon:	204
	Cursor:	"Cursors.Media"
	Apply:	"View.HotLink"
)

(AVIcon.204
	Name:	"Media"
	Res:	"Icons.Media"

)

(Tool.205
	Disabled:	1
	Help:	"Area of Interest//Sets the view's Area Of Interest for library-based themes"
	HelpTopic:	"Area_Of_Interest_tool"
	Update:	"View.AOIToolUpdate"
	Icon:	206
	Cursor:	"Cursors.Default"
	Apply:	"View.AOITool"
)

(AVIcon.206
	Name:	"AOI"
	Res:	"Icons.AOI"

)

(Tool.207
	Help:	"Label//Labels a feature in the active theme with data from its table"
	HelpTopic:	"Label_tool"
	Update:	"View.LabelToolUpdate"
	Icon:	208
	Cursor:	"Cursors.Tag"
	Apply:	"View.LabelTool"
)

(AVIcon.208
	Name:	"Tag"
	Res:	"Icons.Tag"

)

(Tool.209
	Help:	"Text//Creates text on the display"
	HelpTopic:	"Text_tool"
	Update:	"View.GraphicToolUpdate"
	Icon:	210
	Cursor:	"Cursors.Text"
	Apply:	"View.TextTool"
	Click:	"SymWin.DisplayFontPanel"
)

(AVIcon.210
	Name:	"Text"
	Res:	"Icons.Text"

)

(ToolMenu.211
	Help:	"Draw Point//Creates a point on the display"
	HelpTopic:	"Draw_tool"
	Update:	"View.PointToolUpdate"
	Icon:	212
	Cursor:	"Cursors.CrossHair"
	Apply:	"View.PointTool"
	Click:	"SymWin.DisplayMarkerPanel"
	Child:	213
	Child:	214
	Child:	216
	Child:	218
	Child:	220
	Child:	222
	Child:	224
	Child:	226
	Child:	228
)

(AVIcon.212
	Name:	"Point"
	Res:	"Icons.Point"

)

(Tool.213
	Help:	"Draw Point//Creates a point on the display"
	HelpTopic:	"Draw_tool"
	Update:	"View.PointToolUpdate"
	Icon:	212
	Cursor:	"Cursors.CrossHair"
	Apply:	"View.PointTool"
	Click:	"SymWin.DisplayMarkerPanel"
)

(Tool.214
	Help:	"Draw Straight Line//Creates a line on the display"
	HelpTopic:	"Draw_tool"
	Update:	"View.GraphicToolUpdate"
	Icon:	215
	Cursor:	"Cursors.CrossHair"
	Apply:	"View.LineTool"
	Click:	"SymWin.DisplayPenPanel"
)

(AVIcon.215
	Name:	"SelectLine"
	Res:	"Icons.SelectLine"

)

(Tool.216
	Help:	"Draw Line//Creates a line with two or more points on the display"
	HelpTopic:	"Draw_tool"
	Update:	"View.PolyLineToolUpdate"
	Icon:	217
	Cursor:	"Cursors.CrossHair"
	Apply:	"View.PolyLineTool"
	Click:	"SymWin.DisplayPenPanel"
)

(AVIcon.217
	Name:	"Lines"
	Res:	"Icons.Lines"

)

(Tool.218
	Help:	"Draw Rectangle//Creates a rectangle on the display"
	HelpTopic:	"Draw_tool"
	Update:	"View.PolyToolUpdate"
	Icon:	219
	Cursor:	"Cursors.CrossHair"
	Apply:	"View.RectTool"
	Click:	"SymWin.DisplayFillPanel"
)

(AVIcon.219
	Name:	"Rect"
	Res:	"Icons.Rect"

)

(Tool.220
	Help:	"Draw Circle//Creates a circle on the display"
	HelpTopic:	"Draw_tool"
	Update:	"View.PolyToolUpdate"
	Icon:	221
	Cursor:	"Cursors.CrossHair"
	Apply:	"View.CircleTool"
	Click:	"SymWin.DisplayFillPanel"
)

(AVIcon.221
	Name:	"Disk"
	Res:	"Icons.Disk"

)

(Tool.222
	Help:	"Draw Polygon//Creates a polygon on the display"
	HelpTopic:	"Draw_tool"
	Update:	"View.PolyToolUpdate"
	Icon:	223
	Cursor:	"Cursors.CrossHair"
	Apply:	"View.PolyTool"
	Click:	"SymWin.DisplayFillPanel"
)

(AVIcon.223
	Name:	"Poly"
	Res:	"Icons.Poly"

)

(Tool.224
	Disabled:	1
	Help:	"Draw Line to Split Feature//Creates a line to split line features"
	HelpTopic:	"Draw_tool"
	Update:	"View.SplitLineToolUpdate"
	Icon:	225
	Cursor:	"Cursors.CrossHair"
	Apply:	"View.SplitTool"
)

(AVIcon.225
	Name:	"SplitLine"
	Res:	"Icons.SplitLine"

)

(Tool.226
	Disabled:	1
	Help:	"Draw Line to Split Polygon//Creates a line to split polygon features"
	HelpTopic:	"Draw_tool"
	Update:	"View.SplitPolyToolUpdate"
	Icon:	227
	Cursor:	"Cursors.CrossHair"
	Apply:	"View.SplitTool"
)

(AVIcon.227
	Name:	"SplitPoly"
	Res:	"Icons.SplitPoly"

)

(Tool.228
	Disabled:	1
	Help:	"Draw Line to Append Polygon//Appends a new polygon adjacent to other polygons"
	HelpTopic:	"Draw_tool"
	Update:	"View.AutoCompleteUpdate"
	Icon:	229
	Cursor:	"Cursors.CrossHair"
	Apply:	"View.AutoCompleteTool"
)

(AVIcon.229
	Name:	"AutoComplete"
	Res:	"Icons.AutoComplete"

)

(ToolMenu.230
	Disabled:	1
	Invisible:	1
	Help:	"Snap//Sets the general snapping tolerance for the editable theme"
	HelpTopic:	"Snap_tools"
	Update:	"View.SnapToolUpdate"
	Icon:	231
	Cursor:	"Cursors.Default"
	Apply:	"View.SnapTool"
	Child:	232
	Child:	233
)

(AVIcon.231
	Name:	"SnapTool"
	Res:	"Icons.SnapTool"

)

(Tool.232
	Disabled:	1
	Invisible:	1
	Help:	"Snap//Sets the general snapping tolerance for the editable theme"
	HelpTopic:	"Snap_tools"
	Update:	"View.SnapToolUpdate"
	Icon:	231
	Cursor:	"Cursors.Default"
	Apply:	"View.SnapTool"
)

(Tool.233
	Disabled:	1
	Invisible:	1
	Help:	"Snap//Sets the interactive snapping tolerance for the editable theme"
	HelpTopic:	"Snap_tools"
	Update:	"View.InteractiveSnapToolUpdate"
	Icon:	234
	Cursor:	"Cursors.Default"
	Apply:	"View.InteractiveSnapTool"
)

(AVIcon.234
	Name:	"SnapFeatureTool"
	Res:	"Icons.SnapFeatureTool"

)

(Space.235
)

(Tool.236
	Help:	"Identify MGE features//Identifies MGE features ..."
	Icon:	237
	Cursor:	"Cursors.Bullseye"
	Apply:	"MGE.Identify"
)

(AVIcon.237
	Name:	"Edit"
	Res:	"Icons.Edit"

)

(AVIcon.238
	Name:	"Icon"
	Res:	"View.Icon"

)

(AVDLog.239
	Name:	"DlgMapManager"
	X:	43
	Y:	53
	W:	310
	H:	207
	ConstrainedControlNames:	240
	ConstrainedControlNames:	241
	Constraints:	242
	Constraints:	243
	Server:	244
	ControlPanel:	245
	ObjectTag:	261
	Title:	"Map Manager"
	EscapeEnabled:	1
	Resizable:	1
	AlwaysOnTop:	1
	HasTitleBar:	1
	Closeable:	1
	Open:	"MGE.DlgMapman.Open"
	DefaultButton:	262
)

(AVStr.240
	S:	"btnApply"
)

(AVStr.241
	S:	"CmdCancel"
)

(Numb.242
	N:	85.00000000000000
)

(Numb.243
	N:	85.00000000000000
)

(Nil.244
)

(CPanel.245
	Child:	246
	Child:	248
	Child:	249
	Child:	250
	Child:	251
	Child:	252
	Child:	253
	ResBox:	254
	ResBox:	255
	ResBox:	256
	ResBox:	257
	ResBox:	258
	ResBox:	259
	ResBox:	260
	Listening:	1
)

(AVLBox.246
	InternalName:	"lbxDrawings"
	NextControl:	244
	ContentKind:	4
	Constraints:	0x55
	RowCount:	1
	ColumnCount:	1
	Listening:	1
	VerticalScroll:	1
	Select:	"MGE.DlgMapman.Lbxdrawings.Select"
	SelectionStyle:	247
)

(AVEnum.247
	Name:	"LISTBOX_SELECTION_MULTIRANGE"
)

(LButn.248
	InternalName:	"btnApply"
	Update:	"MGE.DlgMapman.BtnApply.Update"
	Label:	"Apply"
	Click:	"MGE.DlgMapman.BtnApply.Click"
)

(LButn.249
	InternalName:	"CmdCancel"
	Label:	"Cancel"
	Click:	"MGE.DlgMapman.BtnCancel.Click"
)

(TextLabel.250
	InternalName:	"aTextLabel4"
	Constraints:	0x55
	Label:	"You have identified the following drawings, select to view."
	Listening:	1
)

(TextLabel.251
	InternalName:	"aTextLabel1"
	Invisible:	1
	Constraints:	0x55
	Label:	"Cat"
	Listening:	1
)

(TextLabel.252
	InternalName:	"aTextLabel2"
	Invisible:	1
	Constraints:	0x55
	Label:	"Name"
	Listening:	1
)

(TextLabel.253
	InternalName:	"aTextLabel3"
	Invisible:	1
	Constraints:	0x55
	Label:	"Description"
	Listening:	1
)

(RectD.254
	Left:	9.00000000000000
	Top:	170.00000000000000
	Right:	304.00000000000000
	Bottom:	35.00000000000000
)

(RectD.255
	Left:	232.00000000000000
	Top:	202.00000000000000
	Right:	301.00000000000000
	Bottom:	176.00000000000000
)

(RectD.256
	Left:	155.00000000000000
	Top:	202.00000000000000
	Right:	224.00000000000000
	Bottom:	176.00000000000000
)

(RectD.257
	Left:	12.00000000000000
	Top:	31.00000000000000
	Right:	336.00000000000000
	Bottom:	10.00000000000000
)

(RectD.258
	Left:	19.00000000000000
	Top:	53.00000000000000
	Right:	97.00000000000000
	Bottom:	37.00000000000000
)

(RectD.259
	Left:	96.00000000000000
	Top:	53.00000000000000
	Right:	151.00000000000000
	Bottom:	37.00000000000000
)

(RectD.260
	Left:	208.00000000000000
	Top:	52.00000000000000
	Right:	263.00000000000000
	Bottom:	36.00000000000000
)

(Nil.261
)

(Nil.262
)

(AVDLog.263
	Name:	"dlgIdentify"
	X:	20
	Y:	50
	W:	286
	H:	364
	ConstrainedControlNames:	264
	ConstrainedControlNames:	265
	Constraints:	266
	Constraints:	267
	Server:	244
	ControlPanel:	268
	ObjectTag:	261
	Title:	"Identify Results"
	EscapeEnabled:	1
	Resizable:	1
	AlwaysOnTop:	1
	HasTitleBar:	1
	Closeable:	1
	Open:	"MGE.dlgIdentify.Open"
	DefaultButton:	288
)

(AVStr.264
	S:	"btnClear"
)

(AVStr.265
	S:	"btnClearAll"
)

(Numb.266
)

(Numb.267
)

(CPanel.268
	Child:	269
	Child:	271
	Child:	273
	Child:	275
	Child:	276
	Child:	277
	Child:	278
	Child:	279
	ResBox:	280
	ResBox:	281
	ResBox:	282
	ResBox:	283
	ResBox:	284
	ResBox:	285
	ResBox:	286
	ResBox:	287
	Listening:	1
)

(AVLBox.269
	InternalName:	"lbxFeatures"
	NextControl:	244
	ContentKind:	4
	RowCount:	1
	ColumnCount:	1
	HorizontalScroll:	1
	Listening:	1
	VerticalScroll:	1
	Select:	"MGE.dlgIdentify.lbxFeatures.Select"
	SelectionStyle:	270
)

(AVEnum.270
	Name:	"LISTBOX_SELECTION_SINGLECELL"
)

(AVLBox.271
	InternalName:	"lbxAttribute"
	NextControl:	244
	ContentKind:	4
	RowCount:	1
	ColumnCount:	1
	HorizontalScroll:	1
	Listening:	1
	VerticalScroll:	1
	SelectionStyle:	272
)

(AVEnum.272
	Name:	"LISTBOX_SELECTION_SINGLEROW"
)

(AVLBox.273
	InternalName:	"lbxExternal"
	NextControl:	244
	ContentKind:	4
	RowCount:	1
	ColumnCount:	1
	HorizontalScroll:	1
	Listening:	1
	VerticalScroll:	1
	SelectionStyle:	274
)

(AVEnum.274
	Name:	"LISTBOX_SELECTION_SINGLEROW"
)

(LButn.275
	InternalName:	"btnClear"
	Update:	"MGE.dlgIdentify.btnClear.Update"
	Label:	"Clear"
	Click:	"MGE.dlgIdentify.btnClear.Click"
)

(LButn.276
	InternalName:	"btnClearAll"
	Update:	"MGE.dlgIdentify.btnClearAll.Update"
	Label:	"Clear All"
	Click:	"MGE.dlgIdentify.btnClearAll.Click"
)

(TextLabel.277
	InternalName:	"aTextLabel16"
	Label:	"Features:"
	Listening:	1
)

(TextLabel.278
	InternalName:	"aTextLabel19"
	Label:	"Attribute Tables:"
	Listening:	1
)

(TextLabel.279
	InternalName:	"aTextLabel20"
	Label:	"External Tables:"
	Listening:	1
)

(RectD.280
	Left:	7.00000000000000
	Top:	86.00000000000000
	Right:	276.00000000000000
	Bottom:	24.00000000000000
)

(RectD.281
	Left:	10.00000000000000
	Top:	323.00000000000000
	Right:	142.00000000000000
	Bottom:	108.00000000000000
)

(RectD.282
	Left:	147.00000000000000
	Top:	323.00000000000000
	Right:	279.00000000000000
	Bottom:	108.00000000000000
)

(RectD.283
	Left:	147.00000000000000
	Top:	355.00000000000000
	Right:	209.00000000000000
	Bottom:	330.00000000000000
)

(RectD.284
	Left:	64.00000000000000
	Top:	355.00000000000000
	Right:	126.00000000000000
	Bottom:	330.00000000000000
)

(RectD.285
	Left:	9.00000000000000
	Top:	21.00000000000000
	Right:	77.00000000000000
	Bottom:	4.00000000000000
)

(RectD.286
	Left:	15.00000000000000
	Top:	105.00000000000000
	Right:	104.00000000000000
	Bottom:	89.00000000000000
)

(RectD.287
	Left:	149.00000000000000
	Top:	104.00000000000000
	Right:	253.00000000000000
	Bottom:	91.00000000000000
)

(Nil.288
)

(AVDLog.289
	Name:	"dlgQuery"
	X:	21
	Y:	46
	W:	389
	H:	360
	ConstrainedControlNames:	290
	ConstrainedControlNames:	291
	ConstrainedControlNames:	292
	ConstrainedControlNames:	293
	ConstrainedControlNames:	294
	ConstrainedControlNames:	295
	ConstrainedControlNames:	296
	ConstrainedControlNames:	297
	ConstrainedControlNames:	298
	ConstrainedControlNames:	299
	ConstrainedControlNames:	300
	ConstrainedControlNames:	301
	ConstrainedControlNames:	302
	ConstrainedControlNames:	303
	Constraints:	304
	Constraints:	305
	Constraints:	306
	Constraints:	307
	Constraints:	308
	Constraints:	309
	Constraints:	310
	Constraints:	311
	Constraints:	312
	Constraints:	313
	Constraints:	314
	Constraints:	315
	Constraints:	316
	Constraints:	317
	Server:	244
	ControlPanel:	318
	ObjectTag:	261
	Title:	"Query"
	EscapeEnabled:	1
	Resizable:	1
	AlwaysOnTop:	1
	HasTitleBar:	1
	Closeable:	1
	Open:	"MGE.dlgQuery.Open"
	DefaultButton:	366
)

(AVStr.290
	S:	"aLabelButton21"
)

(AVStr.291
	S:	"aLabelButton22"
)

(AVStr.292
	S:	"aLabelButton23"
)

(AVStr.293
	S:	"aLabelButton24"
)

(AVStr.294
	S:	"aLabelButton25"
)

(AVStr.295
	S:	"aLabelButton26"
)

(AVStr.296
	S:	"aLabelButton27"
)

(AVStr.297
	S:	"aLabelButton28"
)

(AVStr.298
	S:	"aLabelButton29"
)

(AVStr.299
	S:	"aLabelButton30"
)

(AVStr.300
	S:	"btnClear"
)

(AVStr.301
	S:	"btnNewSet"
)

(AVStr.302
	S:	"btnAddToSet"
)

(AVStr.303
	S:	"btnSelectFromSet"
)

(Numb.304
)

(Numb.305
)

(Numb.306
)

(Numb.307
)

(Numb.308
)

(Numb.309
)

(Numb.310
)

(Numb.311
)

(Numb.312
)

(Numb.313
)

(Numb.314
)

(Numb.315
)

(Numb.316
)

(Numb.317
)

(CPanel.318
	Child:	319
	Child:	354
	Child:	355
	Child:	359
	Child:	360
	ResBox:	361
	ResBox:	362
	ResBox:	363
	ResBox:	364
	ResBox:	365
	Listening:	1
)

(CPanel.319
	InternalName:	"aControlPanel13"
	Update:	"MGE.dlgQuery.aControlPanel13.Update"
	Child:	320
	Child:	321
	Child:	323
	Child:	325
	Child:	326
	Child:	327
	Child:	328
	Child:	329
	Child:	330
	Child:	331
	Child:	332
	Child:	333
	Child:	334
	Child:	335
	Child:	336
	Child:	337
	ResBox:	338
	ResBox:	339
	ResBox:	340
	ResBox:	341
	ResBox:	342
	ResBox:	343
	ResBox:	344
	ResBox:	345
	ResBox:	346
	ResBox:	347
	ResBox:	348
	ResBox:	349
	ResBox:	350
	ResBox:	351
	ResBox:	352
	ResBox:	353
	Label:	"Define a query"
	VisibleBorder:	1
	Listening:	1
)

(TextBox.320
	InternalName:	"tbxQuery"
	Update:	"MGE.dlgQuery.tbxQuery.Update"
	Listening:	1
	Click:	"MGE.dlgQuery.tbxQuery.Click"
	VerticalScroll:	1
	NextControl:	244
)

(AVLBox.321
	InternalName:	"lbxFields"
	Update:	"MGE.dlgQuery.lbxFields.Update"
	NextControl:	244
	ContentKind:	4
	RowCount:	1
	ColumnCount:	1
	Listening:	1
	VerticalScroll:	1
	Select:	"MGE.dlgQuery.lbxFields.Select"
	SelectionStyle:	322
	Apply:	"MGE.dlgQuery.lbxFields.Apply"
)

(AVEnum.322
	Name:	"LISTBOX_SELECTION_SINGLECELL"
)

(AVLBox.323
	InternalName:	"lbxValues"
	Update:	"MGE.dlgQuery.lbxValues.Update"
	NextControl:	244
	ContentKind:	4
	RowCount:	1
	ColumnCount:	1
	Listening:	1
	VerticalScroll:	1
	Select:	"MGE.dlgQuery.lbxValues.Select"
	SelectionStyle:	324
	Apply:	"MGE.dlgQuery.lbxValues.Apply"
)

(AVEnum.324
	Name:	"LISTBOX_SELECTION_SINGLECELL"
)

(LButn.325
	InternalName:	"aLabelButton21"
	Update:	"MGE.dlgQuery.aLabelButton21.Update"
	Label:	"="
	Click:	"MGE.dlgQuery.aLabelButton.click"
)

(LButn.326
	InternalName:	"aLabelButton22"
	Update:	"MGE.dlgQuery.aLabelButton22.Update"
	Label:	"<>"
	Click:	"MGE.dlgQuery.aLabelButton.click"
)

(LButn.327
	InternalName:	"aLabelButton23"
	Update:	"MGE.dlgQuery.aLabelButton23.Update"
	Label:	">"
	Click:	"MGE.dlgQuery.aLabelButton.click"
)

(LButn.328
	InternalName:	"aLabelButton24"
	Update:	"MGE.dlgQuery.aLabelButton24.Update"
	Label:	"<"
	Click:	"MGE.dlgQuery.aLabelButton.click"
)

(LButn.329
	InternalName:	"aLabelButton25"
	Update:	"MGE.dlgQuery.aLabelButton25.Update"
	Label:	"or"
	Click:	"MGE.dlgQuery.btnAnd.click"
)

(LButn.330
	InternalName:	"aLabelButton26"
	Update:	"MGE.dlgQuery.aLabelButton26.Update"
	Label:	">="
	Click:	"MGE.dlgQuery.aLabelButton.click"
)

(LButn.331
	InternalName:	"aLabelButton27"
	Update:	"MGE.dlgQuery.aLabelButton27.Update"
	Label:	"<="
	Click:	"MGE.dlgQuery.aLabelButton.click"
)

(LButn.332
	InternalName:	"aLabelButton28"
	Update:	"MGE.dlgQuery.aLabelButton28.Update"
	Label:	"and"
	Click:	"MGE.dlgQuery.btnAnd.click"
)

(LButn.333
	InternalName:	"aLabelButton29"
	Update:	"MGE.dlgQuery.aLabelButton29.Update"
	Label:	"<>"
	Click:	"MGE.dlgQuery.aLabelButton.click"
)

(LButn.334
	InternalName:	"aLabelButton30"
	Update:	"MGE.dlgQuery.aLabelButton30.Update"
	Label:	"not"
	Click:	"MGE.dlgQuery.btnAnd.click"
)

(LButn.335
	InternalName:	"btnClear"
	Update:	"MGE.dlgQuery.btnClear.Update"
	Label:	"Clear Query String"
	Click:	"MGE.dlgQuery.btnClear.Click"
)

(TextLabel.336
	InternalName:	"aTextLabel3"
	Constraints:	0x55
	Label:	"Fields"
	Listening:	1
)

(TextLabel.337
	InternalName:	"aTextLabel4"
	Constraints:	0x55
	Label:	"Values"
	Listening:	1
)

(RectD.338
	Left:	8.00000000000000
	Top:	173.00000000000000
	Right:	265.00000000000000
	Bottom:	114.00000000000000
)

(RectD.339
	Left:	7.00000000000000
	Top:	107.00000000000000
	Right:	134.00000000000000
	Bottom:	35.00000000000000
)

(RectD.340
	Left:	230.00000000000000
	Top:	108.00000000000000
	Right:	363.00000000000000
	Bottom:	36.00000000000000
)

(RectD.341
	Left:	141.00000000000000
	Top:	56.00000000000000
	Right:	161.00000000000000
	Bottom:	36.00000000000000
)

(RectD.342
	Left:	161.00000000000000
	Top:	56.00000000000000
	Right:	181.00000000000000
	Bottom:	36.00000000000000
)

(RectD.343
	Left:	181.00000000000000
	Top:	56.00000000000000
	Right:	201.00000000000000
	Bottom:	36.00000000000000
)

(RectD.344
	Left:	141.00000000000000
	Top:	81.00000000000000
	Right:	161.00000000000000
	Bottom:	61.00000000000000
)

(RectD.345
	Left:	203.00000000000000
	Top:	81.00000000000000
	Right:	223.00000000000000
	Bottom:	61.00000000000000
)

(RectD.346
	Left:	201.00000000000000
	Top:	56.00000000000000
	Right:	221.00000000000000
	Bottom:	36.00000000000000
)

(RectD.347
	Left:	162.00000000000000
	Top:	81.00000000000000
	Right:	182.00000000000000
	Bottom:	61.00000000000000
)

(RectD.348
	Left:	182.00000000000000
	Top:	81.00000000000000
	Right:	202.00000000000000
	Bottom:	61.00000000000000
)

(RectD.349
	Left:	178.00000000000000
	Top:	104.00000000000000
	Right:	198.00000000000000
	Bottom:	84.00000000000000
)

(RectD.350
	Left:	159.00000000000000
	Top:	104.00000000000000
	Right:	179.00000000000000
	Bottom:	84.00000000000000
)

(RectD.351
	Left:	269.00000000000000
	Top:	171.00000000000000
	Right:	363.00000000000000
	Bottom:	150.00000000000000
)

(RectD.352
	Left:	9.00000000000000
	Top:	33.00000000000000
	Right:	77.00000000000000
	Bottom:	17.00000000000000
)

(RectD.353
	Left:	231.00000000000000
	Top:	33.00000000000000
	Right:	290.00000000000000
	Bottom:	17.00000000000000
)

(LButn.354
	InternalName:	"btnNewSet"
	Update:	"MGE.dlgQuery.btnQuery.Update"
	Label:	"New Set"
	Click:	"MGE.dlgQuery.btnQuery.Click"
)

(CPanel.355
	InternalName:	"cpaQueryResults"
	Update:	"MGE.dlgQuery.aControlPanel33.Update"
	Child:	356
	ResBox:	358
	Label:	"Query Results"
	VisibleBorder:	1
	Listening:	1
)

(AVLBox.356
	InternalName:	"lbxQueryResults"
	Update:	"MGE.dlgQuery.lbxQueryResults.Update"
	NextControl:	244
	ContentKind:	4
	HorizontalScroll:	1
	Listening:	1
	VerticalScroll:	1
	Select:	"MGE.dlgQuery.lbxQueryResults.Select"
	SelectionStyle:	357
	Apply:	"MGE.dlgQuery.lbxQueryResults.Apply"
)

(AVEnum.357
	Name:	"LISTBOX_SELECTION_SINGLEROW"
)

(RectD.358
	Left:	9.00000000000000
	Top:	130.00000000000000
	Right:	359.00000000000000
	Bottom:	21.00000000000000
)

(LButn.359
	InternalName:	"btnAddToSet"
	Update:	"MGE.dlgQuery.btnQuery.Update"
	Label:	"Add to Set"
	Click:	"MGE.dlgQuery.btnQuery.Click"
)

(LButn.360
	InternalName:	"btnSelectFromSet"
	Update:	"MGE.dlgQuery.btnQuery.Update"
	Label:	"Select from Set"
	Click:	"MGE.dlgQuery.btnQuery.Click"
)

(RectD.361
	Left:	10.00000000000000
	Top:	193.00000000000000
	Right:	383.00000000000000
	Bottom:	3.00000000000000
)

(RectD.362
	Left:	51.00000000000000
	Top:	217.00000000000000
	Right:	140.00000000000000
	Bottom:	196.00000000000000
)

(RectD.363
	Left:	10.00000000000000
	Top:	352.00000000000000
	Right:	380.00000000000000
	Bottom:	216.00000000000000
)

(RectD.364
	Left:	148.00000000000000
	Top:	217.00000000000000
	Right:	237.00000000000000
	Bottom:	196.00000000000000
)

(RectD.365
	Left:	246.00000000000000
	Top:	217.00000000000000
	Right:	335.00000000000000
	Bottom:	196.00000000000000
)

(Nil.366
)

(Script.367
	Name:	"MGE.AddDGNasShape"
	SourceCode:	"'\n' This script processes all the DGN files in dictCatDGNs, converts DGN file to\n' shape file, and merge multi-tile shape files into a single layer,\n' returns a list of after-process themes\n'\nstrPrjDir = self.get(0)\ndictCatDGNs = self.get(1)\nlstThemes = {}\n\nthePrj = av.getProject\nstrOutputDir = thePrj.getWorkDir.asString\n\nthemeList = {\"point\",\"line\",\"polygon\",\"annotation\"}\n\nfor each strCat in dictCatDGNs.returnKeys\n  lstDGN = dictCatDGNs.get(strCat)\n  if (lstDGN.count = 1) then\n    ' Process four themes per
 design file (point, line, polygon, annotation),\n    ' convert them to shape files\n    '\n    strDGNFile = lstDGN.get(0)\n    for each strThmType in themeList\n      srcCurrent = SrcName.Make(strPrjDir + \"\\dgn\\\" + strDGNfile ++ strThmType)\n      if (srcCurrent <> nil) then\n        strOutputFile = strOutputDir + \"\\\" + strDGNFile.left(strDGNFile.count - 4) \n                        + \"_\" + strThmType + \".shp\"\n        t = theme.make(srcCurrent)                        \n        thmCurrent = av.run (\"Util.convertToSh
ape\", {t, strOutputFile}) \n        if (thmCurrent <> nil) then\n          ' store this theme into dictFinalThms\n          'dictFinalThms.add (strCat ++ strThmType, thmCurrent)\n          '\n          ' symbolize this theme based on DGN colors\n          '\n          dictLegSym = dictionary.make (20)\n          listClss = t.getLegend.getClassifications\n          i = 0\n          for each s in t.getLegend.getSymbols\n            dictLegSym.add (listClss.get(i).returnMaximum, s.getColor.clone)\n            i = i + 1\n  
        end  \n          theLegend = thmCurrent.getlegend\n          theLegend.unique (thmCurrent, \"Color\")\n          listClss = theLegend.getClassifications\n          listSyms = theLegend.getSymbols\n          numCount = listSyms.count        \n          for each i in 0 .. (numCount - 1)\n            listSyms.get(i).setColor (dictLegsym.get(listClss.get(i).ReturnMaximum))\n          end\n          thmCurrent.updateLegend   \n          '\n          ' if it's an annotation theme, them make text field visible,\n       
   ' and set text field as it's default label field\n          '\n          if (strThmType = \"annotation\") then\n            ftabAfterMerge = thmCurrent.getFtab\n            fldText = ftabAfterMerge.findField (\"text\")\n            if (fldText <> nil) then\n              fldText.setVisible (true)\n              thmCurrent.setLabelfield (fldText)\n            end  \n          end\n          '\n          ' add theme into MGE view\n          '\n          thmCurrent.setname (strCat ++ strThmType)\n          lstThemes.add (thm
Current)                        \n        end  \n      end  \n    end   \n  else\n    for each strThmType in themeList\n      lstThms = {}\n      for each strDGN in lstDGN\n        strDGNFile = strPrjDir + \"\\dgn\\\" + strDGN.trim\n        srcCurrent = SrcName.Make(strDGNfile ++ strThmType)\n        if (srcCurrent <> nil) then\n          lstThms.add (Theme.make(srcCurrent))\n        end\n      end  ' for each tile\n      '\n      'merge themes\n      '\n      thmCurrent = av.run (\"Util.MergeThemes\", {lstThms, strOutputDir + \"\\
\" \n                              + strDGNFile.right(3) + \"_\" + strThmType + \".shp\"})\n      if (thmCurrent <> nil) then                                                \n        ' store this theme into dictFinalThms        \n        'dictFinalThms.add (strCat ++ strThmType, thmCurrent) \n        '\n        ' symbolize this theme based on DGN colors\n        '\n        dictLegSym = dictionary.make (20)\n        for each t in lstThms\n          listClss = t.getLegend.getClassifications\n          i = 0\n          for eac
h s in t.getLegend.getSymbols\n            dictLegSym.add (listClss.get(i).returnMaximum, s.getColor.clone)\n            i = i + 1\n          end  \n        end\n        theLegend = thmCurrent.getlegend\n        theLegend.unique (thmCurrent, \"Color\")\n        listClss = theLegend.getClassifications\n        listSyms = theLegend.getSymbols\n        numCount = listSyms.count        \n        for each i in 0 .. (numCount - 1)\n          listSyms.get(i).setColor (dictLegsym.get(listClss.get(i).returnMaximum))\n        end\n
        thmCurrent.updateLegend     \n        '\n        ' if it's an annotation theme, them make text field visible,\n        ' and set text field as it's default label field\n        '\n        if (strThmType = \"annotation\") then\n          ftabAfterMerge = thmCurrent.getFtab\n          fldText = ftabAfterMerge.findField (\"text\")\n          if (fldText <> nil) then\n            fldText.setVisible (true)\n            thmCurrent.setLabelfield (fldText)\n          end  \n        end\n        '\n        ' add theme into MG
E view\n        '\n        thmCurrent.setname (strCat ++ strThmType)\n        lstThemes.add (thmCurrent)        \n      end  \n    end  ' for each theme type\n  end  ' for multi-tile dgn\nend  ' for each category\n\nreturn lstThemes"
)

(Script.368
	Name:	"MGE.AddDGNs"
	SourceCode:	"'\n' if index file doesn't exist within the MGE workspace, prompt user with\n' a list of DGNs found in workspace/dgn directory, and add them them into\n' a view\n'\nthePrj = av.getProject\nLstKeyViews = thePrj.getDocsWithGUI (thePrj.findGUI(\"Key_view\"))\nif (lstKeyViews.count = 0) then\n  msgbox.info (\"The key view is missing!\", \"\")\n  return nil\nend\n\ndictAll = lstKeyviews.get(0).getObjectTag\nstrOutputDir = thePrj.getWorkDir.asString\nstrProjDir = dictAll.get (\"ProjectWorkspace\").clone.asString\n\nDGNDir = filename.mer
ge (strProjDir, \"dgn\")\n'All files that can be read by ArcView\n'\nthemeTypeList = {\"point\",\"line\",\"polygon\",\"annotation\"}\nlstFiles = DGNDir.readFiles (\"*.*\")\nif (lstFiles.count = 0) then\n  thePrj.removeDoc (lstKeyViews.get(0))\n  exit\nend\ndictDGNs = dictionary.make (lstFiles.count)\nfor each fnDGN in lstFiles\n  'validate the file\n  for each strThmType in themeTypeList\n    srcTemp = SrcName.Make(fnDGN.asString ++ strThmType)  \n    if (srcTemp <> nil) then\n      dictDGNs.add (fnDGN.getBaseName.asString, fnDGN)\n  
    break\n    end\n  end\nend\n\nlstDGNs = DictDGNs.returnKeys\nlstDGNs.sort(true)\nlstSelected = msgbox.MultilistAsString (lstDGNs, \"Select DNG files you want to view\", \"\")\nif (lstSelected.count = 0) then\n  thePrj.removeDoc (lstKeyViews.get(0))\n  exit\nend\n\nvwMGE = view.makeWithGUI (\"MGEView\")\nvwMGE.setName (\"MGE View for\" ++ strProjDir)\ndictMGEThemes = dictionary.make (10)\n\nfor each strShortFile in lstSelected\n  strDGNFile = dictDGNs.get(strShortFile).asString\n  for each strThmType in themeTypeList   \n    srcCur
rent = SrcName.Make(strDGNFile.asString ++ strThmType)\n    if (srcCurrent <> nil) then\n      thmCurrent = theme.make(srcCurrent)\n      theFtab = thmCurrent.getFtab\n      theFtab.getSelection.clearAll\n      vwMGE.addTheme (thmCurrent)\n      \n      lstCurrentLinkage = av.run (\"MGE.join\", theFtab)          \n      dictMGEThemes.add (thmCurrent, lstCurrentLinkage)   \n    end\n  end\nend\n\ndictAll.set (\"MGETheme\", dictMGEThemes)\n\nvwMGE.getWin.open\nvwMGE.getWin.Maximize\n"
)

(Script.369
	Name:	"MGE.dlgIdentify.btnClear.Click"
	SourceCode:	"'\n' Name:        MGE.dlgIdentify.btnClear.Click\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: responses to button's click event, \n'              removes the selected entry from identify dialog\n'\n' Topics:      Dialog Designer\n' Search Keys: Button\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\ndlgIdentify = self.getDialog\nlbxFeatures = dlgIdentify.findByName (\"lbxFeatures\")\nlbxAttribute = dlgIde
ntify.findByName (\"lbxAttribute\")\nlbxExternal = dlgIdentify.findByName (\"lbxExternal\")\n\ndictIdentify = dlgIdentify.getObjectTag\nstrIDlabel = lbxFeatures.getSelection.get(0)\ndictIdentify.remove (strIDLabel)\n\nlbxFeatures.deleteRows (1)\nlbxAttribute.defineFromList ({})\nlbxExternal.defineFromList ({})\nif (lbxFeatures.getRowCount > 0) then\n  lbxFeatures.setSelection (rect.make(0@0, 1@1), false)\n  lbxFeatures.select\nend\n\nbtnClear = dlgIdentify.findByName (\"btnClear\")\nav.run (\"MGE.dlgIdentify.btnClear.Update\", btn
Clear)"
)

(Script.370
	Name:	"MGE.dlgIdentify.btnClear.Update"
	SourceCode:	"'\n' Name:        MGE.dlgIdentify.btnClear.Update\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: responses to btnClear's update event\n'\n' Topics:      Dialog Designer\n' Search Keys: button update\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n'\ndlgIdentify = self.getDialog\nlbxFeatures = dlgIdentify.findByName (\"lbxFeatures\")\nbtnClearAll = dlgIdentify.findByName (\"btnClearAll\")\n\nself.setEnabled (lbx
Features.getSelection.count > 0)\nbtnClearAll.setEnabled (lbxFeatures.getList.count > 0)\n\n\n"
)

(Script.371
	Name:	"MGE.dlgIdentify.btnClearAll.Click"
	SourceCode:	"'\n' Name:        MGE.dlgIdentify.btnClearAll.Click\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Responses to the button's click event,\n'              cleans identify dialog\n'\n' Topics:      Dialog Designer\n' Search Keys: Button\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\ndlgIdentify = self.getDialog\nlbxFeatures = dlgIdentify.findByName (\"lbxFeatures\")\nlbxAttribute = dlgIdentify.findByName (\"
lbxAttribute\")\nlbxExternal = dlgIdentify.findByName (\"lbxExternal\")\n\nlbxFeatures.empty\nlbxAttribute.empty\nlbxExternal.empty\n\ndlgIdentify.setObjectTag (nil)\n\nbtnClearAll = dlgIdentify.findByName (\"btnClearAll\")\nav.run (\"MGE.dlgIdentify.btnClearAll.Update\", btnClearAll)"
)

(Script.372
	Name:	"MGE.dlgIdentify.btnClearAll.Update"
	SourceCode:	"'\n' Name:        MGE.dlgIdentify.btnClearAll.Update\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: responses to btnClearAll's update event\n'\n' Topics:      Dialog Designer\n' Search Keys: button update\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n'\ndlgIdentify = self.getDialog\nlbxFeatures = dlgIdentify.findByName (\"lbxFeatures\")\nbtnClear = dlgIdentify.findByName (\"btnClear\")\n\nself.setEnabled (lbx
Features.getList.count > 0)\nbtnClear.setEnabled (lbxFeatures.getSelection.count > 0)\n\n"
)

(Script.373
	Name:	"MGE.dlgIdentify.Close"
	SourceCode:	"'\n' Name:        MGE.dlgIdentify.Close\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Responses to dlgIdentify's close event,\n'              clears objecttag\n'\n' Topics:      Dialog Designer\n' Search Keys: button close\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\nself.setObjectTag (nil)\n"
)

(Script.374
	Name:	"MGE.dlgIdentify.lbxAttribute.Apply"
	SourceCode:	"Return nil"
)

(Script.375
	Name:	"MGE.dlgIdentify.lbxAttribute.Select"
	SourceCode:	"Return nil"
)

(Script.376
	Name:	"MGE.dlgIdentify.lbxAttribute.Update"
	SourceCode:	"Return nil"
)

(Script.377
	Name:	"MGE.dlgIdentify.lbxExternal.Apply"
	SourceCode:	"Return nil"
)

(Script.378
	Name:	"MGE.dlgIdentify.lbxExternal.Select"
	SourceCode:	"Return nil"
)

(Script.379
	Name:	"MGE.dlgIdentify.lbxExternal.Update"
	SourceCode:	"Return nil"
)

(Script.380
	Name:	"MGE.dlgIdentify.lbxFeatures.Apply"
	SourceCode:	"Return nil"
)

(Script.381
	Name:	"MGE.dlgIdentify.lbxFeatures.Select"
	SourceCode:	"'\n' Name:        MGE.dlgIdentify.lbxFeatures.Select\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Responses to the lbxFeatures's select event.\n'\n' Topics:      Dialog Designer\n' Search Keys: select listBox\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\ndlgIdentify = self.getDialog\nlbxAttribute = dlgIdentify.findByName (\"lbxAttribute\")\nlbxExternal = dlgIdentify.findByName (\"lbxExternal\")\nlbxAttri
bute.empty\nlbxExternal.empty\n\nstrIDlabel = self.getSelection.get(0)\ndictIdentify = self.getDialog.getObjectTag\ndictFeatures = dictIdentify.get (\"dictFeatures\")\ndictVtab = dictIdentify.get(\"LstAttribute\")\n\nlbxAttribute.defineFromList (dictIdentify.get (\"lstAttribute\").get(strIDlabel))\nlbxExternal.defineFromList (dictIdentify.get(\"lstExternal\").get(strIDlabel))\n'\n' update enable property of button btnClear and btnClearAll\n'\nself.broadcastUpdate\n'\n' flush selected feature\n'\nt = dictFeatures.get(strIDLabel).get
(0)\ntheFtab = t.getFtab\nrec = dictFeatures.get(strIDLabel).get(1)\nav.run (\"Util.FlashShape\", {dictIdentify.get(\"view\"), \n        theFtab.returnValue(theFtab.findField(\"shape\"), rec)})\n"
)

(Script.382
	Name:	"MGE.dlgIdentify.lbxFeatures.Update"
	SourceCode:	"Return nil"
)

(Script.383
	Name:	"MGE.dlgIdentify.Open"
	SourceCode:	"'\n' Name:        MGE.dlgIdentify.Open\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Responses to the identify dialog's open event\n'              initialize controls with proper values\n'\n' Topics:      Dialog Designer\n' Search Keys: Open dialog\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\n\ndictIdentify = self.getObjectTag\nlbxFeatures = self.findByName (\"lbxFeatures\")\nlbxAttribute = self.findByN
ame (\"lbxAttribute\")\nlbxExternal = self.findByName (\"lbxExternal\")\nbtnClear = self.findByName (\"btnClear\")\nbtnClearAll = self.findByName (\"btnClearAll\")\n'\n' defaults selection to the first feature\n'\nlbxFeatures.defineFromList (dictIdentify.get(\"dictFeatures\").returnKeys)\nlbxFeatures.setSelection (rect.make(0@0, 1@1), false)\nlbxFeatures.select\n\nlbxFeatures.setListeners ({btnClear, btnClearAll})"
)

(Script.384
	Name:	"MGE.DlgMapman.BtnApply.Click"
	SourceCode:	"'\n' Name:        MGE.DlgMapman.BtnApply.Click\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Responses to btnApply's click event, load user \n'              selected drawings into MGE view\n'\n' Topics:      Dialog Designer\n' Search Keys: button click\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n'\n' get select drawings from the list box, then process and save the\n' information into a dictionary. th
e key of the dictionary is the catogory\n' name and the value if a list of dgn files for that category.\n'\ntheDlg = self.getDialog\nlstDrawings = theDlg.findByName (\"LbxDrawings\")\ncntCols = lstDrawings.getColumnCount\nlstSelections = lstDrawings.getSelection\nif (lstSelections.count = 0) then\n  exit\nend\n\nnumRecs = lstSelections.count\ndictCatDGNs = dictionary.make (numRecs)\nfor each e in lstSelections\n  lst = e.asTokens(string.makeBuffer (10))\n  strDGN = lst.get(1).trim\n  strCAT = lst.get(2).trim\n  if (dictCatDGN
s.add (strCat, {strDGN}).not) then\n    dictCatDGNs.add (strCat, dictCatDGNs.get(strCat).add (strDGN))\n  end\nend\n'\n' get basic objects which have been saved in the objecttag\n' of the key view\n'\nthePrj = av.getProject\nLstKeyViews = thePrj.getDocsWithGUI (thePrj.findGUI(\"Key_view\"))\nif (lstKeyViews.count = 0) then\n  msgbox.info (\"The key view is missing!\", \"\")\n  return nil\nend\n\ndictAll = lstKeyviews.get(0).getObjectTag\ndictMSCat = dictAll.get (\"MSCatalog\")\ntheSQLCon = dictAll.get (\"SQLConnection\")\nstrOutputDir
 = thePrj.getWorkDir.asString\nstrPrjFile = dictAll.get(\"ProjectFile\").clone.asString\nfnPrjDir = dictAll.get (\"ProjectWorkspace\").clone\n'\n' make MGE view\n'\nvwMGE = view.makeWithGUI (\"MGEView\")\nvwMGE.setName (\"MGE View for\" ++ strPrjFile.asString)\n'\n' export DGN files to shape files, if there are mutilple DGN files\n' for one category, merge them together\n'\nthemeList = {\"point\",\"line\",\"polygon\",\"annotation\"}\nbAnswer = msgbox.YesNoCancel (\"Would you like to convert DGN files to shape file, \" +NL+\n            \"a
nd merge multi-tile shape files into a single layer? \" +NL+\n            \"It may take a few minutes to process.\", \"\", false)\nif (bAnswer = nil) then\n  if (msgbox.yesno(\"Are you sure you want to cancel the process?\", \"\", true)) then\n    exit\n  end\nend     \nif (bAnswer) then\n  'do converting and merging\n  strPrjDir = fnPrjDir.asString\n  lstThemes = av.run (\"MGE.AddDGNasShape\", {strPrjdir, dictCatDGNs})\n  for each t in lstThemes\n    vwMGE.addTheme (t)\n  end\nelse   \n  strPrjDir = fnPrjDir.asString\n  for each str
Cat in dictCatDGNs.returnKeys\n    lstDGN = dictCatDGNs.get(strCat)  \n    for each strDGN in lstDGN\n      strDGNFile = strPrjDir + \"\\dgn\\\" + strDGN.trim\n      for each strThmType in themeList\n        srcCurrent = SrcName.Make(strDGNfile ++ strThmType)\n        if (srcCurrent <> nil) then\n          thmCurrent = theme.make(srcCurrent)                        \n          if (thmCurrent <> nil) then\n            ' add theme into MGE view\n            '\n            thmCurrent.setname (strCat ++ strThmType)\n           
 vwMGE.addTheme (thmCurrent)                        \n          end  \n        end  \n      end   \n    end  ' for multi-tile dgn\n  end  ' for each category\nend  'convert to shape file\n'\n' for each theme, join external tables to its attribute table,\n' save join fields and external tables to dictMGEThemes which\n' can be retrieved later\n'\ndictMGEThemes = dictionary.make (10)\nfor each thm in vwMGE.getThemes\n  theFtab = thm.getFtab\n  lstCurrentLinkage = av.run (\"MGE.join\", theFtab)          \n  theFtab.getSelection.
clearAll\n  dictMGEThemes.add (thm, lstCurrentLinkage)  \nend\ndictAll.set (\"MGETheme\", dictMGEThemes)  \n'\n' close dialog and open MGE view\n'\ntheDlg.close\nif (vwMGE.getThemes.count > 0) then\n  lstKeyviews.get(0).getWin.close\n  vwMGE.getWin.open\n  vwMGE.getWin.Maximize\nelse\n  av.getProject.removeDoc (vwMGE)\nend"
)

(Script.385
	Name:	"MGE.DlgMapman.BtnApply.Update"
	SourceCode:	"'\n' Name:        MGE.DlgMapman.BtnApply.Update\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Responses to btnApply's update event.\n'              enable/disenable btnApply based on drawing selection\n'\n' Topics:      Dialog Designer\n' Search Keys: button update\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\ndlgMapManager = self.getDialog\nlbxDrawings = dlgMapManager.findByName (\"LbxDrawings\")\nbtnA
pply = dlgMapManager.findByName (\"btnApply\")\n\nbtnApply.setEnabled (lbxDrawings.getSelection.count > 0)\n  "
)

(Script.386
	Name:	"MGE.DlgMapman.BtnCancel.Click"
	SourceCode:	"'\n' Name:        MGE.DlgMapman.BtnCancel.Click\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Responses to btnCancel's click event.\n'          \n' Topics:      Dialog Designer\n' Search Keys: button click\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\n\nself.getDialog.close"
)

(Script.387
	Name:	"MGE.DlgMapman.Lbxdrawings.Select"
	SourceCode:	"'\n' Name:        MGE.DlgMapman.Lbxdrawings.Select\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: responses to brnApply's update event\n' Topics:      Dialog Designer\n' Search Keys: listbox select\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\n\n'run brnApply's update script\n'\nself.broadCastUpdate\n"
)

(Script.388
	Name:	"MGE.DlgMapman.Open"
	SourceCode:	"'\n' Name:        MGE.DlgMapman.Open\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Responses to open event.\n'              retrieve the information saved in the objecttag\n'              of dlgMapman, and initialize controls with proper\n'              values\n'\n' Topics:      Dialog Designer\n' Search Keys: dialog open\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n'\n'\n' fill lstDrawings\n'\nlstDrawing
s = self.findByName (\"lbxDrawings\")\nlstDrawings.defineFromList (self.getObjectTag)\n'\n' set btnApply as a listener \n'\nbtnApply = self.findByName(\"btnApply\")\nlstDrawings.setListeners ({btnApply})\n'\n' disable apply button\n'\nbtnApply.setEnabled (false)"
)

(Script.389
	Name:	"MGE.dlgQuery.aLabelButton.click"
	SourceCode:	"'\n' Name:        MGE.dlgQuery.aLabelButton.click\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Responses to click event. writes the button's label\n'              to tbxQuery.\n'\n' Topics:      Dialog Designer\n' Search Keys: dialog click\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\n\ndlgQuery = self.getDialog\ntbxQuery = dlgQuery.findByname (\"TbxQuery\")\ntbxQuery.insertText (\" \" + self.getlabel)\n"
)

(Script.390
	Name:	"MGE.dlgQuery.btnAnd.click"
	SourceCode:	"' Name:        MGE.dlgQuery.btnAnd.click\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Responses to click event. writes the button's label\n'              to tbxQuery.\n'\n' Topics:      Dialog Designer\n' Search Keys: dialog click\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\ndlgQuery = self.getDialog\ntbxQuery = dlgQuery.findByname (\"TbxQuery\")\ntbxQuery.insertText (\") \" + self.getlabel + \" (\")\n"
)

(Script.391
	Name:	"MGE.dlgQuery.btnClear.Click"
	SourceCode:	"'\n' Name:        MGE.dlgQuery.btnClear.Click\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Responses to click event, clears txtQuery\n'\n' Topics:      Dialog Designer\n' Search Keys: button click\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\ntbxQuery = self.getDialog.findByName (\"tbxQuery\")\ntbxQuery.setText (\"()\")\ntbxQuery.setPosition (1)"
)

(Script.392
	Name:	"MGE.dlgQuery.btnClear.Update"
	SourceCode:	"Return nil"
)

(Script.393
	Name:	"MGE.dlgQuery.btnQuery.Click"
	SourceCode:	"'\n' Name:        MGE.dlgQuery.btnQuery.Click\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Responses to click event.\n'              Sends a query to the vtab, displays results in lbxQueryResults\n'\n' Topics:      Dialog Designer\n' Search Keys: button click\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\ndlgQuery = self.getDialog\nlbxQueryResults = dlgQuery.findByName (\"lbxQueryResults\")\ncpaQueryRes
ults = dlgQuery.findByName (\"cpaQueryResults\")\n\ntbxQuery = dlgQuery.findByName (\"tbxQuery\")\nstrQuery = tbxQuery.getText\n\ndictDlgQuery = dlgQuery.getObjectTag\ntheVtab = dictDlgQuery.get (\"dlgQuery\").getFtab\ntheVtab.Query (strQuery, theVtab.getSelection, dictDlgQuery.get(self.getName))\nlbxQueryResults.setFieldNamesVisible (true)\nlbxQueryResults.defineFromVtab (theVtab, theVtab.getFields, true)\n\ncpaQueryResults.setLabel (theVtab.getSelection.count.asString ++ \"out of\" ++\n                          theVtab.getNu
mRecords.asString ++ \"features are selected\")\n                          \n"
)

(Script.394
	Name:	"MGE.dlgQuery.btnQuery.Update"
	SourceCode:	"Return nil"
)

(Script.395
	Name:	"MGE.dlgQuery.Close"
	SourceCode:	"'\n' Name:        MGE.dlgIdentify.Close\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Responses to dlgQuery's close event,\n'              clears objecttag\n'\n' Topics:      Dialog Designer\n' Search Keys: button close\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\nself.setObjectTag (nil)\n"
)

(Script.396
	Name:	"MGE.dlgQuery.lbxFields.Apply"
	SourceCode:	"dlgQuery = self.getDialog\ntbxQuery = dlgQuery.findByname (\"TbxQuery\")\n'tbxQuery.setText (tbxQuery.getText ++ \"[\" + self.getSelection.get(0) + \"]\")\ntbxQuery.insertText (\"[\" + self.getSelection.get(0) + \"]\")\n"
)

(Script.397
	Name:	"MGE.dlgQuery.lbxFields.Select"
	SourceCode:	"\ndlgQuery = self.getDialog\nlbxFields = dlgQuery.findByname (\"lbxFields\")\nlbxValues = dlgQuery.findByName (\"LbxValues\")\ndictDlgQuery = dlgQuery.getObjectTag\ntheVtab = dictDlgQuery.get (\"dlgQuery\").getFtab\ntheField = theVtab.findField (lbxFields.getSelection.get(0))\n\nlbxvalues.DefineUniqueFromVTab (theVTab, theField, false, false, true)"
)

(Script.398
	Name:	"MGE.dlgQuery.lbxFields.Update"
	SourceCode:	"Return nil"
)

(Script.399
	Name:	"MGE.dlgQuery.lbxQueryResults.Apply"
	SourceCode:	"Return nil"
)

(Script.400
	Name:	"MGE.dlgQuery.lbxQueryResults.Select"
	SourceCode:	"'\n' find the current selected shape\n'\ndlgQuery = self.getDialog\ndictDlgQuery = dlgQuery.getObjectTag\ntheFtab = dictDlgQuery.get (\"dlgQuery\").getFtab\nfldShp = theFtab.findField (\"Shape\")\nrec = self.getCurrentRecord\ntheShp = theFtab.returnValue (fldShp, rec)\n'\n' zoom to the shape\n'\ntheView = dictDlgQuery.get (\"ActiveDoc\")\ntheDsp = theView.getDisplay\ntheDsp.zoomToRect (theShp.returnExtent.scale (4))\n'\n' make a symbol to flash selected shape\n'\nshpType = theFtab.getShapeClass.getClassName.asString\nif (shpType = 
\"Polygon\") then\n  theSym = symbol.make (#SYMBOL_FILL)\nelseif ((shpType = \"Line\") or (shpType = \"Polyline\")) then\n  theSym = symbol.make (#SYMBOL_PEN)\n  theSym.setSize (2)\nelseif (shpType = \"Point\") then\n  theSym = symbol.make (#SYMBOL_MARKER)\nend\n\ntheDsp.flush\ntheDsp.flashShape (theShp, theSym, 100, 5)\n\n\n\n"
)

(Script.401
	Name:	"MGE.dlgQuery.lbxQueryResults.Update"
	SourceCode:	"Return nil"
)

(Script.402
	Name:	"MGE.dlgQuery.lbxTables.Apply"
	SourceCode:	"Return nil"
)

(Script.403
	Name:	"MGE.dlgQuery.lbxTables.Select"
	SourceCode:	"Return nil"
)

(Script.404
	Name:	"MGE.dlgQuery.lbxTables.Update"
	SourceCode:	"Return nil"
)

(Script.405
	Name:	"MGE.dlgQuery.lbxValues.Apply"
	SourceCode:	"dlgQuery = self.getDialog\ntbxQuery = dlgQuery.findByname (\"TbxQuery\")\nlbxFields = dlgQuery.findByname (\"lbxFields\")\n\ndictDlgQuery = dlgQuery.getObjectTag\ntheVtab = dictDlgQuery.get (\"dlgQuery\").getFtab\ntheField = theVtab.findField (lbxFields.getSelection.get(0))\nif (theField.getType = #FIELD_CHAR) then\n  'tbxQuery.setText (tbxQuery.getText ++ self.getSelection.get(0).quote)\n  tbxQuery.insertText (self.getSelection.get(0).quote)\nelse\n  tbxQuery.insertText (self.getSelection.get(0))\n  'tbxQuery.setText (tbxQu
ery.getText ++ self.getSelection.get(0))\nend"
)

(Script.406
	Name:	"MGE.dlgQuery.lbxValues.Select"
	SourceCode:	"Return nil"
)

(Script.407
	Name:	"MGE.dlgQuery.lbxValues.Update"
	SourceCode:	"Return nil"
)

(Script.408
	Name:	"MGE.dlgQuery.Open"
	SourceCode:	"'\n' Name:        MGE.dlgQuery.Open\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Retrieves information from the objecttag of dlgQuery,\n'              initialize controls with proper values\n'\n' Topics:      Dialog Designer\n' Search Keys: dialog open\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\ndlgQuery = self\nlbxFields = dlgQuery.findByName (\"lbxFields\")\nlbxValues = dlgQuery.findByName (\"lbxVal
ues\")\ntbxQuery = dlgQuery.findByName (\"tbxQuery\")\nlbxQueryResults = dlgQuery.findByName (\"lbxQueryResults\")\ncpaQueryResults = dlgQuery.findByName (\"cpaQueryResults\")\n\ndictDlgQuery = dlgQuery.getObjectTag\nlstFields = dictDlgQuery.get (\"lbxFields\")\nlbxFields.defineFromList (lstFields)\nlbxValues.Empty\ntbxQuery.setText (\"()\")\ntbxQuery.setPosition (1)\n\ndictDlgQuery = dlgQuery.getObjectTag\ntheVtab = dictDlgQuery.get (\"dlgQuery\").getFtab\nlbxQueryResults.setFieldNamesVisible (true)\nlbxQueryResults.defineFromVtab (t
heVtab, theVtab.getFields, true)\n\ncpaQueryResults.setLabel (theVtab.getSelection.count.asString ++ \"out of\" ++\n                          theVtab.getNumRecords.asString ++ \"features are selected\")\n                          \n"
)

(Script.409
	Name:	"MGE.dlgQuery.tbxQuery.Click"
	SourceCode:	"Return nil"
)

(Script.410
	Name:	"MGE.dlgQuery.tbxQuery.Update"
	SourceCode:	"Return nil"
)

(Script.411
	Name:	"MGE.extensionInstall"
	SourceCode:	"'\n' Name:        MGE.extensionInstall\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: NONE\n' Topics:      extension\n' Search Keys: install\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\nif (av.getproject=nil) then return(nil) end\n\nguiKeyview = SELF.get(0)\nguiMGEview = self.get(1)\ndlgMapManager = self.get(2)\ndlgIdentify = self.get(3)\ndlgQuery = self.get(4)\n\n'\n' add GUI Key_view\n'\ntheProject = av.ge
tProject\nif (theProject.findGUI(guiKeyview.getName) = nil) then\n  guiKeyviewClone = guiKeyview.clone\n  theProject.addGUI (guiKeyviewClone)\n  guiKeyviewClone.setVisible (false)\nend\n'\n' add GUI MGEview\n'\nif (theProject.findGUI(guiMGEview.getName) = nil) then\n  guiMGEviewClone = guiMGEview.clone\n  av.getProject.addGUI (guiMGEview)\nend\n'\n' add dialogs\n'\ntheProject.addDialog (dlgMapManager)\ntheProject.addDialog (dlgIdentify)\ntheProject.addDialog (dlgQuery)\n'\n' hide dialog GUI\n'\n'theProject.findGUI (\"DialogEditor
\").setVisible (false)\n\nav.getproject.setmodified(true)\n'\n'And the scripts add themselves\n\n"
)

(Script.412
	Name:	"MGE.ExtensionMake"
	SourceCode:	"'\n' Name:        MGE.ExtensionMake\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: NONE\n' Topics:      extension\n' Search Keys: Make\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\ntheExtensionFile = \"$USEREXT\\MGEview.avx\".asFileName\ntheExtensionName = \"MGE Viewer\"\ntheDescription = \"Reads Intergraph's MGE and Bentley's MicroStation GeoGraphics data into ArcView\"\ntheVersion = 3100\nInScriptName=\"MGE.
ExtensionInstall\"\nUnScriptName=\"MGE.ExtensionUninstall\"\n'\n' make sure extension install/uninstall scripts exist\n'\ntheInstall=av.GetProject.FindScript(InscriptName)\nif (theInstall=NIL) then \n  Msgbox.Error(\"The install Script \"+InScriptName+\" was not found\",\"Script not found\")\n  return(nil)\nend\n\ntheUninstall=av.GetProject.FindScript(unscriptName)\nif (theUninstall=NIL) then \n  Msgbox.Error(\"The install Script \"+UnScriptName+\" was not found\",\"Script not found\")\n  return(nil)\nend\n'\n'Create the extension\n'\nmyExt
 = Extension.Make(theExtensionFile, \n              theExtensionName,\n              theInstall,\n              theUninstall,              \n              {\"$AVHOME\\ext32\\cadview.avx\".asFileName,\n               \"$AVHOME\\bin32\\avdlog.dll\".asFileName})\n               \nmyExt.SetUnloadScript( av.FindScript(\"MGE.extensionUnload\")) \n'\n'\n'Add GUIs\n'\nmyExt.add (av.getProject.findGUI (\"Key_view\"))    'self(0)\n'\n' \n'\n'Get the customized View DocGUI from the project\n'\nMGEGUI = av.getproject.FindGUI(\"MGEView\")\nviewMenuBar 
= MGEGUI.GetMenuBar\n'\n'Find separator that contains the object tag and set the object tag to nil\n'\nwinUpdate = viewMenuBar.FindByScript(\"WindowMenuUpdate\")\nif (winUpdate <> nil) then\n  winUpdate.SetObjectTag(nil)\n  '\n  'Delete all the activate window menu options\n  '\n  cSet = winUpdate.GetControlSet\n  cList = cSet.GetControls\n  last = cList.Get(cList.Count - 1)\n  while (last <> winUpdate)\n    cSet.Remove(last)\n    last = cList.Get(cList.Count- 1)\n  end\nend  \n'\n'Find the controls that were added by Dialog De
signer and remove them\n'\nshowControlTools = viewMenuBar.FindByScript(\"GraphicControl.ShowHideTools\")\ndesignControls = viewMenuBar.FindByScript(\"GraphicControl.DesignRun\")\nif (showControlTools <> nil) then\n  showControlTools.GetControlSet.Remove(showControlTools)\nend \nif (designControls <> nil) then\n  designControls.GetControlset.Remove(designControls)\nend\n'\n'Then add your DocGUI to your extension\n'\nmyExt.add (MGEGUI)    'self(1)\n'\n' Docs to include\n'\ndlgMapManager = av.getProject.findDoc (\"DlgMapManager\").g
etDialog\ndlgIdentify = av.getProject.findDoc (\"DlgIdentify\").getDialog\ndlgQuery = av.getProject.findDoc (\"DlgQuery\").getDialog\n\ndlgMapManager.setObjectTag (nil)\ndlgIdentify.setObjectTag (nil)\ndlgQuery.setObjectTag (nil)\n'\n' empty lbxQueryResults\n'\ndlgQuery.findByName (\"lbxQueryResults\").empty\n\nmyExt.add (dlgMapmanager)    'self(2)\nmyExt.add (dlgIdentify)    'self(3)\nmyExt.add (dlgQuery)      'self(4)\n'\n'Process scripts\n'\nTotalScripts={\"MGE.AddDGNasShape\",\"MGE.AddDGNs\",\"MGE.dlgIdentify.btnClear.Click\",\"MGE.d
lgIdentify.btnClear.Update\",\"MGE.dlgIdentify.btnClearAll.Click\",\"MGE.dlgIdentify.btnClearAll.Update\",\"MGE.dlgIdentify.Close\",\"MGE.dlgIdentify.lbxAttribute.Apply\",\"MGE.dlgIdentify.lbxAttribute.Select\",\"MGE.dlgIdentify.lbxAttribute.Update\",\"MGE.dlgIdentify.lbxExternal.Apply\",\"MGE.dlgIdentify.lbxExternal.Select\",\"MGE.dlgIdentify.lbxExternal.Update\",\"MGE.dlgIdentify.lbxFeatures.Apply\",\"MGE.dlgIdentify.lbxFeatures.Select\",\"MGE.dlgIdentify.lbxFeatures.Update\",\"MGE.dlgIdentify.Open\",\"MGE.DlgMapman.BtnApply.Click\",
\"MGE.DlgMapman.BtnApply.Update\",\"MGE.DlgMapman.BtnCancel.Click\",\"MGE.DlgMapman.Lbxdrawings.Select\",\"MGE.DlgMapman.Open\",\"MGE.dlgQuery.aLabelButton.click\",\"MGE.dlgQuery.btnAnd.click\",\"MGE.dlgQuery.btnClear.Click\",\"MGE.dlgQuery.btnClear.Update\",\"MGE.dlgQuery.btnQuery.Click\",\"MGE.dlgQuery.btnQuery.Update\",\"MGE.dlgQuery.Close\",\"MGE.dlgQuery.lbxFields.Apply\",\"MGE.dlgQuery.lbxFields.Select\",\"MGE.dlgQuery.lbxFields.Update\",\"MGE.dlgQuery.lbxQueryResults.Apply\",\"MGE.dlgQuery.lbxQueryResults.Select\",\"MGE.dlgQuery.lbx
QueryResults.Update\",\"MGE.dlgQuery.lbxTables.Apply\",\"MGE.dlgQuery.lbxTables.Select\",\"MGE.dlgQuery.lbxTables.Update\",\"MGE.dlgQuery.lbxValues.Apply\",\"MGE.dlgQuery.lbxValues.Select\",\"MGE.dlgQuery.lbxValues.Update\",\"MGE.dlgQuery.Open\",\"MGE.dlgQuery.tbxQuery.Click\",\"MGE.dlgQuery.tbxQuery.Update\",\"MGE.extensionInstall\",\"MGE.ExtensionMake\",\"MGE.extensionUninstall\",\"MGE.extensionUnload\",\"MGE.Identify\",\"MGE.Identify2\",\"MGE.Join\",\"MGE.Label\",\"MGE.Load\",\"MGE.query\",\"MGE.SelectAOIAll.Click\",\"MGE.SelectAOIFence.Click\",\"
MGE.SelectAOIPoint.Click\",\"MGE.SelectAOITool\",\"MGE.SelectAOIView.Click\",\"MGE.ShowTable\",\"MGE.SplitThemes\",\"Util.cloneGUI\",\"Util.convertToShape\",\"Util.DlgDev\",\"Util.FindFieldByAlias\",\"Util.FlashShape\",\"Util.MakeNewGUI\",\"Util.MergeThemes\",\"Util.RemoveGUI\"}\n'\n' Process the Script list\n'\nfor each ascript in TotalScripts\n  if ((av.getproject.findscript(ascript)=\"Null\").NOT) then\n     myExt.Add(av.GetProject.FindScript(ascript))\n   else\n      MsgBox.Warning(\"The script \"+ascript+\" cannot be found in the current p
roject.\",\"Script Eror\")\n      return(nil)\n end\nend\n \nmyExt.SetAbout(theDescription)\nmyExt.SetExtVersion(theVersion)\nmyExt.Commit\n\nexit\n'\n' remove any objecttag references to dialogs\n'\nRFileName = FileName.Make(\"$USEREXT\\mgeview.avx\")\nWFileName = FileName.Make(\"$USEREXT\\mgeview.tmp\")\nRFile = LineFile.Make(RFileName,#FILE_PERM_READ)\nWFile = LineFile.Make(WFileName,#File_PERM_WRITE)\nWFile.SetScratch(TRUE)\nwhile (RFile.IsAtEnd.Not)\n  buf = RFile.ReadElt\n  if (buf.Contains(\"ObjectTag:\").not) then\n    WFile.Write
Elt(buf)\n  end\nend  \nRFile.Close\nWFile.Flush\nFile.Copy(WFilename, RFileName)\nWFile.Close"
)

(Script.413
	Name:	"MGE.extensionUninstall"
	SourceCode:	"'\n' Name:        MGE.extensionUninstall\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: NONE\n' Topics:      extension\n' Search Keys: uninstall\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\n\n'The SELF is the Extension\n'\nguiKeyview = SELF.get(0)\nguiMGEview = self.get(1)\ndlgMapManager = self.get(2)\ndlgIdentify = self.get(3)\ndlgQuery = self.get(4)\n'\n' remove GUIs\n' before removing GUI, remove all the
 associated docs \n'\ntheProject = av.getProject\n\nlstDocs = theProject.getDocsWithGUI (guiKeyview)\nfor each d in lstDocs.clone\n  d.setObjectTag (nil)\n  theProject.removeDoc (d)\nend\n\nlstDocs = theProject.getDocsWithGUI (guiMGEview)\nfor each d in lstDocs.clone\n  d.setObjectTag (nil)\n  theProject.removeDoc (d)\nend\n\n'\n' delete attribute tables derived from the view\n'\nfor each t in theProject.getDocs.clone\n  if (t.is(table)) then\n    if (t.getName.contains(\"Attributes of\")) then\n      theProject.removeDoc (t)\n    
end\n  end\nend\n'\nguiKeyview.setObjectTag (nil)\ntheProject.removeGUI (guiKeyview.getName)\nguiMGEview.setObjectTag (nil)\ntheProject.removeGUI (guiMGEview.getName)\n'\n' remove dialogs\n'\ndlgMapManager.setObjectTag (nil)\ndlgIdentify.setObjectTag (nil)\ndlgQuery.setObjectTag (nil)\n\ntheProject.removeDialog (dlgMapManager.getName)\ntheProject.removeDialog (dlgIdentify.getName)\ntheProject.removeDialog (dlgQuery.getName)\n'\n'And the scripts delete themselves\n'\nav.getproject.setmodified(true)\n"
)

(Script.414
	Name:	"MGE.extensionUnload"
	SourceCode:	"'\n' Name:        MGE.extensionUnload\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: NONE\n' Topics:      extension\n' Search Keys: unload\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\nmyExt = extension.getExtensions.get (\"MGE Viewer\")\nDialog.DetachFromExtension (myExt)\n\n"
)

(Script.415
	Name:	"MGE.Identify"
	SourceCode:	"'\n' Name:        MGE.Identify\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: reads through the ftab, finds the external \n'              table names and record numbers, retrieve information\n'              from the external names and display it in dlgIdentify.\n'\n' Topics:      DGN, MGE\n' Search Keys: identify\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\n'\n' get basic objects\n'\ntheView = av.GetAct
iveDoc\ntheProject = av.getProject\nLstKeyViews = theProject.getDocsWithGUI (theProject.findGUI(\"Key_view\"))\nif (lstKeyViews.count = 0) then\n  msgbox.info (\"The key view is missing!\", \"\")\n  return nil\nend\n\ndictAll = lstKeyviews.get(0).getObjectTag\ndictMSCat = dictAll.get (\"MSCatalog\")\ndictMaps = dictAll.get (\"Maps\")\ndictCat = dictAll.get (\"Category\")\ntheSQLCon = dictAll.get(\"SQLconnection\")\n\nfound = FALSE\np = theView.GetDisplay.ReturnUserPoint\n'\n' dictFeatures: uniquely defines identified features.\n' key: fea
ture ID label\n' value: {the theme where the feature is from, feature record number}\n' \n' dictVtab: Stores information from attribute table\n' key: feature ID label\n' Value: {fld1: value1, fld2: value2, ...}\n'\n' dictExternal: Stores information from external tables\n' key: feature ID label\n' Value: {table1, fld1: value1, fld2: value2, ..., table2, fld1: value1, ...}\n'\n'\nav.useWaitCursor\nav.showMsg (\"Retriving information from external tables...\")'\n\nlstThms = theView.getActiveThemes \ndictFeatures = dictionary.m
ake (20)\ndictVtab = dictionary.make (20)\ndictExternal = dictionary.make (20)\n\nfor each t in lstThms\n  if (t.CanFindByPoint) then\n    theFtab = t.getFtab\n    '\n    '\n    keys = t.FindByPoint(p)\n    for each rec in Keys\n      found = TRUE\n      idlabel = \"Theme:\" ++ t.GetName ++ \"--- Rec\" ++ rec.asString \n      f = NIL\n      if (t.CanLabel) then\n         fldFname = theFtab.findField (\"Fname\")\n         fldFType = theFtab.findField (\"Ftype\")\n      end\n      if ((fldFname = nil) or (fldFtype = nil)) then\n       
 if (rec.Is(Number)) then\n         idlabel = idlabel ++ rec.SetFormat(\"d\").AsString\n        else\n         idlabel = idlabel++\" X :\" ++ rec.GetX.AsString++\" Y :\" ++ rec.GetY.AsString\n        end\n      else\n        s = t.ReturnValueString(\"Fname\", rec) ++\n            t.ReturnValueString(\"Ftype\", rec)\n        idlabel = idlabel ++ s\n      end\n      '\n      ' store the label in lstlabels\n      '\n      dictFeatures.add (idLabel, {t, rec})\n\n      '\n      ' store the vtab in dictVtab\n      '\n      lstAttributes = {
}\n      for each fld in theftab.getFields\n        if (theFtab.isjoinedField(fld)) then\n          break\n        else\n          strFldnm = fld.getName\n          if (strFldnm <> \"shape\") then\n            strFldAlias = fld.getAlias\n            if (strFldAlias <> nil) then\n              strFldnm = strFldAlias\n            end    \n            lstAttributes.add (strFldnm + \":     \" +\n                             theFtab.returnValueString (fld, rec))  \n          end\n        end\n      end\n      dictVtab.add (idLabel,
 lstAttributes)  \n      \n      '\n      'go through links and pull out external information\n      'assume the ftab has field alias defined, otherwise\n      'it always finds the first field with the same field name\n      '\n      lstExternal = {}\n      \n      lstFlds = theFtab.getFields\n      for each fld in lstFlds\n        strFldAlias = fld.getAlias\n        ' only fields from base table can be edited, make sure we don't\n        ' count MSLink fields from joined tables\n        '\n        if ((theFtab.isJoinedFi
eld(fld).not) and (strFldAlias.contains (\"MSlink\"))) then\n          strFldCltgnm = \"MSCtlg-\" + strFldAlias.asTokens(\"-\").get(1)\n          fldCtlg = av.run (\"Util.FindFieldByAlias\", {theFtab, strFldCltgnm})\n          if (fldCtlg = nil) then\n            msgbox.info (\"Can not find field\" ++ strFldCltgnm,\"\")\n            return nil\n          end\n          \n          strTablenm = dictMSCat.get (theFtab.returnValue(fldCtlg, rec))\n          if (strTablenm <> nil) then\n            strSQL = \"SELECT * FROM\" ++ strTabl
enm ++ \"WHERE mslink = \"\n                      ++ theFtab.returnValueString(fld, rec)\n            vtabSQL = vtab.makeSQL (theSQLCon, strSQL)\n            if ((vtabSQL <> nil) and (vtabSQL.getNumRecords > 0)) then\n              lstExternal.add (\"EXTERNAL TABLE:\" ++ strTablenm.ucase)\n              for each recSQL in vtabSQL\n                for each fld in vtabSQL.getFields\n                  lstExternal.add (\"    \" + fld.getAlias + \":     \" +  \n                                  vtabSQL.returnValueString (fld,re
cSQL))\n                end  'each field in the external table\n              end  'for each rec in vtabSQL\n            end  'link found in the external table    \n          end  'if it's a valid external table\n        end  'linkage\n      end  'loop through fields          \n      dictExternal.add (idLabel, lstExternal)\n    end  'for each feature    \n  end\nend  'for each theme\n\nif (not found) then\n  System.Beep\nelse\n  'save the sttribute information in the objecttag of identify dialog\n  '\n  dictIdentify = dicti
onary.make (3)\n  dictIdentify.add (\"view\", theView)\n  dictIdentify.add (\"dictFeatures\", dictFeatures)\n  dictIdentify.add (\"lstAttribute\", dictVtab)\n  dictIdentify.add (\"lstExternal\", dictExternal)\n  \n  dlgIdentify = av.getProject.findDialog (\"dlgIdentify\")\n  dlgIdentify.setObjectTag (dictIdentify) \n  if (dlgIdentify.isOpen) then\n    av.run (\"MGE.dlgIdentify.open\", dlgIdentify)\n  else\n    dlgIdentify.open\n  end\nend\n\n"
)

(Script.416
	Name:	"MGE.Identify2"
	SourceCode:	"'\n' Name:        MGE.Identify2\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Ensures external tables are joined to the attribute\n'              table, then invokes arcview identify tool\n'\n' Topics:      DNG, MGE\n' Search Keys: identify\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\ntheView = av.GetActiveDoc\nfound = FALSE\np = theView.GetDisplay.ReturnUserPoint\nfor each t in theView.GetActiveTheme
s\n  if (t.CanFindByPoint) then\n    '\n    ' make sure external tables are joined\n    '\n    theFtab= t.getFtab\n    if (theFtab.isBase) then\n      av.run (\"MGE.Join\", theFtab)\n    end\n\n    keys = t.FindByPoint(p)\n    for each key in keys\n      found = TRUE\n      idlabel = t.GetName++\"-\"\n      f = NIL\n      if (t.CanLabel) then\n         f = t.GetLabelField\n      end\n      if (f = NIL) then\n        if (key.Is(Number)) then\n         idlabel = idlabel++key.SetFormat(\"d\").AsString\n        else\n         idlabel = id
label++\" X :\"++key.GetX.AsString++\" Y :\"++key.GetY.AsString\n        end\n      else\n        s = t.ReturnValueString(f.GetName, key)\n        idlabel = idlabel++s\n      end\n      t.Identify(key, idlabel)\n    end\n  end\nend\nif (not found) then\n  System.Beep\nend\ntheView = av.GetActiveDoc\n"
)

(Script.417
	Name:	"MGE.Join"
	SourceCode:	"'\n' Name:        MGE.Join\n' Headline:    NONE\n' Self:        NONE\n' Returns:     {{strTablenm 1, MSlink fld, MSCtlg fld},\n'               {strTablenm 2, MSlink fld, MSCtlg fld}, ...} \n' Description: Loops through fields in the attribute table, finds external\n'              tables to join. \n'              \n' Topics:      DNG, MGE\n' Search Keys: join\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\n'get basic objects\n'\ntheVtab 
= self\n\ntheProject = av.getProject\nLstKeyViews = theProject.getDocsWithGUI(theProject.findGUI(\"Key_view\"))\nif (lstKeyViews.count = 0) then\n  msgbox.info (\"The key view is missing!\", \"\")\n  return nil\nend\n\ndictAll = lstKeyviews.get(0).getObjectTag\ndictMSCat = dictAll.get (\"MSCatalog\")\ndictTables = dictAll.get (\"ExternalTable\")\ntheSQLCon = dictAll.get (\"SQLConnection\")\n\nlstCurrentLinkage = {}\nfor each fld in theVtab.getFields\n  strFldAlias = fld.getAlias\n  if (strFldAlias.contains (\"MSlink\")) then\n    strFldCt
lgnm = \"MSCtlg-\" + strFldAlias.asTokens(\"-\").get(1)\n    fldCtlg = av.run (\"Util.FindFieldByAlias\", {theVtab, strFldCtlgnm})\n    if (fldCtlg = nil) then \n      msgbox.error (\"Field\" ++ strFldCtlgnm ++ \"does not exist!\", \"\")\n      continue\n    else\n      '\n      ' find external table name\n      '\n      theBitmap = theVtab.getSelection\n      theVtab.query(\"( [\" + strFldAlias +\"] <> 0 )\", theBitmap, #VTAB_SELTYPE_NEW)\n      if (theBitmap.count > 0) then\n        numEntity = theVtab.returnValue (fldCtlg, theBitma
p.getNextSet(-1))    \n        strTablenm = dictMSCat.get(numEntity)\n        lstCurrentLinkage.add ({strTablenm, fld, FldCtlg})\n        '\n        ' join to the external table\n        '\n        vtabExternal = dictTables.get (strTablenm)\n        if (vtabExternal = nil) then\n          vtabExternal = vtab.makeSQL (theSQLCon, \"Select * from\" ++ strTablenm)\n          if (vtabExternal <> nil) then\n            dictTables.set (strTablenm, vtabExternal)\n          end\n        end\n        if (vtabExternal <> nil) then\n 
         fldFrom = vtabExternal.findField (\"MSLink\")\n          theVtab.join (fld, vtabExternal, fldFrom)\n        end\n      end      \n    end\n  end\nend\ntheVtab.getSelection.clearAll\nreturn lstCurrentLinkage"
)

(Script.418
	Name:	"MGE.Label"
	SourceCode:	"'\n' Name:        MGE.Label\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: NONE\n' Topics:      Label\n' Search Keys: Labeler\n' Requires:    NONE\n' History:     example - AV 3.1   11/12/97 \n'----------------------------------------------------------------------\n\n\naView = av.getActiveDoc\naTheme = aView.getThemes.get(0)\n\naExt = aView.GetDisplay.ReturnVisExtent\naLabeler = Labeler.Make(aExt)\n\n' These weights are the defaults for a line theme.\n\naLabeler.SetFeatureWeight(#LABEL_WEIGHT_NO)
\naLabeler.SetLabelWeight(#LABEL_WEIGHT_HIGH)\n\naLabeler.RemoveDuplicates(true)\n\n' Set the textsymbol for the theme you are labeling\n\naTextSym = TextSymbol.Make\naFont = Font.Make(\"Times\",\"Bold\")\naTextSym.SetFont(aFont)\naTextSym.SetSize(8)\naTheme.SetLabelTextSym(aTextSym)\n\n\n' This starts the labeling process and corresponds to the first\n' status bar you see on the application window.\n\naLabeler.Load(aTheme)\n\n' Get the Labels from the labeler (corresponds to the second\n\n' status bar you see on the application wi
ndow) and draw them \n' on the view.\n' The GetAutoLabels request automatically adds the new labels\n' to the aView's GraphicList and aTheme's GraphicSet.\n\naView.GetAutoLabels(aLabeler, false)\n"
)

(Script.419
	Name:	"MGE.Load"
	SourceCode:	"'\n' Name:        MGE.Load\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Prompts user to select a MGE project file, connects to\n'              it's external database via ODBC connection, opens up\n'              the project key view, and process internal tables, \n'              save information into the objecttag of the key view\n'              in the format of dictionary. \n'\n' Topics:      Load MGE project file\n' Search Keys: MGE, CAD, INTERGRAPH\n' Requires:    NONE\n' History:    
 NS - AV 3.1   10/31/97 \n'----------------------------------------------------------------------\n\n'\n' For the first round of this extension, we only deal with \n' one MGE file and one AOI per Arcview project\n'\nthePrj = av.getProject\nif (thePrj.getDocsWithGUI (thePrj.findGUI(\"Key_view\")).count <> 0) then\n  msgbox.info (\"Only one MGE project can be open!\", \"\")\n  exit\nend\n'\n' select a MGE project file or workspace\n'\nstrChoice = msgbox.listAsString ({\"MGE Project File\", \"MGE Workspace\"}, \n            \"Is it a MG
E project file or workspace?\", \"Open\")\nif (strChoice = nil) then\n  exit\nend\n'\nif (strChoice = \"MGE Project File\") then\n  ' Ask user to select existing MGE Project file\n  '      \n  MGEProj = FileDialog.show(\"*.mge\", \"MGE Project\",\"Select MGE Project\")\n  if (MGEProj = nil) then\n    exit\n  end\n  if (av.getProject.findDoc (\"Key View for\" ++ MGEProj.asString) <> nil) then\n    msgbox.info (MGEProj.asString ++ \"is currently open!\", \"\")\n    return nil\n  end\n  ' \n  ' Open MGE Project file and process project directo
ry, user, schema, .etc\n  ' \n  MGEProjFile = LineFile.Make(MGEProj, #FILE_PERM_READ)\n  if ( MGEProjFile = nil ) then\n    MsgBox.Error(\"Cannot Open MGE Project File\",\"\")\n    exit\n  end\n  elementCount = MGEProjFile.GetSize\n  for each n in 1..elementCount\n    aline = MGEProjFile.ReadElt\n    if (aline.Contains(\"PROJECT DIRECTORY:\")) then\n      colon = aline.IndexOf(\":\") \n      MGEProjDir = aline.Right(aLine.count - colon - 1)\n    end\n  end\n  ' \n  ' Verify Project Directory\n  '\n  if (MGEProjDir = \"\") then\n    Msg
Box.Error(\"MGE Project Directory Not Found\",\"MGE Project Directory\")\n    exit\n  end\n  response = MsgBox.YesNoCancel(\"MGE Project Directory:\"++MGEProjDir,\"MGE Project Directory\",\"\")\n  if (response = nil) then\n    exit\n  elseif (response.not) then\n    exit\n  end\nelseif (strChoice = \"MGE Workspace\") then\n  '\n  ' user types a directory\n  MGEProjDir = msgbox.Input (\"Enter a MGE Workspace\", \"MGE Workspace\", \"\")\n  if (MGEProjDir = nil) then\n    exit\n  end\n  '\n  'verify the directory\n  '\n  if (file.Exists (fileName
.merge (MGEProjDir, \"dgn\")).not) then\n    msgbox.error (MGEProjDir ++ \"is not a valid workspace!\", \"MGE Workspace\")\n    exit\n  end\n  'no project file exists in this case, use the workspace instead\n  MGEProj = MGEProjDir.asFileName\nend\n'\n'\n' display a list of available ODBC data source to the user for selection.\n'\nlistSQLCon = SQLCon.GetConnections\n   if (listSQLCon.Count = 0) then\n     MsgBox.Error\n     (\"Unable to find any SQL connection\",\n     \"\")\n     exit\n   else\n     MGESQLConnection = MsgBox.Choice (l
istSQLCon,\n     \"Select a database:\", \"\")\n     if (MGESQLConnection = nil) then\n       exit\n     end\n   end\n'\n' login to the database if not\n'\nif (MGESQLConnection.isLogin.not) then\n  MGESQLConnection.Login (\"/\")\nend\n'\n'\nav.clearMsg\nav.showMsg (\"Processing internal tables...\")\nav.useWaitCursor\n'\n' MSCATALOG contains pointers to all tables used in MGE\n'\nastring=\"Select tablename, entitynum from mscatalog\" \nVTabMSCat=VTab.MakeSQL(MGESQLConnection, astring) \nif (VtabMSCat = nil) then\n  errMsgString = \"Table MS
CATALOG does not exist\"\n  MsgBox.Error(errMsgString,\"Table Error\")\n  exit\nend\n'\n'store entitynum and tablename info into a dictionary\n'\nfldEntityNum = vtabMSCat.findField (\"entitynum\")\nfldTablenm = vtabMSCat.findField (\"Tablename\")\nnumTotalrecs = vtabMSCat.getNumRecords\ndictMSCat = dictionary.make (numTotalrecs)\n\nav.setStatus (0)\nfor each rec in vtabMSCat\n  av.setStatus ((rec+1)/numTotalRecs * 100)\n  dictMSCat.add (vtabMSCat.returnValue(fldEntitynum, rec), \n                 vtabMSCat.returnValue(fldTablenm,
 rec))\nend\n'\n' store tableName and actual vtabs into a dictionary\n'\nlstTablenms = dictMSCat.asList\ndictTables = dictionary.make (lstTablenms.count)\nfor each strTableNm in lstTablenms\n  'sometimes, some tables do not exist within the database\n  '\n  dictTables.add (strTableNm, vtab.makeSQL (MGESQLConnection, \"Select * from\" ++ strTablenm))\nend\n'\n'store map number, catagory number and DNG file name into a dict\n'\nVTabMaps=VTab.MakeSQL(MGESQLConnection, \"Select * from Maps\") \nif (VtabMaps = nil) then\n  errMsgStr
ing = \"Table Maps does not exist\"\n  MsgBox.Error(errMsgString,\"Table Error\")\n  exit\nend\n\nfldMSL = vtabMaps.findField (\"MSLink\")\nfldCat = vtabMaps.findField (\"Category\")\nfldMapnm = vtabMaps.findField (\"Mapname\")\nnumTotalrecs = vtabMaps.getNumRecords\ndictMaps = dictionary.make (numTotalRecs)\nfor each rec in vtabMaps\n  av.setStatus ((rec + 1) / numTotalRecs * 100)\n  dictMaps.add (vtabMaps.returnValue (fldMsl, rec),\n                {vtabMaps.returnValue (fldCat, rec),\n                vtabMaps.returnValue (fldMa
pnm, rec)})\nend\n'\n' store catagory number and name into a dictionary\n'\nVTabCat = VTab.MakeSQL(MGESQLConnection, \"Select * from Category\") \nif (VtabCat = nil) then\n  errMsgString = \"Table CATEGORY does not exist\"\n  MsgBox.Error(errMsgString,\"Table Error\")\n  exit\nend\n\nfldMSL = vtabCat.findField (\"MSLink\")\nfldCatname = vtabCat.findField (\"Cname\")\nnumTotalRecs = vtabCat.getNumRecords\ndictCat = dictionary.make (numTotalRecs)\n\nfor each rec in vtabCat\n  av.setStatus ((rec + 1) / numTotalRecs * 100)\n  dictCat.add (
vtabCat.returnValue (fldMsl, rec),\n                vtabCat.returnValue (fldCatname, rec))\nend\n'\n' store feature name and MSLink into a dictionary\n'\nvtabFeature = vtab.makeSQL (MGESQLConnection, \n              \"Select MSLINK,FNAME from feature\")\nif (vtabFeature = nil) then\n  MsgBox.Error(\"FEATURE table does not exist\",\"Table Error\")\n  exit\nend\n\nfldMSL = vtabFeature.findField (\"MSLink\")\nfldFname = vtabFeature.findField (\"Fname\")\nnumTotalRecs = vtabFeature.getNumRecords\ndictFeature = dictionary.make (numTotalR
ecs)\n\nfor each rec in vtabFeature\n  av.setStatus ((rec + 1) / numTotalRecs * 100)\n  dictFeature.add (vtabFeature.returnValue (fldMSL, rec),\n                  vtabFeature.returnValue (fldFname, rec))\nend\n                \n'\n' add map manager selection symbol into the dictAll\n'\ntheSym = symbol.make (#SYMBOL_FILL)\naColor = color.GetWhite\naColor.setTransparent (true)\ntheSym.setColor (aColor)\ntheSym.setOLColor (color.getMagenta)\ntheSym.setOLWidth (2)\n'\n' store dictMSCat, dictMaps, dictCat, and other information\n'
 into a dictionary which\n'                \ndictAll = dictionary.make (10)\ndictAll.add (\"MSCatalog\", dictMSCat)\ndictAll.add (\"ExternalTable\", dictTables)\ndictAll.add (\"Maps\", dictMaps)\ndictAll.add (\"Category\", dictCat)\ndictAll.add (\"Feature\", dictFeature)\ndictAll.add (\"ProjectFile\", MGEProj)\ndictAll.add (\"ProjectWorkspace\", MGEProjDir.asFileName)\ndictAll.add (\"MapManagerSelectionSymbol\", theSym)\ndictAll.add (\"SQLconnection\", MGESQLConnection)\ndictAll.add (\"AOIMode\", \"Point\")\n'\n' ini linkage entry to nil obje
ct\n' A valid entry should be a dictionary. The entry of the dictionary \n' is the category name plus shape type, and the value is a list \n' containing external table name, mslink field and category field\n' e.g. (\"Leases line\", {{\"mslink-oracle, msctlg-oracle\"},{\"feature\", mfldMslink, fldMsctlg\"})\n'\ndictAll.add (\"Linkage\", nil)\ndictAll.add (\"MGETheme\", nil)\n'\n' Attach Index file for Map Manager functions (index.dgn)\n'\n' turn on index theme, zoom to full \n' extent of the index theme\n'\nMapName = MGEProjDir + \"\\
idx\\index.dgn\"\n'\n' if index file exists, use it, otherwise, show users all the DNG files in DNG directory\n'\nKeyView = View.Make\nkeyView.SetName(\"Key View for\" ++ MGEProj.asString)\n'\n'ties to the key view as its object tag\n'\nkeyView.setObjectTag (dictAll)\nkeyView.setTOCWidth (0)\nkeyView.setGUI (\"Key_View\")\ntheWin = keyView.getWin\ntheWin.resize (300,300)\ntheWin.moveTo(0,0)\n\nif (file.exists(MapName.asFileName)) then\n  \n  MGEMap = SrcName.Make(Mapname++\"polygon\")\n  if (MGEMap <> nil) then\n    MGETheme = Theme.m
ake(MGEMap)\n    MGETheme.SetName(\"Index\")\n    MGESymbols = MGETheme.getLegend.getSymbols\n    for each s in MGESymbols\n      s.setOLColor (color.getGray)\n      s.setColor (aColor)\n    end\n    keyView.AddTheme(MGETheme)\n    MGETheme.setVisible (true)\n    MGETheme.setActive (true)\n  end\n  '\n  ' hide TOC, open and position the view window\n  '\n  theWin.open  \n  av.run (\"View.ZoomToThemes\", nil)\nelse\n  av.run (\"MGE.AddDGNs\", nil)\nend  \nav.clearMsg\n"
)

(Script.420
	Name:	"MGE.query"
	SourceCode:	"'\n' Name:        MGE.query\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Opens up dialog designer, and lets user construct\n'              a query string.\n'\n' Topics:      DNG, MGE\n' Search Keys: query\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\n' get basic objects\n'\ntheView = av.getActiveDoc\nthm = theView.getActiveThemes.get(0)\nif (thm.is(ftheme).not) then\n  exit\nend\n'\n' make sure all externa
l tables are joined to the theme\n'\ntheFtab = thm.getFtab\nif (theFtab.isBase) then\n  av.run (\"MGE.Join\", theFtab)\nend\n'\n\nlstFlds = theFtab.getFields\ndictDlgQuery = dictionary.make (5)\nlstFldnames = {}\nfor each fld in lstFlds\n  if (fld.getAlias = nil) then\n    lstFldnames.add (fld.getName)\n  elseif (fld.getName <> \"Shape\") then\n    lstFldnames.add (fld.getAlias)\n  end\nend\n\ndictDlgQuery.add (\"lbxFields\", lstFldnames)\ndictDlgQuery.add (\"dlgQuery\", thm)\ndictDlgQuery.add (\"BtnNewSet\", #VTAB_SELTYPE_NEW)\ndictDlgQu
ery.add (\"BtnAddToSet\", #VTAB_SELTYPE_OR)\ndictDlgQuery.add (\"BtnSelectFromSet\", #VTAB_SELTYPE_AND)\ndictDlgQuery.add (\"Activedoc\", theView)\n\ntheDlg = av.getProject.findDialog (\"DlgQuery\")\ntheDlg.setObjectTag (dictDlgQuery)\ntheDlg.open\n"
)

(Script.421
	Name:	"MGE.SelectAOIAll.Click"
	SourceCode:	"'\n' Name:        MGE.SelectAOIAll.Click\n' Headline:    NONE\n' Self:        NONE\n' Returns:     Sets AOI to all, calls \"MGE.SelectAOITool\"\n'\n' Description: NONE\n' Topics:      DNG, MGE\n' Search Keys: AOI\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\nav.getActiveDoc.getObjectTag.set (\"AOIMode\", \"All\")\nav.run (\"MGE.SelectAOITool\", nil)"
)

(Script.422
	Name:	"MGE.SelectAOIFence.Click"
	SourceCode:	"'\n' Name:        MGE.SelectAOIFence.Click\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Sets AOI selection mode to polygon\n'\n' Topics:      DNG, MGE\n' Search Keys: AOI\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\nav.getActiveDoc.getObjectTag.set (\"AOIMode\", \"Fence\")"
)

(Script.423
	Name:	"MGE.SelectAOIPoint.Click"
	SourceCode:	"'\n' Name:        MGE.SelectAOIPoint.Click\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Sets AOI selection mode to point\n' Topics:      DNG, MGE\n' Search Keys: AOI\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\n\nav.getActiveDoc.getObjectTag.set (\"AOIMode\", \"point\")"
)

(Script.424
	Name:	"MGE.SelectAOITool"
	SourceCode:	"'\n' Name:        MGE.SelectAOITool\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Based on AOI mode being set, lets user define\n'              an AOI, then allows user to select drawings\n'              within the AOI to load.\n\n' Topics:      DNG, MGE\n' Search Keys: AOI\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\n'\n' let user pick an AOI from the key view\n'\nstrTitle = \"Select an Area of Interes
t\"\n\nvwIndex = av.getActiveDoc\nthmIndex = vwIndex.findTheme (\"Index\")\nif (thmIndex = nil) then\n  msgbox.info (\"Index theme is missing!\", strTitle)\n  return nil\nend\nftabIndex = thmIndex.getFtab\n'\n' based on selection mode, get user input\n'\ndictMGETag = vwIndex.getObjectTag\nstrMode = dictMGETag.get (\"AOIMode\")\nif (strMode = \"point\") then\n  pntUser = vwIndex.getDisplay.returnUserPoint\n  if (pntUser = nil) then\n    return nil\n  end\n  '\n  ' find drawings within the aoi\n  '\n  ftabIndex.SelectByPoint (pntUser, 0, #
VTAB_SELTYPE_NEW)\nelseif (strMode = \"view\") then\n  rectUser = vwIndex.getDisplay.returnUserRect\n  if (rectUser = nil) then\n    return nil\n  end\n  '\n  ' find drawings within the aoi\n  '\n  ftabIndex.SelectByRect (rectUser, #VTAB_SELTYPE_NEW)\nelseif (strMode = \"fence\") then\n  polyUser = vwIndex.getDisplay.returnUserPolygon\n  if (polyUser = nil) then\n    return nil\n  end\n  '\n  ' find drawings within the aoi\n  '\n  ftabIndex.SelectByPolygon (polyUser, #VTAB_SELTYPE_NEW)\nelseif (strMode = \"all\") then\n  ftabIndex.g
etSelection.setAll\n  ftabIndex.updateSelection\nend\nif (ftabIndex.getSelection.count = 0) then\n  return nil\nend \n'\n' delete existing graphics\n'\nlstGras = vwIndex.getGraphics\nif (lstGras.count > 0) then\n  lstGras.selectAll\n  lstGras.clearSelected\nend\n'\n' draw selected map boundaries\n'\nfldShape = ftabIndex.findField (\"shape\")\n\ndictAll = vwIndex.getObjectTag\ndictmaps = dictAll.get(\"Maps\")\nsymGra = dictAll.get (\"MapManagerSelectionSymbol\")\n'\n'go through the entityNum ---> MSCATALOG --> Maps linkage, find\n'out wh
at DGN files to are within the AOI\n'\nfldMSL = ftabIndex.findField (\"Mslink-DMRS\")\ndictMSCat = dictAll.get (\"MSCatalog\")\ndictMaps = dictAll.get (\"Maps\")\ndictCat = dictAll.get(\"Category\")\n\nlstDGNs = {}\nnumMaxCatnmWidth = 0\nnumMaxDGNWidth = 0\nfor each rec in ftabIndex.getSelection\n  '\n  ' draw outline of drawing boundaries\n  '\n  g = graphicShape.make (ftabIndex.returnValue (fldShape, rec))\n  g.setSymbol (symGra)\n  lstGras.addBatch (g)\n  \n  numMSL = ftabIndex.returnValue (fldMSL, rec)\n  numCat = dictMaps.get(nu
mMSL).get(0)\n  strCatnm = dictCat.get(numCat)\n  strDGN = dictMaps.get(numMSL).get(1)\n  if (strCatnm.count > numMaxCatnmWidth) then\n    numMaxCatnmWidth = strCatnm.count\n  end\n  if (strDGN.count > numMaxDGNWidth) then\n    numMaxDGNWidth = strDGN.count\n  end\n  lstDGNs.add ({strCatnm, strDGN}) \n  '\n  ' label drawings\n  '\n  graText = graphicText.make (strDGn, g.getShape.returnCenter)\n  graText.getSymbol.setSize (10)\n  graText.getSymbol.setColor (color.getMagenta)\n  lstGras.addBatch (graText)\nend\nlstGras.endBatc
h\n\nnumMaxCatextWidth = 13\nnumMaxCatnmWidth = numMaxCatnmWidth + 10\nnumMaxDGNWidth = numMaxDGNWidth + 10\n'\n' concatinate cat name, description and dgn file to a string,\n' so we can define listdrawings from a list of single strings,\n' in this way, we can easily select and deselect multiple cells\n'\n'\nlstNewDGNs = {}\nfor each lst in lstDGNs\n  str2 = lst.get(1)\n  str3 = lst.get(0)\n  str1 = str2.right (3)\n  str1 = str1 + string.makeBuffer (numMaxCatextWidth - str1.count)\n  str2 = str2 + string.makeBuffer (numMaxD
GNWidth - str2.count)\n  str3 = str3 + string.makeBuffer (numMaxCatnmWidth - str3.count)\n  lstnewDGNs.add (str1 + str2 + str3)\nend\n'\n' open dialog\n'\ndlgMapmanager = av.getProject.findDialog (\"dlgMapmanager\")\ndlgMapmanager.setObjectTag (lstNewDGNs)\nif (dlgMapManager.isOpen) then\n  av.run (\"MGE.dlgMapMan.open\", dlgMapmanager)\nelse\n  dlgMapmanager.open\nend\n'\n' clear selection\n'\nftabIndex.getSelection.clearAll\nftabIndex.updateSelection\n\n"
)

(Script.425
	Name:	"MGE.SelectAOIView.Click"
	SourceCode:	"'\n' Name:        MGE.SelectAOIView.Click\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Sets AOI selection mode to rectangle\n\n' Topics:      DNG, MGE\n' Search Keys: AOI\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\nav.getActiveDoc.getObjectTag.set (\"AOIMode\", \"View\")"
)

(Script.426
	Name:	"MGE.ShowTable"
	SourceCode:	"'\n' Name:        MGE.ShowTable\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Shows attribute table with joins from external tables\n'\n' Topics:      DNG, MGE\n' Search Keys: table\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\ntheView = av.GetActiveDoc\nfor each t in theView.GetActiveThemes\n  if (t.HasTable) then\n    theFtab = t.getFtab\n    theFtab = t.getFtab\n    if (theFtab.isBase) then\n      av.
run (\"MGE.Join\", theFtab)\n    end\n\n    t.EditTable\n  end\nend\n\n"
)

(Script.427
	Name:	"MGE.SplitThemes"
	SourceCode:	"'\n' Name:        MGE.SplitThemes\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: Finds what feature types are available in the drawing,\n'              and lets the user pick features to split\n'\n' Topics:      DNG, MGE\n' Search Keys: Split into features\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\ntheProject = av.getProject\ntheView = av.getActiveDoc\nLstKeyViews = theProject.getDocsWithGUI (thePro
ject.findGUI(\"Key_view\"))\nif (lstKeyViews.count = 0) then\n  msgbox.info (\"The key view is missing!\", \"\")\n  return nil\nend\n\ndictAll = lstKeyviews.get(0).getObjectTag\ndictMGEThemes = dictAll.get (\"MGETheme\")\ndictFeature = dictAll.get(\"Feature\")\nif (dictMGEThemes = nil) then\n  return nil\nend\n\nthm = theView.getActiveThemes.get(0)\nlstCurrentLinkage = dictMGEThemes.get (thm)\nif (lstCurrentLinkage = nil) then\n  return nil\nend\n'\n' summary works off a selected set if any records are selected,\n' here we clear the sel
ection, so that summary is done to entire\n' table\n'\ntheFtab = thm.getFtab\ntheBitmap = theFtab.getSelection\nif (theBitmap.count > 0) then\n  theBitmapClone = theBitmap.clone\n  theBitmap.clearAll\n  theFtab.updateSelection\nend\n\n\n\nDictFeatureAvailable = dictionary.make (dictFeature.count)\nlstFlinkFlds = {}\nfor each lstLinkInfo in lstCurrentLinkage\n  strTablenm = lstLinkInfo.get(0)\n  fldMSlink = lstLinkInfo.get(1)\n  fldMSCtlg = lstLinkInfo.get(2)\n  strFldAlias = fldMSlink .getAlias\n  strFldCtlgnm = fldMSCtlg.getA
lias\n  \n  '\n  ' if it's a feature linkage, we want to summarize the table and get\n  ' a list of unique feature types from this linkage\n  '\n  if (strTablenm = \"Feature\") then\n    lstFlinkFlds.add (fldMSLink)\n    \n    fnCount = filename.merge (theProject.getWorkdir.asString, \"sum.dbf\")\n    vtabCount = theFtab.Summarize(fnCount, dBASE, fldMSLink,{fldMSLink},{#VTAB_SUMMARY_COUNT})    \n    fldMSLinkvtab = vtabCount.findField (fldMSLink.getName)\n    for each rec in vtabCount\n      fcode = vtabCount.returnValue(fl
dMSLinkvtab, rec)\n      fname = dictFeature.get(fcode)\n      if (fname <> nil) then\n        DictFeatureAvailable.add (fname, fcode)\n      end\n    end\n  end\nend\n'\n' let user pick features to view\n'  \nlstFeturesAvailable = DictFeatureAvailable.returnKeys\nlstFeturesAvailable.sort (true)\n\nlstFeaturesSelected = msgbox.multiListAsString (lstFeturesAvailable, \n                                               \"Select features you want to view\", \"\")\nif (lstFeaturesSelected = nil) then\n  return nil\nend   \nfor each strF
name in lstFeaturesSelected                                                \n  '\n  ' get feature code, and create a new theme by setting theme definition to\n  ' this type of feature\n  '\n  strFcode = dictFeatureAvailable.get(strFname).asString\n  strDef = nil\n  for each f in lstFlinkFlds\n    if (strDef = nil) then\n      strDef = \"([\" + f.getName + \"]=\" ++ strFcode ++ \")\"\n    else\n      strDef = strDef ++ \"or\" ++ \"([\" + f.getName + \"]=\" ++ strFcode ++ \")\"\n    end\n  end\n  \n  thmNew = thm.clone\n  thmNew.getFtab.s
etDefinition (strDef)\n  thmNew.setName (strFname)\n  theView.addTheme (thmNew)\nend\n\n'\n' restore it's selection\n'\nif (theBitmap.count > 0) then\n  theFtab.setSelection (theBitmapClone)\n  theFtab.updateSelection\nend\n\n      \n\n\n\n\n\n    \n    \n\n"
)

(Script.428
	Name:	"Util.cloneGUI"
	SourceCode:	"' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n'\n' Headline: Clones an existing Gui \n'\n\n  lGuis = av.GetProject.GetGuis\n  guiSource = MsgBox.Choice(lGuis,\"Select the Gui to clone from\",\"GuiExt.CloneGui\")\n  if (guiSource = nil) then\n    return nil\n  end\n\n  sGuiName = MsgBox.Input(\"Enter the new Gui Name\",\"CloneGui\",\"Clone of\"++guiSource.GetName)\n\n  if (sGuiName = nil) then\n    return nil\n  end\n\n  guiNew = guiSource.Clone\n  guiNew.SetName(sGuiName)\n\n  av.GetProject.AddGui(guiNew)\n\n\n\n"
)

(Script.429
	Name:	"Util.convertToShape"
	SourceCode:	"'\n' Name:        Util.convertToShape\n' Headline:    NONE\n' Self:        NONE\n' Returns:     a shape based theme\n' Description: converts the theme into a shape file\n'\n' Topics:      Convert to shape file\n' Search Keys: conversion\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\n\nt = self.get(0)\nstrOutputFile = self.get(1).asFileName\nif (t.Is( FTHEME ).Not) then \n  if (t.CanExportToFtab.Not) then \n     return nil\n  end\nend\n'\n' 
export all the fields\n'\nlstFieldsOld = t.getFtab.getFields\nfor each f in lstFieldsOld\n  f.setVisible (true)\nend\n\nif (t.Is (FTHEME).Not) then\n anFTab = t.ExportToFtab(strOutputFile)\nelse\n  tbl = t.GetFTab \n  if (tbl.getNumRecords > 0) then\n    anFTab = tbl.Export(strOutputFile, Shape, false)\n    \n    if (anFTab.HasError) then\n     'if (anFTab.HasLockError) then\n     '  MsgBox.Error(\"Unable to acquire Write Lock for file \" + strOutputFile.GetBaseName,\"\")\n     'else\n     '  MsgBox.Error(\"Unable to create \" + s
trOutputFile.GetBaseName,\"\")\n     'end\n     return nil\n    end   \n    '\n    ' maintain field names by setting aliases\n    '\n    lstFields = anFtab.getFields\n    cnt = lstFields.count - 1\n    for each i in 0 .. cnt\n      lstFields.get(i).setAlias (lstFieldsOld.get(i).getName)\n    end\n  else\n    return nil\n  end\nend\n\nthm = ftheme.make (anFtab)     \nif (thm <> nil) then\n  return thm\nend"
)

(Script.430
	Name:	"Util.DlgDev"
	SourceCode:	"\n'theDialog = SELF.GetDialog\n\n\n'txlPrefix = theDialog.FindByName(\"txl_Prefix\")\n'lbxDialogs = theDialog.FindByName(\"lbx_Dialogs\")\n\nprefix = \"MGE\"\n\ntheDEd = av.GetActiveDoc\ndName = theDed.getName\nprefixString = prefix+\".\"+dName+\".\"\n'\n' Make the Open and Close scripts for the dialog...\n'\ntheOpenSed = SEd.MakeFromSource(\"Return nil\",prefixString+\"Open\")\ntheCloseSed = SEd.MakeFromSource(\"Return nil\",prefixString+\"Close\")\n\nlstControls = theDEd.GetGraphics\n'theDialog.Close\nfor each ctl in lstControls\n  ctl = ctl.G
etControl\n  if (ctl.Is(ControlPanel)) then\n    theUpdateSed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Update\")\n    ctl.SetUpdate(theUpdateSed.GetName)\n    for each c in ctl.GetControls\n      c = c.GetControl\n      if (c.Is(LabelButton)) then\n        theClickSed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Click\")\n        theUpdateSed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Update\") \n        c.SetUpdate(theUpdateSed.GetName)\n        c.SetClick(theClickSed.G
etName)\n      elseif (c.Is(Button)) then\n        theClickSed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Click\")\n        theUpdateSed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Update\")       \n        c.SetUpdate(theUpdateSed.GetName)\n        c.SetClick(theClickSed.GetName)\n      elseif (c.Is(Tool)) then\n        theApplySed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Apply\")\n        theClickSed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Click\")\n 
       theUpdateSed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Update\") \n        c.SetUpdate(theUpdateSed.GetName)\n        c.SetClick(theClickSed.GetName)\n        c.SetApply(theApplySed.GetName)\n      elseif (c.Is(TextLine)) then\n        theApplySed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Apply\")\n        theChangedSed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Changed\")\n        theClickSed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Click\")\n 
       theUpdateSed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Update\") \n        c.SetUpdate(theUpdateSed.GetName)\n        c.SetClick(theClickSed.GetName)\n        c.SetApply(theApplySed.GetName)\n        c.SetChanged(theChangedSed.GetName)\n      elseif (c.Is(TextBox)) then\n        theClickSed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Click\")\n        theUpdateSed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Update\") \n        c.SetUpdate(theUpdateSed.GetName)\n    
    c.SetClick(theClickSed.GetName)\n      elseif (c.Is(ListBox)) then\n        theApplySed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Apply\")\n        theUpdateSed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Update\") \n        theSelectSed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Select\")\n        c.SetUpdate(theUpdateSed.GetName)\n        c.SetApply(theApplySed.GetName)\n        c.SetSelect(theSelectSed.GetName)\n      elseif (c.Is(ComboBox)) then\n        theUpdate
Sed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Update\") \n        theSelectSed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Select\")\n        c.SetUpdate(theUpdateSed.GetName)\n        c.SetSelect(theSelectSed.GetName)\n      elseif (c.Is(CheckBox)) then\n        theClickSed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Click\")\n        theUpdateSed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Update\")   \n        c.SetUpdate(theUpdateSed.GetName)\n        c.
SetClick(theClickSed.GetName)\n      elseif (c.Is(RadioButton)) then\n        theClickSed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Click\")\n        theUpdateSed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Update\")   \n        c.SetUpdate(theUpdateSed.GetName)\n        c.SetClick(theClickSed.GetName)\n      elseif (c.Is(Slider)) then\n        theClickSed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Click\")\n        theUpdateSed = SEd.MakeFromSource(\"Return nil\",prefixSt
ring+c.GetName+\".Update\") \n        theDragSed = SEd.MakeFromSource(\"Return nil\",prefixString+c.GetName+\".Drag\")\n        c.SetUpdate(theUpdateSed.GetName)\n        c.SetClick(theClickSed.GetName)\n        c.SetDrag(theDragSed.GetName)\n      end\n    end\n  else\n    if (ctl.Is(LabelButton)) then\n      theClickSed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Click\")\n      theUpdateSed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Update\")       \n      ctl.SetUpdate(theUpdateSed.GetNa
me)\n      ctl.SetClick(theClickSed.GetName)\n    elseif (ctl.Is(Button)) then\n      theClickSed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Click\")\n      theUpdateSed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Update\")       \n      ctl.SetUpdate(theUpdateSed.GetName)\n      ctl.SetClick(theClickSed.GetName)\n    elseif (ctl.Is(Tool)) then\n      theApplySed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Apply\")\n      theClickSed = SEd.MakeFromSource(\"Return nil\",
prefixString+ctl.GetName+\".Click\")\n      theUpdateSed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Update\") \n      ctl.SetUpdate(theUpdateSed.GetName)\n      ctl.SetClick(theClickSed.GetName)\n      ctl.SetApply(theApplySed.GetName)\n    elseif (ctl.Is(TextLine)) then\n      theApplySed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Apply\")\n      theChangedSed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Changed\")\n      theClickSed = SEd.MakeFromSource(\"Return nil\",
prefixString+ctl.GetName+\".Click\")\n      theUpdateSed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Update\") \n      ctl.SetUpdate(theUpdateSed.GetName)\n      ctl.SetClick(theClickSed.GetName)\n      ctl.SetApply(theApplySed.GetName)\n      ctl.SetChanged(theChangedSed.GetName)\n    elseif (ctl.Is(TextBox)) then\n      theClickSed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Click\")\n      theUpdateSed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Update\")      \n     
 ctl.SetUpdate(theUpdateSed.GetName)\n      ctl.SetClick(theClickSed.GetName)\n    elseif (ctl.Is(ListBox)) then\n      theApplySed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Apply\")\n      theUpdateSed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Update\") \n      theSelectSed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Select\")\n      ctl.SetUpdate(theUpdateSed.GetName)\n      ctl.SetApply(theApplySed.GetName)\n      ctl.SetSelect(theSelectSed.GetName)\n    elseif 
(ctl.Is(ComboBox)) then\n      theUpdateSed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Click\") \n      theSelectSed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Select\")\n      ctl.SetUpdate(theUpdateSed.GetName)\n      ctl.SetSelect(theSelectSed.GetName)\n    elseif (ctl.Is(CheckBox)) then\n      theClickSed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Click\")\n      theUpdateSed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Update\")   \n      ctl.Se
tUpdate(theUpdateSed.GetName)\n      ctl.SetClick(theClickSed.GetName)\n    elseif (ctl.Is(RadioButton)) then\n      theClickSed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Click\")\n      theUpdateSed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Update\")   \n      ctl.SetUpdate(theUpdateSed.GetName)\n      ctl.SetClick(theClickSed.GetName)\n    elseif (ctl.Is(Slider)) then\n      theClickSed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Click\")\n      theUpdateSed = SE
d.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Update\") \n      theDragSed = SEd.MakeFromSource(\"Return nil\",prefixString+ctl.GetName+\".Drag\")\n      ctl.SetUpdate(theUpdateSed.GetName)\n      ctl.SetClick(theClickSed.GetName)\n      ctl.SetDrag(theDragSed.GetName)\n    end\n  end\nend\n\n'\n' Compile all the scripts for the dialog...\n'\nfor each s in av.GetProject.GetDocs\n  if (s.Is(SEd) AND (s.GetName.Contains(prefixString))) then\n    s.Compile\n  end\nend\n'\n' Compile the Dialog\n'\ntheDEd.Compile\n"
)

(Script.431
	Name:	"Util.FindFieldByAlias"
	SourceCode:	"'\n' Name:        Util.FindFieldByAlias\n' Headline:    NONE\n' Self:        NONE\n' Returns:     a field\n' Description: Finds the field using it's name or alias\n' Topics:      find field\n' Search Keys: field alias\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\ntheVtab = self.get(0)\nstrFldNm = self.get(1)\n\ntheFld = theVtab.findField (strFldNm)\nif (theFld = nil) then\n  for each fld in theVtab.getFields\n    if (fld.getAlias = str
FldNm) then\n      return fld\n    end\n  end\nelse\n  return theFld\nend"
)

(Script.432
	Name:	"Util.FlashShape"
	SourceCode:	"'\n' Name:        Util.FlashShape\n' Headline:    NONE\n' Self:        NONE\n' Returns:     NONE\n' Description: NONE\n' Topics:      Flash shap\n' Search Keys: shape\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\n\ntheView = self.get(0)\ntheShp = self.get(1)\n'\n' zoom to the shape\n'\ntheDsp = theView.getDisplay\ntheDsp.zoomToRect (theShp.returnExtent.scale (4))\n'\n' make a symbol to flash selected shape\n'\nshpType = theShp.getClass.getC
lassName.asString\nif (shpType = \"Polygon\") then\n  theSym = symbol.make (#SYMBOL_FILL)\nelseif ((shpType = \"Line\") or (shpType = \"Polyline\")) then\n  theSym = symbol.make (#SYMBOL_PEN)\n  theSym.setSize (2)\nelseif (shpType = \"Point\") then\n  theSym = symbol.make (#SYMBOL_MARKER)\nend\n\ntheDsp.flush\ntheDsp.flashShape (theShp, theSym, 100, 5)\n\n"
)

(Script.433
	Name:	"Util.MakeNewGUI"
	SourceCode:	"strGUIName = msgbox.input (\"Enter GUI name\", \"Make a new GUI\", \"NewGUI\")\nif (strGUIName <> nil) then\n  theGUI = docGUI.make (\"view\")\n  theGUI.setname (strGUIName)\n  av.getProject.addGUI (theGUI)\nend\n"
)

(Script.434
	Name:	"Util.MergeThemes"
	SourceCode:	"'\n' Name:        Util.MergeThemes\n' Headline:    NONE\n' Self:        NONE\n' Returns:     a theme\n' Description: Merge themes into one single shape file\n'\n' Topics:      Merge themes\n' Search Keys: merge themes\n' Requires:    NONE\n' History:     NS - AV 3.1   11/04/97 \n'----------------------------------------------------------------------\n\nthemesToMerge = self.get(0)\noutFName = self.get(1).asFileName\n\nif ((themesToMerge = Nil) or (themesToMerge.Count < 2)) then\n  MsgBox.Error(\"Not enough themes to merge.\", 
\"\")\n  return nil\nend\n\nbHasFeatures = false\nfor each t in themesToMerge\n  if (t.getFtab.getNumRecords > 0) then\n    bHasFeatures = true\n    break\n  end\nend\nif (bHasFeatures.not) then\n  return nil\nend\n'\n' Themes must have matching shape types for merging.  Using the first\n' active theme verify that this is the case...\n' \ncheckType  = themesToMerge.Get(0).GetFtab.FindField(\"Shape\").GetType\nfor each i in 1 .. (themesToMerge.Count - 1)\n  t = themesToMerge.Get(i)\n  if (checkType <> t.GetFTab.FindField(\"Shape\").Ge
tType) then\n\n    MsgBox.Error(\"Theme feature type mismatch - Unable to merge.\",\"\")\n    return nil\n  end\nend\n\n' Create the list of fields used for the output theme.  \n' The fields are taken from all the themes, if fields are found,\n' values will be copied to the output theme, if not, \n' they will be left blank\n'\n' use dictionary to avoid duplicated records\n'\ndictField = dictionary.make (themesToMerge.get(0).getFtab.getFields.count)\nfieldList = {}\nfor each t in themesToMerge\n  for each f in t.getFtab.getField
s\n    if (f.getName = \"shape\") then\n      continue\n    else\n      fCopy = f.clone\n      if (dictField.add (f.getName, fCopy)) then\n        fieldList.add (fCopy)\n      end\n    end\n  end\nend\n\n'fieldList = List.Make\n'for each f in themesToMerge.Get(0).GetFTab.GetFields\n'  if (f.GetName = \"Shape\") then\n'    continue\n'  else \n'    fCopy = f.Clone\n'    fieldList.Add(fCopy)\n'  end\n'end\n\n' Get the class of new FTab to create, create the new FTab and \n' add fields that we've gathered from the input themes....\n\nshape
Type = themesToMerge.Get(0).GetFTab.FindField(\"Shape\").GetType\n\nif (shapeType = #FIELD_SHAPELINE) then \n  outClass = POLYLINE\n\nelseif (shapeType = #FIELD_SHAPEMULTIPOINT) then\n  outClass = MULTIPOINT\n\nelseif (shapeType = #FIELD_SHAPEPOINT) then\n  outClass = POINT\n\nelseif (shapeType = #FIELD_SHAPEPOLY) then\n  outClass = POLYGON\n\nelse\n  MsgBox.Error(\"Invalid shape field type.\", \"Merge Themes\")\n  return nil\n\nend\n\nmergeFTab = FTab.MakeNew( outFName, outClass )\n'\n' After adding fieldList into mergeFtab, fieldLis
t will be modified\n' to refrect the fields in the mergeFtab.\n' copy fieldList to fieldListAlias will maintain field aliases\n'\nfieldListAlias = {}\nfor each f in fieldList\n  fieldListAlias.add (f.clone)\nend\n\nif (fieldList.Count > 0) then\n  mergeFTab.AddFields (fieldList)\nend\n'\n' maintain field names by setting aliases\n'\n\nmergeFieldList = mergeFtab.getFields\ncnt = mergeFieldList.count - 2\nfor each i in 0 .. cnt\n  mergeFieldList.get(i+1).setAlias (fieldListAlias.get(i).getAlias)\nend\n\n' Populate the new FTab fro
m the FTabs of the input themes...\n\nfor each t in themesToMerge\n\n  av.ShowMsg( \"Merging\"++t.GetName )\n\n  inFTab  = t.GetFTab\n\n  if (inFTab.GetSelection.Count = 0) then\n    theRecordsToMerge = inFTab\n    numRecs = inFTab.GetNumRecords\n  else\n    theRecordsToMerge = inFTab.GetSelection\n    numRecs = theRecordsToMerge.Count\n  end\n\n  for each rec in theRecordsToMerge \n\n    av.SetStatus( (rec / numRecs) * 100 )\n\n    newRec   = mergeFTab.AddRecord\n\n    inField  = inFTab.FindField( \"Shape\" )\n    outField = mergeFT
ab.FindField( \"Shape\" )\n    mergeFTab.SetValue( outField, newrec, inFTab.ReturnValue( inField, rec ))\n\n    if (fieldList.Count > 0) then\n      for each f in fieldListAlias\n        fName    = f.GetAlias \n        inField  = inFTab.FindField( fName )\n\n        ' Skip field if not found in inFTab...\n        if ( inField <> Nil ) then \n          outField = av.run (\"Util.FindFieldByAlias\", {mergeFtab, fName})  'mergeFTab.FindField( fName )\n          if (outField = nil) then\n            'this should never happen\n  
          msgbox.info (fName ++ \"not found\",\"\")\n            return nil\n          end\n          aValue = inFTab.ReturnValue( inField, rec )\n\n          mergeFTab.SetValue( outField, newRec, aValue )\n        end\n\n      end   ' for each f\n    end   ' if count \n  end   ' for each rec\nend   ' for each t\n\nav.ClearMsg\nav.ClearStatus\n\nmergeTheme = FTheme.Make( mergeFTab )\n\nreturn mergeTheme"
)

(Script.435
	Name:	"Util.RemoveGUI"
	SourceCode:	"' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n'\n' Headline: Removes an existing Gui\n'\n  lGuis = av.GetProject.GetGuis\n  guiDel = MsgBox.List(lGuis,\"Select the Gui to remove\",\"GuiExt.RemoveGui\")\n  if (guiDel = nil) then return nil end\n\n  bReturn = MsgBox.YesNoCancel(\"Are you sure you want to remove Gui\"++guiDel.GetName.Quote,\"RemoveGui\",FALSE)\n\n  if (bReturn.Not) then return nil end\n\n  av.GetProject.RemoveGui(guiDel.GetName)\n\n\n\n"
)