Edit Sets

AutoCAD Map 3D Geospatial Platform API

 
Edit Sets
 
 
 

There are two different modes for updates to features:

  • Edit set
  • Direct update
NoteSome FDO providers, including the file-based providers SDF, SHP, and raster, do not support edit set mode.

Updates made using edit set mode are made to the working copy inside the AutoCAD Map 3D application, but are not committed to the feature source. Edits made using direct update are changed in the feature source immediately.

There are two methods for updating features:

  • AcMapLayer.UpdateFeatures()
  • MgFeatureService.UpdateFeatures()

AcMapLayer.UpdateFeatures() works directly with features in the map layer. This is the preferred method when working in edit set mode.

MgFeatureService.UpdateFeatures() updates the features in the feature source. This method can be used when the feature source is not being displayed in a layer. For example, an AutoCAD Map 3D application could create an SDF file containing result data without ever having to display the data.

To set the update mode for a layer, call AcMapLayer.SetEditSetMode().

To commit changes made in edit set mode, call AcMapLayer.SaveFeatureChanges(). This updates the feature source. To discard the changes, call AcMapLayer.DiscardFeatureChanges().