HOW TO

Turn scaling on for selected graphics with Avenue

Last Published: April 25, 2020

Summary

The script in this article gets the Symbol object associated with the GraphicText object, and hooks the symbol to the display with the HookUpSymbol request.

Procedure



  1. Open a new script window.

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

  2. Copy the following code into the script window:

    Code:
    '-- Turn scaling on for selected graphics

    '-- If use this on auto-labels created with the Find Best method,
    '-- select one of them instead of all, as this script may ruin your labels.

    theView = av.GetActiveDoc
    thingsToStartScaling = theView.GetGraphics.GetSelected

    for each g in thingsToStartScaling
    if (g.Is(graphicText)) then
    theView.GetDisplay.HookUpSymbol(g.GetSymbol)
    elseif (g.Is(GraphicShape)) then
    if (g.GetShape.Is(polygon).Not) then
    theView.GetDisplay.HookUpSymbol(g.GetSymbol)
    end
    end
    end

  3. Click the
    [O-Image] Script compile button
    button to compile the script.
  4. Click the view.
  5. Select the text graphics you want to scale.
  6. Click the
    [O-Image] Run compiled script button
    button to run the script.

Article ID:000004074

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic