Skip To Content

WebFeatureLayer.SupportsAttachmentsAsync (.NET)

WebFeatureLayer.SupportsAttachmentsAsync 方法用于验证 web 要素图层是否支持附件,如果支持,则返回 true;否则,将返回 false

声明

public async Task<bool> Esri.ArcGISForAutoCAD.WebFeatureLayer.SupportsAttachmentsAsync(Document doc, string flName)

参数

类型名称描述必填

文档

doc

要进行操作的 AutoCAD 文档。

必填

string

flName

工程图中现有的 web 要素图层名称。

必填

返回

类型描述

bool

如果 web 要素图层支持附件,则为 true;否则,将为 false

错误条件备注

如果参数无效,则此方法可能会抛出异常或者返回 falsenull

示例

打印 Damage_to_Commercial_Buildings web 要素图层是否支持附件。

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

// Determine whether the layer supports attachments
var supportsAttachments = await Esri.ArcGISForAutoCAD.WebFeatureLayer.SupportsAttachmentsAsync(doc, "Damage_to_Commercial_Buildings");

// Print whether the layer supports attachments
doc.Editor.WriteMessage("Supports attachments: " + supportsAttachments);

/* Example output
Supports attachments: True
*/

另请参阅

FeatureAttachment.AddAsync - 此 .NET 方法用于将文件附加到支持附件的 web 要素图层的要素。

esri_webfeaturelayer_supportsAttachment - 此 AutoLISP 函数用于验证 web 要素图层是否支持附件,如果支持,则返回 true 的列表;否则,将返回 false 的列表。