PROBLEM
Resizing legend text with the Symbol Window Font Manager works permanently. Text size changes made to the legend with Avenue, however, revert to the original size when closing and reopening the project.
This is a known issue.
Code:
theLayout = av.GetActiveDoc
theGraphics = theLayout.GetGraphics
for each g in theGraphics
if (g.Is(LegendFrame)) then
oldrect = g.getbounds
oldrectorigin = oldrect.returnorigin
oldrectsize = oldrect.returnsize
theSymbols = g.ReturnSymbols
for each s in theSymbols
if (s.Is(TextSymbol)) then
oldtextsize = s.getsize
newpointsize = msgbox.input(
"Enter desired point text size","",oldtextsize.asstring)
s.SetSize(newpointsize.asnumber)
end
conversionfactor = newpointsize.asnumber/oldtextsize
newrectsize = (oldrectsize*(conversionfactor@conversionfactor))
myrect = rect.make(oldrectorigin,newrectsize)
g.setbounds(myrect)
end
g.Invalidate
end
end
theLayout.invalidate
Article ID:000004208
Get help from ArcGIS experts
Download the Esri Support App