The DocFeatureLayer.GetQuery method returns the QUERYFILTER of an existing document feature layer as an AutoCAD SelectionFilter representing the query used to define the feature layer.
Declaration
public SelectionFilter Esri.ArcGISForAutoCAD.DocFeatureLayer.GetQuery(Document doc, string flName, string sublayerName = null)
Parameters
| Type | Name | Description | Required |
|---|---|---|---|
Document | doc | The AutoCAD document to act on. | Required |
string | flName | An existing document feature layer name in the drawing. | Required |
string | sublayerName | An existing feature layer sublayer name in the drawing. | Optional |
Returns
| Type | Description |
|---|---|
SelectionFilter | An AutoCAD selection filter representing the query used to define the feature layer, containing DXF codes and values that combine to create a filtering query for the feature layer. |
Remarks on error conditions
This method may throw an exception or return null or an empty SelectionFilter if a parameter is invalid.
Example
Print the filter query properties for the Buildings feature layer, which include the DXF codes for layer 8 and color 62.// Initialize
var doc = Application.DocumentManager.MdiActiveDocument;
// Get the query
var query = Esri.ArcGISForAutoCAD.DocFeatureLayer.GetQuery(doc, "Buildings");
// Print the query
foreach (var typedValue in query.GetFilter())
{
doc.Editor.WriteMessage("\n" + typedValue);
}
/* Example output
(8,Buildings)
(62,9)
*/
See also
FeatureLayer.GetQuery—A .NET method that returns an AutoCAD SelectionFilter of query filter properties for the specified web or document feature layer.
esri_docfeaturelayer_getquery—An AutoLISP function that gets document feature layer query information.