The WebFeatureLayer.SetModified method overrides the modification editing tracking value for an existing feature. ArcGIS for AutoCAD modification tracking automatically records when feature attributes or geometry of a non-new feature have been modified. TheWebFeatureLayer.PauseTracking and WebFeatureLayer.RestoreTracking methods can be used in a drawing session to pause and restore this tracking. This method can set the modification tracking value regardless of its current value or the modification tracking state. The modification value will be used to determine whether a feature will be updated during synchronization.
Declaration
public bool Esri.ArcGISForAutoCAD.WebFeatureLayer.SetModified(Document doc, string flName, ObjectId objId, bool isModified)
Parameters
| Type | Name | Description | Required |
|---|---|---|---|
Document | doc | The AutoCAD document to act on. | required |
string | flName | An existing web feature layer name in the drawing. | required |
ObjectId | objId | The AutoCAD ObjectId of the feature to set its modification tracking value. | required |
bool | isModified | Specifies whether the tracking value of an existing non-new feature is modified. Use true if it's modified; use false if it's not modified. | required |
Returns
| Type | Description |
|---|---|
bool | true if the modification tracking value was set successfully |
Remarks on error conditions
This method may throw an exception or return false or null if a parameter is invalid.
Example
Print the success of setting the modification tracking state of the selected feature in the UtilityPoles web feature layer to unmodified.// Initialize
var doc = Application.DocumentManager.MdiActiveDocument;
var flName = "UtilityPoles";
var objId = Esri.ArcGISForAutoCAD.FeatureLayer.SelectEntity(doc, flName);
// Set the feature as unmodified
var success = Esri.ArcGISForAutoCAD.WebFeatureLayer.SetModified(doc, flName, objId, false);
// Print the success
doc.Editor.WriteMessage(success.ToString());
/* Example output
True
*/
See also
WebFeatureLayer.PauseTracking—A .NET method that pauses the tracking of modification edits on web feature layer features.
WebFeatureLayer.RestoreTracking—A .NET method that restores the tracking of modification edits on web feature layer features.
FeatureLayer.SelectEntity—A .NET method that prompts the selection of one entity and returns its AutoCAD ObjectId.
esri_webFeatureLayer_setModified—An AutoLISP function that overrides the modification editing tracking value for an existing feature.