Skip To Content

WebFeatureLayer.Extract (.NET)

The WebFeatureLayer.Extract method converts a web feature layer to a document feature layer. Any web feature layer edits are abandoned and all features present in the layer remain. The AutoCAD layer name of the web feature layer will be modified to drop the esri_ prefix and the definition query of the resulting document feature layer will be set to that new layer name. Likewise, any sublayers of the parent will have definition queries set to the new AutoCAD layer names for each subfeature layer.

Declaration

public bool Esri.ArcGISForAutoCAD.WebFeatureLayer.Extract(Document doc, string flName)

Parameters

TypeNameDescriptionRequired

Document

doc

The AutoCAD document to act on.

required

string

flName

An existing web feature layer name in the drawing.

required

Returns

TypeDescription

bool

true if the web feature layer was extracted successfully

Remarks on error conditions

This method may throw an exception or return false or null if a parameter is invalid.

Example

Print the success of extracting the Shelters web feature layer and its sublayers to a document feature layer with sublayers.

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

// Extract the web feature layer
var success = Esri.ArcGISForAutoCAD.WebFeatureLayer.Extract(doc, "Shelters");
        
// Print the success
doc.Editor.WriteMessage(success.ToString());

/* Example output
True
*/

See also

esri_webfeaturelayer_extract—An AutoLISP function that converts a web feature layer to a document feature layer.