<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Abbreviate labels based off feature size in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/abbreviate-labels-based-off-feature-size/m-p/1357014#M75935</link>
    <description>&lt;P&gt;Turn on &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/mapping/text/abbreviate-and-truncate-labels.htm" target="_blank" rel="noopener"&gt;abbreviation&lt;/A&gt; in the Maplex label engine and use an alternate expression.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JesseWickizer_1-1701800056436.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88088iE1854BDA34BF8A92/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JesseWickizer_1-1701800056436.png" alt="JesseWickizer_1-1701800056436.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here you can use Arcade to only display the 1st letter of the first name if the label doesn't fit in the available space. This Arcade expression labels with the ID field, the first character of the FirstName field, and the LastName field:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;$feature.ID + " " + $feature.FirstName[0] + " " + $feature.LastName&lt;/LI-CODE&gt;&lt;P&gt;Using this approach yields the following results when this abbreviation is used:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;There is room for the &lt;EM&gt;6 LeBron James&lt;/EM&gt; label to fit so abbreviation is not used.&lt;/LI&gt;&lt;LI&gt;The &lt;EM&gt;23 Michael Jordan&lt;/EM&gt; label does not fit so it is abbreviated to &lt;EM&gt;23 M Jordan&lt;/EM&gt;.&lt;/LI&gt;&lt;LI&gt;Even with abbreviation, &lt;EM&gt;34 Giannis Antetokounmpo&lt;/EM&gt; does not fit so the label cannot be placed (the &lt;A href="https://pro.arcgis.com/en/pro-app/3.1/help/mapping/text/labeling-basics.htm#ESRI_SECTION1_522B37C81897490682081B1B9AACF896" target="_blank" rel="noopener"&gt;"View Unplaced" setting&lt;/A&gt; is turned on to draw unplaced labels in red).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JesseWickizer_0-1701799551179.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88076i6850E8281FC32395/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JesseWickizer_0-1701799551179.png" alt="JesseWickizer_0-1701799551179.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Dec 2023 18:17:08 GMT</pubDate>
    <dc:creator>JesseWickizer</dc:creator>
    <dc:date>2023-12-05T18:17:08Z</dc:date>
    <item>
      <title>Abbreviate labels based off feature size</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/abbreviate-labels-based-off-feature-size/m-p/1355652#M75760</link>
      <description>&lt;P&gt;Hello!&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a question about labels based off feature size, using Arcade.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am labeling geometries with IDs, first and last names, but due to&amp;nbsp;various sizing, the names do not always fit well. What I want to do is&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Always label the geometry with the ID&lt;/LI&gt;&lt;LI&gt;If the geometry is too small, abbreviate the first name to the first letter.&lt;/LI&gt;&lt;LI&gt;Always label last name&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Is there an arcade expression that would allow for abbreviation on many unique variables while testing against geometry size?&lt;/P&gt;&lt;P&gt;Any help is appreciated!&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 14:11:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/abbreviate-labels-based-off-feature-size/m-p/1355652#M75760</guid>
      <dc:creator>leahmaps</dc:creator>
      <dc:date>2023-12-01T14:11:18Z</dc:date>
    </item>
    <item>
      <title>Re: Abbreviate labels based off feature size</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/abbreviate-labels-based-off-feature-size/m-p/1355659#M75762</link>
      <description>&lt;P&gt;Are you married to Arcade in this scenario? You could just have a couple different label classes and use the SQL query to set restrictions on each class based on feature size. It wouldn't be perfect because the actual&amp;nbsp;&lt;EM&gt;shape&lt;/EM&gt; of your shapes will affect whether or not a label fits, but it would get you close.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 14:21:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/abbreviate-labels-based-off-feature-size/m-p/1355659#M75762</guid>
      <dc:creator>ZachBodenner</dc:creator>
      <dc:date>2023-12-01T14:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: Abbreviate labels based off feature size</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/abbreviate-labels-based-off-feature-size/m-p/1355679#M75768</link>
      <description>&lt;P&gt;Not necessarily, but I already have an arcade expression to remove some labels but leave the ID. There is also the case of having a lot of different geometries at different scales. In this case, I am doing a map series which changes scale on every page (sadly) so I am just trying to find the best way to go about this.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Dec 2023 14:43:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/abbreviate-labels-based-off-feature-size/m-p/1355679#M75768</guid>
      <dc:creator>leahmaps</dc:creator>
      <dc:date>2023-12-01T14:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Abbreviate labels based off feature size</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/abbreviate-labels-based-off-feature-size/m-p/1357014#M75935</link>
      <description>&lt;P&gt;Turn on &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/mapping/text/abbreviate-and-truncate-labels.htm" target="_blank" rel="noopener"&gt;abbreviation&lt;/A&gt; in the Maplex label engine and use an alternate expression.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JesseWickizer_1-1701800056436.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88088iE1854BDA34BF8A92/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JesseWickizer_1-1701800056436.png" alt="JesseWickizer_1-1701800056436.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here you can use Arcade to only display the 1st letter of the first name if the label doesn't fit in the available space. This Arcade expression labels with the ID field, the first character of the FirstName field, and the LastName field:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;$feature.ID + " " + $feature.FirstName[0] + " " + $feature.LastName&lt;/LI-CODE&gt;&lt;P&gt;Using this approach yields the following results when this abbreviation is used:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;There is room for the &lt;EM&gt;6 LeBron James&lt;/EM&gt; label to fit so abbreviation is not used.&lt;/LI&gt;&lt;LI&gt;The &lt;EM&gt;23 Michael Jordan&lt;/EM&gt; label does not fit so it is abbreviated to &lt;EM&gt;23 M Jordan&lt;/EM&gt;.&lt;/LI&gt;&lt;LI&gt;Even with abbreviation, &lt;EM&gt;34 Giannis Antetokounmpo&lt;/EM&gt; does not fit so the label cannot be placed (the &lt;A href="https://pro.arcgis.com/en/pro-app/3.1/help/mapping/text/labeling-basics.htm#ESRI_SECTION1_522B37C81897490682081B1B9AACF896" target="_blank" rel="noopener"&gt;"View Unplaced" setting&lt;/A&gt; is turned on to draw unplaced labels in red).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JesseWickizer_0-1701799551179.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/88076i6850E8281FC32395/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JesseWickizer_0-1701799551179.png" alt="JesseWickizer_0-1701799551179.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2023 18:17:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/abbreviate-labels-based-off-feature-size/m-p/1357014#M75935</guid>
      <dc:creator>JesseWickizer</dc:creator>
      <dc:date>2023-12-05T18:17:08Z</dc:date>
    </item>
    <item>
      <title>Re: Abbreviate labels based off feature size</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/abbreviate-labels-based-off-feature-size/m-p/1366801#M76991</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;Just getting back to this. For the most part, it worked but there are still some labels that should be abbreviated that are not.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Divided row did not abbreviate" style="width: 338px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/90665i2253587486FACC30/image-size/medium?v=v2&amp;amp;px=400" role="button" title="leahmaps_1-1704467239764.png" alt="Divided row did not abbreviate" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Divided row did not abbreviate&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I attached one sample of areas that are not abbreviated. As you can see, the top box, 11-H-04-0 did abbreviate the first name due to size. The boxes below it, although the names and ID do not fit, did not abbreviate. Because of this, they are overlapping and not readable.&amp;nbsp;&lt;/P&gt;&lt;P&gt;While most of the areas are fine, there are still some instances where this is happening. Any idea of how to force these to abbreviate?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 15:09:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/abbreviate-labels-based-off-feature-size/m-p/1366801#M76991</guid>
      <dc:creator>leahmaps</dc:creator>
      <dc:date>2024-01-05T15:09:44Z</dc:date>
    </item>
    <item>
      <title>Re: Abbreviate labels based off feature size</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/abbreviate-labels-based-off-feature-size/m-p/1367027#M77039</link>
      <description>&lt;P&gt;I have some questions that might help identify why these aren't abbreviating.&lt;BR /&gt;Are all labels in this example from the same label class?&lt;BR /&gt;What is your label expression and what is the abbreviation alternate expression?&lt;BR /&gt;What version of Pro are you using?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 22:13:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/abbreviate-labels-based-off-feature-size/m-p/1367027#M77039</guid>
      <dc:creator>JesseWickizer</dc:creator>
      <dc:date>2024-01-05T22:13:29Z</dc:date>
    </item>
    <item>
      <title>Re: Abbreviate labels based off feature size</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/abbreviate-labels-based-off-feature-size/m-p/1367308#M77080</link>
      <description>&lt;P&gt;Hello Jesse, here are the answers!&lt;/P&gt;&lt;P&gt;- Yes, all labels in this map are from the same feature class and label class&lt;/P&gt;&lt;P&gt;- Here is the label expression I am using (written in Arcade)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;var lotID = $feature.CemID
var fName = IIf($feature.OwnFirst != 'City', $feature.OwnFirst, '')
var lName = IIf($feature.OwnLast != 'City Hold', $feature.OwnLast, '')

return lotID + TextFormatting.NewLine + "&amp;lt;FNT name = 'Calibri' style = 'Regular' size = '4'&amp;gt;" + Replace(fname, '&amp;amp;', '&amp;amp;amp;') + ' ' + lName + "&amp;lt;/FNT&amp;gt;"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- And the Abbreviation Strategy I am using (also in Arcade)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;$feature.CemID + TextFormatting.NewLine + $feature.OwnFirst[0] + " " + $feature.OwnLast&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- My version of Pro is 3.2.0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for any help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(editing this after my initial post)&lt;/P&gt;&lt;P&gt;Sometimes it works, sometimes it doesn't for the smaller features, here is an example the abbreviation strategy working as expected when everything doesn't fit.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="leahmaps_0-1704720384660.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/90821iAFBA662BD9B8350C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="leahmaps_0-1704720384660.png" alt="leahmaps_0-1704720384660.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2024 19:17:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/abbreviate-labels-based-off-feature-size/m-p/1367308#M77080</guid>
      <dc:creator>leahmaps</dc:creator>
      <dc:date>2024-01-22T19:17:28Z</dc:date>
    </item>
    <item>
      <title>Re: Abbreviate labels based off feature size</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/abbreviate-labels-based-off-feature-size/m-p/1373121#M77738</link>
      <description>&lt;P&gt;Interesting new thing as of today&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/559219"&gt;@JesseWickizer&lt;/a&gt;. Now, when there is a name of City City hold, it is ignoring the IIf statement and still abbreviating them to "C City Hold" I am not sure if it is something coming from the label or abbreviation, but it now acts weird!&lt;/P&gt;</description>
      <pubDate>Mon, 22 Jan 2024 19:17:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/abbreviate-labels-based-off-feature-size/m-p/1373121#M77738</guid>
      <dc:creator>leahmaps</dc:creator>
      <dc:date>2024-01-22T19:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: Abbreviate labels based off feature size</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/abbreviate-labels-based-off-feature-size/m-p/1391879#M79894</link>
      <description>&lt;P&gt;You should put the same checks for &lt;FONT face="courier new,courier"&gt;$feature.OwnFirst != 'City'&lt;/FONT&gt; and&amp;nbsp;&lt;FONT face="courier new,courier"&gt;$feature.OwnLast != 'City Hold'&lt;/FONT&gt; in the alternate expression. For example:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var lotID = $feature.CemID
var fName = IIf(Lower($feature.OwnFirst) != 'city', $feature.OwnFirst, '')
var lName = IIf(Lower($feature.OwnLast) != 'city hold', $feature.OwnLast, '')

var label = lotID;
if (!IsEmpty(fName) &amp;amp;&amp;amp; !IsEmpty(lName)){
  label += TextFormatting.NewLine;
  label += "&amp;lt;FNT name = 'Calibri' style = 'Regular' size = '4'&amp;gt;";
  if (!IsEmpty($feature.OwnFirst)) {
    label += $feature.OwnFirst[0] + " ";
  }
  if (!IsEmpty($feature.OwnLast)) {
    label += $feature.OwnLast;
  }
  label += "&amp;lt;/FNT&amp;gt;";
}
return label;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 15:23:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/abbreviate-labels-based-off-feature-size/m-p/1391879#M79894</guid>
      <dc:creator>JesseWickizer</dc:creator>
      <dc:date>2024-03-06T15:23:57Z</dc:date>
    </item>
  </channel>
</rss>

