The function returns a list of attached file names as strings from a specified web feature entity.
Syntax
(esri_webfeaturelayer_listAttachments flname ename )
Arguments
- flname | string | required | An existing web feature layer name in the drawing.
- ename | entity name | required | The AutoCAD entity name of a feature to list attachments.
Example usage 1
Prompts the user to select an entity from a web feature layer named "Damage_to_Residential_Buildings" and requests a list of attached file names. (setq ename (car (entsel)))
(esri_webfeaturelayer_listAttachments
"Damage_to_Residential_Buildings"
ename
)
Result example usage 1
The list of attached files is returned as a list of strings:
("steelPowerPole.jpg" "AutoCAD_drawingFiles.zip" "fe22f9acd3313c5e21f8a78dc61a7875a42b489d2f3168336d360c050e85dee0.jpg" "nightSkyOverWater.jpg" "pdfTest.pdf" "steelPowerPole.jpg")
Example usage 2
Prompts the user to select an entity from a web feature layer named "Shelters" and requests a list of attached file names. (The "Shelters" web feature layer does not support attachments.) (setq ename (car (entsel)))
(esri_webfeaturelayer_listAttachments
"shelters"
ename
)
Result example usage 2
An error is returned because the web feature layer does not support attachments:
(nil ("Error" . "Layer does not support attachments"))
Return values
- If successful, returns a list of one or more strings, or if there are zero attachments it returns a list of nil: ("<string1>" "<string..n>" ) or (nil)
- If failed, returns a list with the first value of nil and then an associated list containing the key value "Error" and an associated error message as a string: (nil ( "Error" . "<message>"))
A failed return value can occur for any of the following reasons:
- (nil ("Error" . "Missing required
argument."))
One of the two required arguments is not supplied.
- (nil ("Error" . "Web feature layer not
found."))
The specified web feature layer value is not a valid web feature layer in the drawing.
- (nil ("Error" . "No connected web feature
layers found."))
The network connection to the web feature layer was lost.
- (nil ("Error" . "Layer does not support
attachments"))
The specified web feature layer does not support attachments.
- (nil ("Error" . "No feature found."))
The specified entity is not a valid feature of the specified web feature layer.
.