The WebFeatureLayer.SupportsAttachmentsAsync method verifies whether a web feature layer supports attachments by returning true if it does or false if it does not.
Declaration
public async Task<bool> Esri.ArcGISForAutoCAD.WebFeatureLayer.SupportsAttachmentsAsync(Document doc, string flName)
Parameters
| Type | Name | Description | Required |
|---|---|---|---|
Document | doc | The AutoCAD document to act on. | required |
string | flName | An existing web feature layer name in the drawing. | required |
Returns
| Type | Description |
|---|---|
bool | true if the web feature layer supports attachments or false if it does not |
Remarks on error conditions
This method may throw an exception or return false or null if a parameter is invalid.
Example
Print whether the Damage_to_Commercial_Buildings web feature layer supports attachments.// 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
*/
See also
FeatureAttachment.AddAsync—A .NET method that attaches a file to a feature of a web feature layer that supports attachments.
esri_webfeaturelayer_supportsAttachment —An AutoLISP function that verifies whether a web feature layer supports attachments by returning a list of true if it does or a list of false if it does not.