English

How To: Turn scaling off for selected graphics with Avenue

Summary

The script in this article gets the Symbol object associated with the GraphicText object, and unhooks the symbol from the display with the UnHook 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 off 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
    thingsToStopScaling = theView.GetGraphics.GetSelected

    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

  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 unscale.
  6. Click the
    [O-Image] Run compiled script button
    button to run the script.

Related Information