I want to label the features of feature layers in my TOC. This has to be using the CommandBar and CommandItem. How should I go about it? Some heads up will be appreciated
Thanks
Thank you for the quick response @Freddie. I was able to complete the action using the DisplayAnnotation method, but I wanted to follow the commandItem methods for this task.
I will try out the code in the link you mentioned. Thanks again!
If you already have a tool on a toolbar that displays the labels you would use the following code to find the command and just call ICommandItem.Execute to execute the command.
desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#2ffb7cab-820e-4581-970f-49c887108f87.htm
I don't recall any out-of-the-box commands that display labels. In my code I display the labels using IGeoFeatureLayer.DisplayAnnotation. This is mentioned starting on the following page.
Working with labels and annotation (ArcObjects)
http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/#/Working_with_labels_and_annotation/0001000000nt000000/
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.