ArcMap

How to Save Label Classes in Layer Files?

Question: I put this question on the following ESRI Forum thread:

http://forums.esri.com/Thread.asp?c=93&f=986&t=146650

and the reply that I had was that I should try asking a cartographer – so that is what I am doing:

ORIGINAL QUESTION

I am not working with Geology data, however, I came across this thread when I was trying to find a way of saving Label Classes within Layer Files or in some way so that they could (along with their Label Expressions and Styles) be re applied to other Feature Classes.

I am using ArcGIS v9.3 & working mainly with personal & file geodatabases though occassionaly shape files & I wondered if there is any non programming way of doing this?

I have tried Willy Lynch’s script (many thanks) but because the Layer Files I have don’t seem to have the Label Classes stored within them – I think because they have since been converted to Annotation it does not seem to solve my issues completely.

I am also curious if anyone has worked out how to re apply Layer Files saved from Annotation Feature Classes to new Labels or directly to new Annotation as I can’t seem to find a way i.e. there is no “import” as there is for Feature Symbology?

With thanks,

Answer: Okay, so there are a bunch of things to address here:

  1. Saving a layer to a .lyr file does save the label classes… AND the SQL Queries.
  2. Converting labels to annotation just turns off labeling–it does not changing your layer’s or label classes settings–if you turn off the anno and turn labeling on for your layer(s) you will get the correct result.
  3. You can save your labeling rules to a style by clicking the Label Styles button while viewing your label class in the label manager.  That will show the Label Style Selector, and you can click the Save button to save your label style (Expression, Rules, & Symbol) to a style–this will not preserve your SQL Query.  Use the Label Styles button to retrieve your saved element to be used on another layer.
  4. All that said, the easiest way to reuse the label classes from one layer on another layer is to copy the layer and change the data source of the copied layer.  Of course this will only work if your second data source has the same attributes as the first layer’s data source.

Formerly a Mapping Center Ask a Cartographer  Q & A.

About the author

Dr. Aileen Buckley has been making maps since she was an undergraduate student. She has a Bachelors in Geography and Spanish from Valparaiso University, a Masters in Geography from Indiana University, and a Ph.D. in Geography from Oregon State University. She is a senior product engineer on the Living Atlas team, and her work focuses on determining and sharing best practices for mapping and analysis with modern GIS. She publishes and presents world-wide on many aspects of mapping and GIS. She is a co-author of Map Use: Reading, Analysis, Interpretation, and she is a co-editor for the Atlas of Oregon. Aileen is a former president of CaGIS (the U.S. cartographic association) and is actively involved with the International Cartographic Association in which she is the lead delegate for the United States.

Connect:

Next Article

Pop-ups: the essentials

Read this article