Skip To Content

BranchVersion.NamesAsync (.NET)

BranchVersion.NamesAsync 方法用于从服务器检索分支版本名称的集合。

声明

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

参数

类型名称描述必填

文档

doc

要进行操作的 AutoCAD 文档。

必填

string

flName

工程图中支持分支版本化的现有 web 要素图层名称。

必填

返回

类型描述

IEnumerable<string>

字符串形式的分支版本名称的集合。

错误条件备注

如果参数无效或者 web 要素图层不支持分支版本化,则此方法可能会抛出异常或者返回 null

示例

打印与 Distribution Web 要素图层关联的分支版本名称。

// 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
*/

另请参阅

WebFeatureLayer.Get - 此 .NET 方法以字典形式获取指定 web 要素图层的 web 要素图层属性。

esri_webfeaturelayer_branchNames - 此 AutoLISP 函数可从服务器检索分支版本名称的列表。