Select to view content in your preferred language

Creating (and using) a Feature Layer Template

333
7
12-11-2024 08:12 PM
DavidGray1
Regular Contributor

Hi Community;   I have been studying the documentation in Pro help (3.2.2) for creating a Feature Layer Template. Pretty confusing stuff. I appear to have successfully created a named template based upon an existing polyline based feature layer. It took awhile to find it - the instructions were rather obtuse, but I think I have found it. Now I would like to apply this template to create a new layer in a separate map (same Project) that has the same properties and fields for creating features, but is not linked to the original feature layer it was created from. Any suggestions on how to do this would be appreciated.   Dave

0 Kudos
7 Replies
LindaGreen
Occasional Contributor

There are two parts to this:

1) setting up the new dataset that has the fields you need, and 

2) making sure the new dataset uses the feature creation template you already set up

For part 1, assuming the new layer dataset you want to create in the separate map has the same fields as the layer you already have set up:

If you're working with shapefiles:

  1. Select one record in the table in the old dataset and export it to the location where you want the new dataset stored (selecting one record isn't strictly necessary, but if you have a large dataset, it can save time by not processing the additional records you don't need)
  2. delete the single record in the new dataset to make the new dataset blank

If you're working with geodatabase feature classes: 

  1. Right-click in the geodatabase where you want the new dataset to live. Select "new feature class"
  2. Work through the create feature class wizard. On page 2/6, there's a button that lets you import fields and field settings from another feature class, and in this case you'd choose to import fields from the old dataset

Either way, you should now have a new blank dataset that matches your old dataset.

For part 2:

If you're working with a newer version of Pro (I think it's 3.2 and up, but don't quote me on that):

  1. Add the new (blank) dataset to your separate map
  2. Go back to the original map and right click > copy on the old dataset (the one with the feature creation template you set up)
  3. In the separate map, right click on the new dataset and choose "Paste Properties." This will copy over almost all of the dataset properties, including the feature creation templates.

If you're working with a version of Pro that doesn't let you Paste Properties:

  1. Copy the old dataset in the original map (the dataset with the feature creation template set up)
  2. Paste the old dataset into the new map
  3. Open the layer properties for the old dataset in the new map, and change the data source to the new dataset

Fundamentally, the software isn't smart enough to create a whole new dataset based on an existing feature creation template. As an analogy, if your data is like a form, the feature creation template is sort of like a set of pre-filled values for that form. You have to have the structure of the form (the new dataset) before you can tell it what values to pre-fill (the feature creation template). So by creating the new dataset first, you give the feature creation template a structure to slot into.

I don't know what's in your feature creation template, but you may be able to accomplish some of the same things by setting up domains and default values in a feature class in a geodatabase. 

0 Kudos
DavidGray1
Regular Contributor

Hi Linda; Thanks for the comprehensive and well written reply. I do work from a geodatabase and create individual feature layers via geoprocessing tools. I have adopted this approach in order to make sure that the analogous and basically similar feature layer on each map in the Project is the same but not linked together. Setting them up as essentially identical allows the straightforward transfer (via append, another geoprocessing tool) - if desired - of a feature in a row to another map without affecting the source feature layer.

I was looking for a possible way of creating the identical feature layer for separate maps without going through the create features layer for each one. But it sounds like other methods are just as convoluted?

Again; Thanks for the reply.  Dave

0 Kudos
Faiez
by
Frequent Contributor

Simple steps:

1.Save your project as a Project Template via Share option

2. Back to your Project

3. Project> New>Start with another Template

4. Open the Project that you have saved online in Step 1.

5. Now you will see two database like this

Faiez_0-1734044677569.png

6. Add a new Map

7. Create Feature Dataset and Feature Class as you wish and enjoy.

Faiez_1-1734045307937.png

Best,

Faiez

0 Kudos
DavidGray1
Regular Contributor

Thanks to everyone that contributed suggestions to this post. As usual, I got an inquiry from ESRI asking if I got an answer I needed. I would say yes, a number of answers, but not necessarily a solution which ESRI likes to have it end up as. Typically, in Pro there are multiple ways to arrive at a similar output. In this case, they appear to be just as convoluted as the way I have been doing it. I was looking for a simpler more elegant way of handling the process and was hoping maybe there was a relevant command buried in Pro somewhere. There often is. But perhaps not this time. However, the input and suggestions have been educational and well worth the time for anyone interested in this topic to read through.   Dave  

0 Kudos
Scott_Harris
Esri Regular Contributor

@DavidGray1 Can you share a link to the documentation page that you followed? It's possible that you are referring to editing templates but when you say "apply this template to create a new layer in a separate map" it sounds like you are wanting to create layers and not features. Editing templates are for creating features. I'm not aware of the concept of a layer template but that doesn't mean it doesn't exist in some form or another 🙂

0 Kudos
DavidGray1
Regular Contributor

Hi Scott;  The link to the documentation I was looking at is here:

https://pro.arcgis.com/en/pro-app/3.2/help/editing/create-a-feature-template.htm

Note that it is for 3.2 as 3.4 differs slightly. Also this is the "Create a feature template link that is under GEODATA. There is another one under that is under MAPPING and appears to be more applicable to military applications. The one that I was looking at is the former.

I am looking at creating another layer that has the same structure as the one used to create the template but it is a layer for a defined feature class. Hence the term feature layer. Maybe the overlapping word usage is part of the problem?   Thanks;   Dave

 

0 Kudos
Scott_Harris
Esri Regular Contributor

@DavidGray1 

Okay, so the doc you initially followed is actually for creating a feature template for use while creating a feature while editing- not a layer or a feature class. The doc in 3.4 refers to them as "editing templates" because that is the term we want to use going forward since it's easier to distinguish what they are used for: they are used while editing and can be found on the Edit ribbon (specifically within the Create Features/ Manage Templates panes).

You can actually copy editing templates to a different map in the same project. I assume you are using 3.2 so here is the documentation link for that https://pro.arcgis.com/en/pro-app/3.2/help/editing/copy-feature-templates.htm

One thing to note about that workflow: the layers will need to have the same name in order to copy them to the new map; however, they can reference different feature classes and even different workspaces (geodatabases) as long as the geometry type matches (points, lines, polygons, etc).

I'm not aware of any functionality that allows you to create a template of an existing layer - beside the workflow that @LindaGreen has outlined in the response above.

Maybe this info will help!

-Scott

0 Kudos