Wednesday, 15 March 2017

arcgis desktop - Stacking labels in ArcMap without Maplex?


I do not see any obvious setting for stacking labels in ArcMap (ArcView license).


Am I missing something or do i have to write a complex expression to stack my labels?



Answer



This works:


 Function FindLabel([Name]) 
var = [Name]
result = ""

splitStr = Split(var, chr(32))
for i = 0 to UBound(splitStr)
tmpStr = Trim(splitStr(i))
if len(tmpStr) > 0 then
if result = "" then
result = tmpStr
else
result = result & vbnewline & tmpstr
end if
end if

splitStr(i) = tmpStr
next
FindLabel = result
End Function

No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...