Select to view content in your preferred language

Allow moving features while prohibiting creating of new features?

661
6
05-06-2022 10:14 AM
Labels (2)
MaryDuBose
Regular Contributor

I have a feature class that's stored in an enterprise geodatabase (Microsoft SQL Server), and I'm setting up a map in ArcPro for users to edit this FC as well as some others. For this particular one, they need to be able to move the features, but they should not ever create new features. Is there a way to allow editing of a feature class where feature geometry can be edited, but at the same time prohibit creating new features (or just remove it from the Create Features template list somehow?) 

0 Kudos
6 Replies
Robert_LeClair
Esri Notable Contributor

Hmmm...interesting question.  Technically a Move operation is an edit so you really can't disable editing per se.  A few things that might work (but they are not bullet proof) are to go to the Project->Options->Editing and in the Session group, uncheck the box for "Make newly added layers editable by default" - this removes the feature templates from the Create Features pane but you can still move a feature.  If you incorporate this option in all of your analysts ArcGIS Pro application, then this would work BUT the analyst could always check the option to enable the functionality.  Other workflows is in the Contents Pane, click the List by Editing and uncheck all the layers.  This removes the feature templates from the Create Features pane as well.

0 Kudos
MaryDuBose
Regular Contributor

Thanks for the suggestions Robert! A colleague and I were testing this out and came across another method to accomplish this - by right-clicking on the layer in the Create Features panel, and clicking on Properties, it pulls up the Template Properties window for that layer. There, you can go to the Tools tab, and by unchecking all of the boxes it will remove that layer from the Create Features list.

0 Kudos
Robert_LeClair
Esri Notable Contributor

You're welcome!  That is true by going into Manage Templates, it will remove all the feature templates for that layer in that instance of ArcGIS Pro - another avenue to experiment with.

0 Kudos
RobertBorchert
Honored Contributor

When you publish do you uncheck Add, update, and delete features

 

RobertBorchert_0-1651862162193.png

 

0 Kudos
RhettZufelt
MVP Notable Contributor

Have not tried with versioned data (other than moving to base), but you can put a check constraint on it in  SQL server to not allow any OBJECTID's (or any auto generated field) larger than already exists.

 

USE [DatabaseName]
GO

ALTER TABLE TableName
ADD CONSTRAINT NoAdds CHECK (OBJECTID < 2266);

 

This lets me modify anything that is in the dataset, but can NOT add new rows with Arc (as it automagically assigns new OBJECTID).

However, it won't block/inform you until you try to save the add.  So, I set Pro editing options to Automatically save edits after Number of operations = 1.

This way, if they try to add a point, it will throw the error right away.

R_

0 Kudos
JohannesLindner
MVP Frequent Contributor

This is a good use case for Attribute Rules, assuming you don't have to use the feature class in ArcMap (because fc's with Attribute Rules are incompatible with ArcMap).

In your case, it's really simple:

  • Add a Constraint Attribute Rule to your feature class
  • set trigger to only "Insert" (and "Delete", if your users aren't allowed to delete features
  • just return false (reject the edit)

JohannesLindner_0-1652077617385.png

JohannesLindner_1-1652077697707.png

 


Have a great day!
Johannes