POST
|
Here is the code that I used to get it to work. Chris private void TextBlock_MouseEnter(object sender, MouseEventArgs e) { QueryResultData HiLight = (QueryResultData)(sender as FrameworkElement).DataContext; Graphic g = getGraphic(HiLight); g.Symbol = SearchSelectedSymbol; if (g != null) { g.Select(); g.SetZIndex(1); } } private void TextBlock_MouseLeave(object sender, MouseEventArgs e) { QueryResultData HiLight = (QueryResultData)(sender as FrameworkElement).DataContext; Graphic g = getGraphic(HiLight); g.Symbol = SearchPictureSymbol; if (g != null) { g.Select(); g.SetZIndex(0); } } private Graphic getGraphic(QueryResultData HiLight) { GraphicsLayer layer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer; if (HiLight != null && layer != null) { foreach (Graphic g in layer.Graphics) { if (g.Geometry == HiLight.SHAPE) { return g; } } } return null; }
... View more
10-29-2010
08:52 AM
|
0
|
0
|
6
|
POST
|
Hey, I have the results from a querytask in a drop down window. The locations are displayed with a graphic. I was wondering how to highlight or change the graphic when you mouse over the results in the dropdown window. I would like the user to know which graphic goes with the result. Thanks, Chris
... View more
10-15-2010
10:38 AM
|
0
|
4
|
2357
|
POST
|
Another way to do this is to prepare a theissen polygon layer first, put that in your service but don't draw it, and then you will only need one call to get the closest polygon ID with a simple query. You can make a theissen polygon directly if you have input points. Otherwise, you will need to use the feature to points command in Arcmap to turn the polygon vertices into points, then use the create theissen polygons with the all fields option. This will put a polygon around each point with the id of the polygon attached to each point. Next dissolve on the input fid to make one theissen polygon per input polygon (this is not really necessary, but will give a more generalized data set). Now you a data layer that allows you to click on the map and bring back the id of the closest polygon. Chris
... View more
09-09-2010
10:35 AM
|
0
|
0
|
63
|
POST
|
Hey, Does VS 2010 include expression blend, or are they separate products. I thought that I saw somewhere that you no longer needed expression blend because visual studio 2010 had a visual interface for xaml. Any insight on this? Chris
... View more
09-01-2010
01:52 PM
|
0
|
8
|
4655
|
POST
|
I figured out how to extend the polylines within the polygon using IConstructCurve.ConstructExtended. Now I just have to figure out how to trim the polylines outside of the polygon. Chris
... View more
07-14-2010
11:10 AM
|
0
|
0
|
6
|
POST
|
Hey, I have some transect lines (polylines) going over a polygon. These lines can overrun or stop short of the polygon boundaries. I would like to snap them to the polygon boundaries. I can get it to work using the advanced editing tool for extend and trim, but I need to do this programatically. Does anybody know how to make these tool work programatically? I tried calling the command, but since you need a mouse click to get it to work in ArcMap, I couldn't figure out how to get it to function. Thanks, Chris
... View more
07-13-2010
01:24 PM
|
0
|
1
|
271
|
POST
|
Duncan, Thanks for the help. I am using C#, so it is a bit different from VB. I have to use the ICursor, but the rest was like yours. ICursor pCursor; pSelectionSet.Search(null, false, out pCursor); IFeatureCursor pFeatureCursor = (IFeatureCursor)pCursor; IFeature pFeature = pFeatureCursor.NextFeature(); inpolyline = (IPolyline)pFeature.Shape;
... View more
07-07-2010
11:02 AM
|
0
|
0
|
39
|
POST
|
Here is the website with the arcmap command guids. http://resources.esri.com/help/9.3/ArcGISDesktop/dotnet/858a508c-b771-467c-81e6-c6aa72d88f9c.htm The guids are only for the tools and buttons. You will have to create a command, and use the geoprocessor function to integrate the "make xy event layer" into a tool that has a guid. Check out this link: http://edndoc.esri.com/arcobjects/9.2/NET/0bf044f6-dbcd-4d04-836e-3b5e47204818.htm (this is 9.2, they probably have it in 9.3) Chris
... View more
06-18-2010
01:31 PM
|
0
|
0
|
15
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|