ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / FeatureSceneLayer Class / IsEditable Property
Example

In This Topic
    IsEditable Property (FeatureSceneLayer)
    In This Topic
    Gets whether the feature scene layer is editable.
    Syntax
    Public ReadOnly Property IsEditable As Boolean
    public bool IsEditable {get;}
    Remarks
    Returns true only when (a) you have data source level permission to edit and (b) it is made editable on the map.

    Use the extension method "CanEditData" to determine if the data represented by a MapMember can be edited independently of the TOC Editable state.

    Example
    Determine if a FeatureSceneLayer supports editing
    {
      featSceneLayer = MapView.Active.Map.GetLayersAsFlattenedList()
                         .OfType<FeatureSceneLayer>().FirstOrDefault();
      if (!featSceneLayer.HasAssociatedFeatureService ||
          !featSceneLayer.IsEditable)
      {
        //not supported - exit the function
      }
      //TODO continue editing here...
    }
    Create a new Point feature in FeatureSceneLayer
    {
      //must support editing!
      if (!featSceneLayer.HasAssociatedFeatureService ||
          !featSceneLayer.IsEditable)
      {
        //not supported - exit the function
      }
    
      //Check geometry type...must be point in this example
      var editOp = new EditOperation()
      {
        Name = "Create new 3d point feature",
        SelectNewFeatures = true
      };
    
      var attributes = new Dictionary<string, object>();
      //mapPoint contains the new 3d point location
      attributes.Add("SHAPE", mapPoint);
      attributes.Add("TreeID", "1");
      editOp.Create(featSceneLayer, attributes);
      editOp.ExecuteAsync();
    }
    Delete all the selected features in FeatureSceneLayer
    {
      if (!featSceneLayer.HasAssociatedFeatureService ||
        !featSceneLayer.IsEditable)
        return;
      // Note: call within QueuedTask.Run()
      {
        var delOp = new EditOperation()
        {
          Name = "Delete selected features"
        };
        //Assuming we have a selection on the layer...
        delOp.Delete(featSceneLayer, featSceneLayer.GetSelection().GetObjectIDs());
        delOp.ExecuteAsync();
      }
    }
    Edit the attributes of a FeatureSceneLayer
    {
      //must support editing!
      if (!featSceneLayer.HasAssociatedFeatureService ||
          !featSceneLayer.IsEditable)
        return;
    
      // Note: call within QueuedTask.Run()
      {
        var editOp = new EditOperation()
        {
          Name = "Edit FeatureSceneLayer Attributes",
          SelectModifiedFeatures = true
        };
        //make an inspector
        var inspector = new Inspector();
        //get the attributes for the specified oid
        inspector.Load(featSceneLayer, oid);
        inspector["PermitNotes"] = "test";//modify
        editOp.Modify(inspector);
        editOp.Execute();//synchronous flavor
      }
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also