0

I am using ArcMap 10.5.1 and want to create a layer from a selection of another layer (Selection > Select by attributes..). This works fine and my new layer is displayed. Now I want to assign different colours to the different attributes of one feature class (Properties > Symbology). Clicking "Add All values" results in the correct number of attributes. However, once I have assigned colours and click "OK", ALL observations appear in the layer (i. e. also those that I didn't select in the other layer). How can I prevent this so that I really do only have my selected observations in the new layer?

  • You say "want to create a layer from a selection of another layer (Selection > Select by attributes..). This works fine and my new layer is displayed" but Selection > Select by attributes does not create a new layer, it creates a selection on an existing layer. – PolyGeo Aug 21 at 9:50
1

If you want to create a new layer based on a subset of an existing layer you need to export after doing your selection (right click on your selected layer then Data>Export Data... and choose export selected data) this will create a new layer with a copy of the selected data. in this case you end up with two copy of your data and any edit made in one copy will not be reflected on the other copy

If you want to display a subset of your layer for symbology purpose there are two possibility :

  • the first is to right click your layer after selecting then go to Selection>make layer with selected entity... , this will create a duplicate of your layer in the table of content that is filtered on your selection (this solution is not very good as there is no way to access or update the query used for selection, also if the data change this duplicate layer wont update to reflect the change)

  • The second and better way is to use a definition query (right click your layer>property and go to the defenition query tab) you will use the same query used for selection but this time it will filter your layer and only load the selected object. (this is a better way as you have the possibility to change the query and this filtered layer will always reflect any change made to the data)

    Be aware that these two possibility are not creating a new layer and that any edit are recorded in the original (whole layer) data.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.