HOW TO

Scale text and graphics in a view

Last Published: April 25, 2020

Summary

In ArcView, you cannot scale graphics entered with the graphic tools or text symbols that are entered with the text tool.

Procedure

The following script prompts if you want to turn the scale on or off for text, marker, or other graphic symbols. It will not scale fills. It operates best when installed as a button on the view GUI.

  1. Open a new script window.

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

  2. Copy the following script:

    Code:
    theView = av.GetActiveDoc
    theDisplay = theView.GetDisplay
    graphsel = {"TEXT", "GRAPHIC"}
    graphictype = msgbox.choiceasstring(graphsel, "Symbol Type:",
    "ScaleProperties")
    if (graphictype = nil) then
    exit
    elseif (graphictype = "TEXT") then
    theGTL = theView.GetGraphics.FindAllByClass(graphictext)
    thingsToStopScaling = theView.GetGraphics.GetSelected
    theSelGTL = {}
    elseif (graphictype = "GRAPHIC") then
    theGTL = theView.GetGraphics.FindAllByClass(graphicshape)
    thingsToStopScaling = theView.GetGraphics.GetSelected
    theSelGTL = {}
    end
    scalesel = {"ON", "OFF"}
    scalechoice = msgbox.choiceasstring(scalesel, "Scale ON or OFF",
    "ScaleProperties")
    if (scalechoice = nil) then
    exit
    elseif (scalechoice = "ON") then
    for each g in thingsToStopScaling
    if (g.Is(graphictext)) then
    g.GetSymbol.UnHook
    elseif (g.Is(GraphicShape)) then
    if (g.GetShape.Is(polygon).Not) then
    g.GetSymbol.UnHook
    end
    end
    end
    for each gt in theGTL
    if (gt.IsSelected)
    then
    theSelGTL.Add(gt)
    end
    end
    for each gt in theSelGTL
    theDisplay.HookupSymbol(gt.GetSymbol)
    end
    elseif (scalechoice = "OFF") then
    for each g in thingsToStopScaling
    if (g.Is(graphicText)) then
    g.GetSymbol.UnHook
    elseif (g.Is(GraphicShape)) then
    if (g.GetShape.Is(polygon).Not) then
    g.GetSymbol.UnHook
    end
    end
    end
    end
    av.purgeobjects

  3. Click the compile
    [O-Image] Script compile button
    and then the run
    [O-Image] Run compiled script button
    button.

Article ID:000002873

Software:
  • Legacy Products

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Discover more on this topic