Skip To Content

BranchVersion.NamesAsync (.NET)

The BranchVersion.NamesAsync method retrieves a collection of branch version names from the server.

Declaration

public async Task<IEnumerable<string>> Esri.ArcGISForAutoCAD.BranchVersion.NamesAsync(Document doc, string flName)

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

Returns

TypeDescription

IEnumerable<string>

A collection of branch version names as strings.

Remarks on error conditions

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

Example

Print the branch version names associated with the Distribution web feature layer.

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

// Get the branch names
var branchNames = await Esri.ArcGISForAutoCAD.BranchVersion.NamesAsync(doc, "Distribution");

// Print the branch names
foreach (var branchName in branchNames)
{
  doc.Editor.WriteMessage("\n" + branchName);
}

/* Example output 
sde.DEFAULT
editor01.phase1
editor01.protectedVersion
portaladmin.myPublicBranch
*/

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_branchNames—An AutoLISP function that retrieves a list of branch version names from the server.