1

ArcMap 10.6

I have a Project point feature class with the location and name of each project. I want to make a Project layer containing (sub/child) group layers for each Project name. Then I can click individual locations on and off more easily than running selections.

Right now I can manually,

  1. Right click the data frame and make a new group layer named Projects in the data frame

  2. For each line the the Project point feature:

    2.1 Right click Project layer and create new Group Layer within, and rename this with the Project name

    2.2 Create a selection of that point in the Project feature class and move it into this correctly named new Group Layer.

Is there a faster way?

5
  • 1
    Yes, but it will require some python. How many layers are in the group? Instead of creating a selection layer it would be best to copy the layer and apply a definition query. Selection layers are based on an OID set, over time OIDs can become out of sync if the data source is updated, especially shapefiles though I have seen this happen with SDE data, between creating the maps and exporting the PDFs the feature class was updated with a newer version, making all the maps wrong and it wasn't picked up until the document was printed. – Michael Stimson Sep 2 '20 at 3:09
  • @Michael Stimson Than you. I have saved the data into shape files from the database so it will not be affected by updates. There are 70 odd project in the group. i am up to some python but do not have the time to play with the very round about ways I have seen in examples so far. The commands do not seem well made for manipulating dataframe layouts. – user24007 Sep 2 '20 at 4:32
  • 1
    This might be a bit left field but have you considered data driven pages? It might be a satisfactory alternative to lots of group layers, keeping your layout tidy. Shapefiles are the worst for static OID sets, if there is any edit the OIDs are no longer the same, it would be much better (safer) to use a definition query which data driven pages can update when changing from one project to another resources.arcgis.com/en/help/main/10.2/index.html#//… – Michael Stimson Sep 2 '20 at 5:18
  • @Son of a Beach Thanks. It might help, depending on how I set this out. Under spec machine for this job so I am looking for simple, low memory usage answers too. I think too many queries for display purposes is slowing me down too. – user24007 Sep 2 '20 at 6:17
  • @Michael Stimson Please add your suggestion as an Answer so I can give you the tick. – user24007 Sep 8 '20 at 4:38
1

Although the design of data driven pages was intended to create a series of maps spanning numerous sites the concept of page queries can be leveraged to only display the features that have a matching identifier to the index layer. The index layer needs to have one row for each unique identifier covering the extent of the project area, in this case I'd make a buffer, dissolving by project name, to ensure that the entire area of the project and its children are completely covered.

As I stated in the comments shapefiles are the worst to create a FID set which is how make layer from selected features operates. If the shapefile is edited in any way the FID order will be altered and you will end up with a different set of features in your selection layer. File/personal geodatabases have static OIDs (object ID is a similar concept to feature/row ID) which means the features ID will never change for the lifetime of the row so a FID set generated from geodatabase objects are more tolerant but still, creating a layer from selected features should not be relied upon as a permanent arrangement.

1

Could you use the Split by Attributes tool for this? Specify the ProjectName field as the tool's Split Field.

See: https://desktop.arcgis.com/en/arcmap/latest/tools/analysis-toolbox/split-by-attributes.htm

You could create a new workspace for the output, and when it has completed, add all feature classes in the workspace to the map (ie, one layer for each project).

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.