Get label of a feature

772
4
09-11-2017 10:19 PM
MaxMax2
Occasional Contributor II

ArcGIS Pro allows to enable labeling for a feature layer where each feature will be labeled with value of some field or with result of some expression. Is it possible to get text of label for a Feature with ArcGIS Pro SDK?

Tags (2)
0 Kudos
4 Replies
CraigWilliams
Esri Contributor

We do not currently have an API to retrieve the the label per feature. Out of curiosity and to help us plan, what is the workflow in which this is needed?

0 Kudos
MaxMax2
Occasional Contributor II

Hi Craig,

We have a feature class A and feature class B. If some features from B are inside of a feature from A we want to transfer labels from those B-features to some field of containing A-feature. Currently we transfer values of display field, but we want to change algorithm a bit: 1) transfer label; 2) if there is no label for a feature then take display field value.

I hope you will add this functionality to Pro SDK since ArcObjects has it.

Max

IKaiser
New Contributor

Hi Craig,

We also need this functionality to extract data from ArcPro.

Irina

0 Kudos
SashiRekha
New Contributor II

Hi @CraigWilliams ,

Does parsing and retrieving the label expression result available in ArcGIS Pro SDK v2.8? 

We are working with Feature-Linked Annotations using ArcGIS Pro SDK 2.8 and .NET Framework. Here the labeling is defined by an arcade expression (VBScript) and I am able to access the labelclass expression along with expression engine. Now I'm looking for a parser to retrieve the expression result in the Pro SDK.

This similar functionality is available in ArcObjects where we can retrieve the expression results using parser with the help of "IAnnotationExpressionParser". Could you please provide your valuable inputs/ ideas.

Thank you.

0 Kudos