English

How To: Change the characteristics of one label without affecting all other labels in that theme

Summary

When labels are added to a View using the "Auto-Label" menu option, all labels share the same characteristics. While this is how the Auto-Label function was designed, sometimes it is necessary to change the size or other possible characteristics of just one label.

Procedure

The following script will create individual graphics from all the selected Graphic Labels in a View. Only the selected labels will be affected; the rest will still belong to the original 'Auto-Label' group.

  1. Open a new script window.

    A. Activate the Project window.
    B. Click the Scripts icon.
    C. Click New.


  2. Copy and paste the following code into this new script window.

    Code:
    '
    ' Turn 'autolabel' graphics into individual graphics.
    '
    ' autolabel_ungroup.ave
    '
    v = av.getactivedoc
    gl = v.getgraphics

    for each g in gl.clone
    if((g.is(graphiclabel)) and (g.isselected)) then
    txt = g.gettext
    apt = g.getbounds.returnorigin
    asym = g.getsymbol.clone
    ng = graphiclabel.makewithsym(txt,apt,asym,{})
    gl.add(ng)
    gl.removegraphic(g)
    end
    end

    v.invalidate

  3. Compile the script by clicking on the compile button.
    [O-Image] Script compile button
  4. Attach the script to a View button.

    A. Compile the script.
    B. Switch to the Project window.
    C. Select Customize from the Project menu.
    D. On the Customize dialog box, click the Type dropdown arrow and click View.
    E. Select Buttons under Category.
    F. Click the New button.
    G. Double-click the Click property in the Customize dialog box.
    H. Type the name of the script in the Script Manager and click Select.
    I. Close the Customize dialog box.

    For more information, see "Customize dialog box" in ArcView Help.



    Note:
    Please see the ArcView Help topic "GraphicLabel Class Discussion" for further details.

  5. Select the labels you would like to change in the view after you have auto-labeled the features.

    Note:
    You can select multiple labels by holding down the Shift key.

  6. Click on your newly created button in the view.
  7. Select the desired labels again.
  8. Open the Font Palette by selecting the 'Show Symbol Window' option from the 'Window' menu.
  9. Modify the label characteristics (font type, size, color, etc.) as desired.
  10. Close the Font Palette window after all of the desired labels have been modified.