ARCVIEW 3.0 Autolabel with Boxes This routine performs an Autolabel on one or more themes, creating a box behind each label. You may wish to play with the script to get the desired box size and position. INSTALLING THE SCRIPT IN THE DEFAULT PROJECT 1) Begin a NEW ArcView 3.0 session. 2) Create a new script by double-clicking on the "Scripts" icon 3) Use "Properties..." under the "Script" menu to rename Script1 to View.BoxLabel 4) Paste the following text: '====================================================================== 'View.BoxLabel 'Autolabel theme(s) with background boxes av.ShowMsg("Labeling themes...") theView = av.GetActiveDoc theView.LabelThemes(TRUE) theGraphicList = theView.GetGraphics theTextObjectList = theGraphicList.GetSelected theGraphicList.UnselectAll for each TextObject in theTextObjectList r = TextObject.GetBounds.Clone d = r.GetWidth * 0.2 r.ExpandBy(d) x = d.negate / 2 r.Move(0, x) g = GraphicShape.Make(r) g.SetSelected(true) theGraphicList.Add(g) end theGraphicList.MoveSelectedToBack for each TextObject in theTextObjectList TextObject.SetSelected(true) end av.ClearMsg '====================================================================== 5) Compile and close the script 6) Double-click the tool bar, choose "View" and "Menus", and create a new entry beneath "&Theme | &Auto-Label" 7) Double-click "Click" and select View.BoxLabel 8) Double-click "Update" and select View.LabelThemes.Update 9) Double-click "Help" and enter "Auto-label with Boxes" 10) Double-click "HelpTopic" and enter "Auto-label" 11) Double-click "Label" and enter "Label with Boxes" 12) Click the "Make Default Button" and then close the Customize dialog box 13) EXIT ArcView (do not save changes to "Untitled") and you're done! ======================================================================= INSTALLING THE BUTTON IN A SPECIFIC PROJECT 1) Open the desired project and follow steps 2-11 above 2) Close the "Customizer" and save the project ======================================================================= USING THE MENU ENTRY 1) Invoke the Palette Manager (Control-P) and set the desired properties for text, fill, and outline. 2) Select the theme(s) to be labelled (be sure that the "Text Label" properties have been set). 3) Under the "Theme" menu, click "Label with Boxes." ======================================================================= Mark Cederholm plp@pierssen.com http://www.pierssen.com/PC/arcinfo.htm http://www.pierssen.com/arcview/arcview.htm