Skip To Content

WebFeatureLayer.Get (.NET)

The WebFeatureLayer.Get method gets the web feature layer properties for the specified web feature layer as a dictionary.

Declaration

public Dictionary<string, object> Esri.ArcGISForAutoCAD.WebFeatureLayer.Get(Document doc, string flName, string sublayerName = null)

Parameters

TypeNameDescriptionRequired

Document

doc

The AutoCAD document to act on.

Required

string

flName

An existing web feature layer name in the drawing.

Required

string

sublayerName

An existing feature layer sublayer name defined for the feature layer.

Optional

Returns

TypeDescription

Dictionary<string, object>

A dictionary of web feature layer properties. The keys and values of the dictionary are described in the table below.

The dictionary may contain the following values and others:

KeyTypeValue Description

"BRANCH"

string

The name of the layer's branch.

"CADLAYER"

string

The AutoCAD layer used to define the parent feature layer (additional layers can be used in the case of subtypes).

"DATUMTRANSFORMATION"

Dictionary<string, object>

A dictionary containing the datum transformation steps.

"DEFINITIONEXPRESSION"

string

A WHERE clause expression that limits features from the layer by attribute values. The syntax of the WHERE clause is determined by the source data.

"EDITMODE"

string

The editing option ("EDIT" or "QUERY").

"GEOMTYPE"

string

The feature layer geometry type.

"LASTEDITTIME_UTC"

long

The epoch or Unix time the web feature layer was last edited.

"NAME"

string

The name of the feature layer or feature layer sublayer.

"PARENTNAME"

string

The name of the parent web feature layer.

"PARENTURL"

Uri

The URL of the parent web feature layer REST endpoint.

"PORTALITEMURL"

Uri

The URL path to the item.

"RELATIONSHIPS"

List<string>

A list of available relationship field names.

"SOURCESPREF"

string

The spatial reference of the data source of the layer as a WKID or WKT string.

"SPATIALREFERENCE"

string

The spatial reference of the layer as a WKID or WKT string.

"SUBLAYERID"

int

The coded value of the subtype domain.

"SUPPORTEDCURVETYPES"

List<string>

A list of supported curve types ("esriGeometryCircularArc", "esriGeometryEllipticArc", "esriGeometryBezier3Curve", and "esriGeometryBezier").

"SUPPORTSATTACHMENTS"

bool

Specifies whether the layer supports attachments.

"SUPPORTSBRANCHVERSIONS"

bool

Specifies whether the layer supports branch versioning.

"SUPPORTSEDITING"

bool

Specifies whether the layer supports editing.

"SUPPORTSEDITORTRACKING"

string

Specifies whether the layer supports editor tracking ("TRUE", "FALSE", or "UNKNOWN").

"SUPPORTSTRUECURVES"

bool

Specifies whether the layer supports true curves.

"SUPPORTS_M"

bool

Specifies whether the layer supports m-values.

"SUPPORTS_Z"

bool

Specifies whether the layer supports z-values.

"SYMBOLDESCRIPTION"

string

The block name if the type is "Block Reference", a description if the type is "COGO Point", or the hatch pattern name if the type is "Hatch".

"SYMBOLTYPE"

string

The default element type ("Point", "Block Reference", "COGO Point", "Hatch", or "Automatic").

"TYPEFIELD"

string

The field name used to generate subtypes.

"URL"

Uri

The URL path to the feature layer REST endpoint.

Remarks on error conditions

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

Example 1

Print the web feature layer properties for the UtilityPoles web feature layer.

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

// Get the web feature layer properties
var properties = Esri.ArcGISForAutoCAD.WebFeatureLayer.Get(doc, "UtilityPoles");

// Print the web feature layer properties
foreach (var property in properties)
{
  doc.Editor.WriteMessage("\n{0}: {1}", property.Key, property.Value);
}

/* Example output
NAME: UtilityPoles
GEOMTYPE: Point
PORTALITEMURL:
URL: https://MyGISportal.com/server/rest/services/subtypes/UtilityPoles/FeatureServer/0
SYMBOLTYPE: Point
SYMBOLDESCRIPTION:
CADLAYER: ESRI_UtilityPoles
CONNECTED: True
DEFINITIONEXPRESSION:
EDITMODE: EDIT
SUPPORTS_M: False
SUPPORTS_Z: True
SUPPORTSATTACHMENTS: True
SUPPORTSBRANCHVERSIONS: False
SUPPORTSEDITING: True
TYPEFIELD: PoleType
SPATIALREFERENCE: 6443
SOURCESPREF: 103023
SUPPORTSEDITORTRACKING: TRUE
LASTEDITTIME_UTC: 1716295706000
*/

Example 2

Print the web feature layer properties for the Destroyed sublayer of the Damage_to_Commercial_Buildings web feature layer.

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

// Get the web feature layer properties
var properties = Esri.ArcGISForAutoCAD.WebFeatureLayer.Get(doc, "Damage_to_Commercial_Buildings", "Destroyed");

// Print the web feature layer properties
foreach (var property in properties)
{
  doc.Editor.WriteMessage("\n{0}: {1}", property.Key, property.Value);
}

/* Example output
NAME: Destroyed
PARENTNAME: Damage_to_Commercial_Buildings
GEOMTYPE: Point
CADLAYER: ESRI_Damage_to_Commercial_Buildings_Destroyed
SYMBOLTYPE: Block Reference
SYMBOLDESCRIPTION: Destroyed_Structure
PARENTURL: https://sampleserver7.arcgisonline.com/server/rest/services/DamageAssessment/FeatureServer/0
SUBLAYERID: 2
EDITMODE: QUERY
*/

See also

FeatureLayer.Get—A .NET method that returns a dictionary of feature layer properties.

esri_webfeaturelayer_get —An AutoLISP function that gets the web feature layer properties for the specified web feature layer as an associated list.