first of all I am thankful to all of you for helping.
else if (map.Layer.Name == "Transformer")
{
IFeatureLayer2 featureLayer = map.Layer as IFeatureLayer2;
IFeatureSelection featureSelection = featureLayer as IFeatureSelection;
IQueryFilter qF = new QueryFilter();
qF.WhereClause = "FEEDER_ID='" + feederID + "'";
featureSelection.SelectFeatures(qF,
esriSelectionResultEnum.esriSelectionResultNew, false);
UID id = new UID();
id.Value = "esriArcMapUI.ZoomToSelectedCommand";
id.SubType = 3;
}
I HAVE THIS CODE AND SIMPLY I WANT TO USE THE ARC MAP COMMAND WITH IT TO ZOOM TO SELECTED FEATURES IN ALL LAYERS.
I AM STUCK HERE PLEASE PROVIDE SOLUTIONS FOR THIS
I AM WORKING WITH AT LEAST 10 FEATURE LAYERS AND I WANT TO ZOOM TO ALL SELECTED FEATURES AFTER THE SELECTION IS DONE BY QUERY.
Hi Tabraiz,
I think you want JTran's solution from here:
c# - Zoom to selected features with ArcObjects - Geographic Information Systems Stack Exchange
IDocument d = ArcMap.Document as IDocument;
IUID ud = new UIDClass();
ud.Value = "esriArcMapUI.ZoomToSelectedCommand";
ICommandItem ci = d.CommandBars.Find(ud);
ci.Execute();
Cheerio!
-Nav.
thank you friend