The WebFeatureLayer.HasEdits method returns true if the web feature layer contains edits that have not yet been committed to the source feature service. Use this method to determine whether a layer has unsynchronized edits.
Declaration
public bool Esri.ArcGISForAutoCAD.WebFeatureLayer.HasEdits(Document doc, string flName)
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 |
Returns
| Type | Description |
|---|---|
bool | Returnstrue if the web feature layer has unsynchronized edits. Returns false if the web feature layer does not have unsynchronized edits. |
Remarks on error conditions
This method may throw an exception or return false or null if a parameter is invalid.
Example
Print whether the Shelters web feature layer has any uncommitted edits.// Initialize
Document doc = Application.DocumentManager.MdiActiveDocument;
// Determine if the web feature layer has edits
var hasEdits = Esri.ArcGISForAutoCAD.WebFeatureLayer.HasEdits(doc, "Shelters");
// Print whether the web feature layer has edits
doc.Editor.WriteMessage("Has edits: " + hasEdits.ToString());
/* Example output
Has edits: True
*/
See also
WebFeatureLayer.SynchronizeAsync—A .NET method that allows you to programmatically synchronize changes.
WebFeatureLayer.EditCounts—A .NET method that returns the number of pending changes to the specified web feature layer.
WebFeatureLayer.DiscardEditsAsync—A .NET method that redraws the web feature layer from the server and discards any unsynchronized edits in the drawing for the specified layer.
esri_webfeaturelayer_hasedits—An AutoLISP function that returns true if the web feature layer contains edits that have not yet been committed to the source feature service.