Thanks a lot...It was my answer..can u help me in one more thing....if i want to select feature on mousedown event--->first,i created a point,then i buffered it.now i need to check whether this point intersects with any other feature(i have a polyline shapefile also)If it does intersect then that line shud be selected....I used spatial filter but it returns null valuecan u check the code please: public void OnMouseDown(int button, int shift, int x, int y) { // # region attribute activeView = m_mxDoc.ActiveView; IPoint ppoint = new PointClass(); ppoint = activeView.ScreenDisplay.DisplayTransformation.ToMapPoint(x, y); ITopologicalOperator topologicalOperator = ppoint as ITopologicalOperator; IGeometry gm = topologicalOperator.Buffer(1); ISpatialFilter spatialFilter = new SpatialFilterClass(); IMap map = activeView.FocusMap; pageLayout = (PageLayout)m_mxDoc.PageLayout; l1 = map.get_Layer(0); l2 = map.get_Layer(1); if (l1.Name == "SSE_Access") { layer_working = l1; } else if (l2.Name == "SSE_Access") { layer_working = l2; } else { layer_working = null; MessageBox.Show("Layer for attribute information does not exists"); } IFeatureLayer pfl = (IFeatureLayer)layer_working; IFeatureClass featureClass = pfl.FeatureClass; spatialFilter.GeometryField = featureClass.ShapeFieldName; spatialFilter.Geometry = gm; spatialFilter.SpatialRel = esriSpatialRelEnum.esriSpatialRelIntersects; IFeatureCursor featureCursor1 = featureClass.Search(spatialFilter, true); IFeature Feat1 = featureCursor1.NextFeature(); while (Feat1 != null) { map.SelectFeature(layer_working, Feat1); Feat1 = featureCursor1.NextFeature(); }thanks in adv.
I want the code in c# please help.its urgent
Hi I want to implement that on select of a point in the shapefile in the pagelayout mode it should display an image(in graphic container).I got several codes involving vb but i cant understand vb so can any1 provide me a code that can help me.I know it has an inbuilt feature for adding a picture but i want to implement through programming.its urgent
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.