Skip To Content

BranchVersion.GetAsync (.NET)

The BranchVersion.GetAsync method gets the web feature layer branch version information for the specified web feature layer as a dictionary.

Declaration

public async Task<Dictionary<string, object>> Esri.ArcGISForAutoCAD.BranchVersion.GetAsync(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

Dictionary<string, object>

A dictionary of web feature layer branch version properties. The keys and values of the dictionary are described in the table below.

KeyTypeValue

"NAME"

string

The name of the branch version.

"DESCRIPTION"

string

Information provided by the creator of the branch version.

"ACCESS"

string

The access level of the branch version ("Public", "Private", or "Protected").

"HAS_CONFLICTS"

bool

Specifies whether the branch has a state of edit conflicts.

"IS_LOCKED"

bool

Specifies whether the branch version state is locked.

"IS_BEING_EDITED"

bool

Specifies whether the features of the branch are being edited.

"IS_BEING_READ"

bool

Specifies whether the features of the branch are being read.

"LOCK_OWNER"

string

The name of the user with a branch version lock on the web feature layer.

"UNAVAILABLE_FOR_EDIT"

bool

Specifies whether the branch is unavailable for editing.

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 success of retrieving the branch version properties for the editor01.phase1 branch of the Distribution web feature layer.

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

// Get the branch version properties
var branchProperties = await Esri.ArcGISForAutoCAD.BranchVersion.GetAsync(doc, "Distribution", "editor01.phase1"); 

// Print the properties
foreach (var property in branchProperties)
{
  doc.Editor.WriteMessage("\n{0}: {1}", property.Key, property.Value);
}

/* Example output 
NAME: editor01.phase1
DESCRIPTION: Proposed changes
ACCESS: Private
HAS_CONFLICTS: False
IS_LOCKED: False
IS_BEING_EDITED: False
IS_BEING_READ: False
LOCK_OWNER:
UNAVAILABLE_FOR_EDIT: False
*/

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_branchInfo—An AutoLISP function that gets the web feature layer branch version information for the specified web feature layer as an associated list.