How to Save Label Classes in Layer Files?
I put this question on the following ESRI Forum thread:
and the reply that I had was that I should try asking a cartographer - so that is what I am doing:
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?
Mapping Center Answer:
Okay, so there are a bunch of things to address here:
- Saving a layer to a .lyr file does save the label classes... AND the SQL Queries.
- 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.
- 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.
- 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.
If you would like to post a comment, please login.