Skip To Content

BranchVersion.DeleteAsync (.NET)

The BranchVersion.DeleteAsync method deletes a branch version from the specified web feature layer.

Declaration

public async Task<bool> Esri.ArcGISForAutoCAD.BranchVersion.DeleteAsync(Document doc, string flName, string branchName)

Parameters

TypeNameDescriptionRequired

Document

doc

The AutoCAD document to act on.

required

string

flName

An existing web feature layer name in the drawing that supports branch versioning.

required

string

branchName

A branch version name associated with the web feature layer.

required

Returns

TypeDescription

bool

true if the branch was deleted successfully

Remarks on error conditions

This method may throw an exception or return false or null if a parameter is invalid or the web feature layer does not support branch versioning.

Example

Print the success of removing the existing editor01.phase1 branch version from the Distribution web feature layer in the drawing.

// Initialize
var doc = Application.DocumentManager.MdiActiveDocument;

// Delete the branch
var success = await Esri.ArcGISForAutoCAD.BranchVersion.DeleteAsync(doc, "Distribution", "editor01.phase1");

// Print the success
doc.Editor.WriteMessage(success.ToString());

/* Example output 
True
*/

See also

WebFeatureLayer.Get—A .NET method that gets the web feature layer properties for the specified web feature layer as a dictionary.

esri_webfeaturelayer_deleteBranch—An AutoLISP function that deletes the specified web feature layer branch.