AnsweredAssumed Answered

Select from NALayer

Question asked by Aysberq on Dec 28, 2013
Latest reply on Dec 29, 2013 by sanjayjadhav
Hello.

I want to select a feature from Network Analysis layer. I have the result (naLayer), which is solution of some Network Analysis problem. But when I cast   naLayer as IfeatureLayer   I get NULL.

Can anyone help me to solve this problem?

 SelectByAttributeQuery(naLayer as IfeatureLayer, "myQuery", true);   public void SelectByAttributeQuery(IFeatureLayer featureLayer,String whereClause,bool justOne) {     IMap m_map = axMapControl.Map;     if (m_map.SelectionCount > 0) m_map.ClearSelection();     IFeatureSelection featureSelection = featureLayer as IFeatureSelection;     IQueryFilter queryFilter = new QueryFilterClass();     queryFilter.WhereClause = whereClause;     featureSelection.SelectFeatures(queryFilter,esriSelectionResultEnum.esriSelectionResultNew,justOne);      axMapControl.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, null, null); }

Outcomes