Ask A Cartographer

Keeping labels on shapefiles

April 27 2010 | 0 comments
Categories: Labeling


I have created labels in a shapefile in the Expression...with a couple of the columns in the attribution being it's been separated with a "&vbnewline&"

My question is: Is there anyway to keep this expression as...if some other user added this shapefile to another MXD the labels would generate immediately without them putting the expression in again?


Mapping Center Answer:

If you save the shapefile as a Layer File or a Layer Package and someone adds that to their map document, the label expression will be preserved. 

You could also save the expression itself and it can be loaded for use with a different layer or map -- you would either have to change the fields that are referenced in the label expression or you would have to insure that the field names in the other shapefile or feature class are the same for the expression to be verified. To save the label expression:

  1. From the Label Expressions dialog, build and verify the expression.
  2. Click the Save... button and save the expression to a location on disk.

To load a label expression:

  1. From the Label Expressions dialog, click the Load... button and navigate to the location where the expression is saved on disk.
  2. Change any field names, if required, and then Verify the expression.

If you would like to post a comment, please login.

Contact Us | Legal | Privacy |