Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using the FocusMap.FeatureSelection to return all the currently selected features.

I want to process only the currently editable features and leave the remainder alone.

How can I quickly programmatically tell which features are editable?

I know of the IEditLayers.IsEditable method, but think that might be a little heavy handed to try and map from a feature back to the featurelayer and then test that for all selected features.

Is there another way, or is this all I have available to me?

share|improve this question
up vote 6 down vote accepted

Look at the EditWorkspace from the Editor extension. Compare the pointer from that workspace to the pointer of workspace of the FeatureLayer::FeatureClass. Remember that workspaces are always accesible from the IDataset interface (supported by the featureclass). If they are the same, then that workspace is being edited.

Another option is to simply look at the workspace of the layer's featureclass and use the IWorkspaceEdit interface to figure out if the IsBeingEdited property returns true

share|improve this answer
Thank you. So, what I did was QI from feature.Class to IFeatureClass to IDataset. Then IDataset.Workspace to IEditWorkspace and then tested is IsBeingEdited before processing the feature. – Troy Schmidt Jun 2 '11 at 18:04

IEditor.EditSelection will return all the currently selected features that belong to editable layers.

share|improve this answer

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

Yes but I have the feature as the result of a cursor or other process and needed to know if I could edit it or not. I guess I could compare the lists to see if it is found in EditSelection, but being as that isn't an easily searchable grouping I found the QI'ing above to work well. – Troy Schmidt Jul 28 '11 at 14:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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