Hello - I am working to replace a predecessors work. He relied heavily on annotation feature classes, and I'd like to move to labeling on the fly. He has literally hundreds of annotation feature classes that he manually edits to match data in the tax lots. It's, well, interesting. I'd like to replicate his work with label classes that label on the fly and of course automatically adopt the data from the attribute table. Attached is a photo of 2 annotation feature classes that he has used on one tax lot. Is there an expression that can accomplish this? If I use vbNewLine for the Lot Number and the Acres, it puts the acres into the Lot Number shield and makes a giant oval, not what I want. Can't seem to find a successful approach online. My labels are NOT stacked in fitting strategy, using Maplex Label Engine, ArcGIS Pro 3.2.2.
Photo 1 is from annotation feature classes and what I am trying to replicate.
Photo 2 is as close as I've been able to come. I need to be able to stack my label classes.
Thanks in advance!
I'd have to dig into the guts of Label functions, but a top-of-my-head guess would be to leverage <PART> from the dynamic text.
I can't remember off-hand if you can do the enclosures inside <PART>, but I think you can?
Thanks, unfortunately I am unfamiliar with <PART>. I'm Googling, but can you give me some context?
My first label class for the lot # has a callout marker symbol and is simply: [MAP]
My second is for the acres and is simply: [AREA]
I need to be able to either stack the label classes or somehow differentiate them within the same label class. I'm going to try ChatGPT for a solution. If all that fails, I just abandon the marker callout and have text lines which are easy to stack.
Thanks!
In addition, for some reason, this code is NOT changing my LOT text to blue. Stumped.
Function FindLabel ( [LOT] )
FindLabel = "<font color='#1E90FF'>" & [LOT] & "</font>" & vbNewLine & [AREA]
End Function
I would use this syntax to change font color to blue using vbscript
Function FindLabel ( [LOT] )
FindLabel = "<CLR blue = '255'>" & [LOT] & "</CLR>" & vbNewLine & [AREA]
End Function
Hi, I'm sorry ArcGIS Pro labelling isn't working as expected. Are you using two different label classes?
Yeah, I have a few different label classes on the same feature layer.
Here are 2 method you can try:
1. Separate label classes
You can use 2 separate label classes - one for the lot number with the point callout and another for the Acres without a callout. Don't check on Never remove (place overlapping) so your labels don't overlap like in your example. As long as there's room, both labels will place inside the polygon near one-another, though not necessarily stacked directly on top of one-another. The arrangement of the labels inside the polygons will depend on the shape of each polygon along with any other label placement properties you have configured.
2. Single label class with Composite callout
If the Lot number and Area labels must be combined in one label, you could use a Composite callout using the PART text formatting tags. Here's an example of how that would look, including your interest in changing the color of the Lot number to blue:
Label expression:
Function FindLabel ( [LOT], [AREA] )
Dim label
Dim lotLabel
Dim color
color = "red='0' green='0' blue='0'"
If [LOT] > 103 Then
color = "red='0' green='0' blue='255'"
End If
lotLabel = "<CLR " & color & ">" & [LOT] & "</CLR>"
label = "<PART position='middle'>" & lotLabel & "</PART>"
label = label & "<PART position='bottom'>" & [AREA] & "</PART>"
FindLabel = label
End Function
Composite callout properties:
Result: