ARCVIEW 2.1 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 You can download default.apr from my Web page (see end of this file) or follow these instructions: 1) Open default.apr, located in the $HOME directory (usually C:\temp) 2) Create a new script, named View.BoxLabel, with 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 '====================================================================== 3) Compile and close the script 4) Double click the tool bar, choose "View" and "Menus", and create a new entry beneath "&Theme | &Auto-Label" 5) Double click "Click" and select View.BoxLabel 6) Double click "Update" and select View.LabelThemes.Update 7) Double click "Help" and enter "Auto-label with Boxes" 8) Double click "HelpTopic" and enter "Auto-label" 9) Double click "Label" and enter "Label with Boxes" 10) Close the Customizer and save the project 11) Exit ArcView and you're ready to go! INSTALLING THE BUTTON IN A SPECIFIC PROJECT 1) Open the desired project 2) Follow steps 2-10 above ======================================================================= 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