|
POST
|
The spatial reference of a feature layer in the map and the spatial reference of that layer's data source are not necessarily the same. To get the spatial reference of the data source you need to access the data source itself. You can get a reference to a feature layer's data source via IFeatureLayer.FeatureClass.
... View more
10-30-2013
05:46 AM
|
0
|
0
|
644
|
|
POST
|
IIndexQuery is implemented by the FeatureIndex class. This class also implements IFeatureIndex. Use IFeatureIndex to set the feature class and build the index. You can also use a feature cursor to build the index if you need to reduce the number of features being indexed.
... View more
10-28-2013
07:47 AM
|
0
|
0
|
420
|
|
POST
|
We still support 9.3.1 for some of our clients and on those VMs the help is available from the Start menu. On our 10.x VMs I just use Google.
... View more
10-28-2013
07:33 AM
|
0
|
0
|
306
|
|
POST
|
You can use IIndexQuery2.NearestFeature for this. The method will return the ObjectId of the nearest feature as well as its distance from the input geometry.
... View more
10-28-2013
07:30 AM
|
0
|
0
|
420
|
|
POST
|
I do not know way,when open the map document,I found that one of the feature is holding the 'selected' status.I try everything I can to unselect the feature which result in flickering the all of the form.So what can I do now?Thanks very much. Here is what I did. Add the code: map_con_main.Map.ClearSelection();
map_con_main.ActiveView.Refresh(); to the method "FormMain_Shown"an "OnAfterScreenDraw"and so no. If calling ClearSelection and Refresh doesn't clear the selection then a) the feature isn't actually selected (maybe it's a graphic element or something that makes it appear to be selected?) or b) map_con_main.Map isn't referencing the map you think it's referencing. Is this running in ArcMap? If yes, then what happens if you click the ArcMap Clear Feature Selection button on the toolbar?
... View more
10-23-2013
07:14 AM
|
0
|
0
|
779
|
|
POST
|
You're setting the Shape field value here: polyline.Shape = feature; This is not the correct way to set the Shape field (the above line was correct) and you don't need to do it twice: polyline.set_Value(polyline.Fields.FindField("SHAPE"), result); You can't set the Shape.Length field value. It is read-only and is managed by the geodatabase. It will update when you update the Shape field. polyline.set_Value(polyline.Fields.FindField("SHAPE_Length"), ((IPolyline)result).Length);
... View more
10-21-2013
06:58 AM
|
0
|
0
|
441
|
|
POST
|
Maybe I'm missing something but IPolyline has a Length property that returns the length of the line. Is this not what you're looking for?
... View more
10-10-2013
09:12 AM
|
0
|
0
|
1394
|
|
POST
|
Since you're getting the feature you want to edit from the editor's feature selection I'm assuming you're running this code inside of an edit session. If so, you shouldn't be adding/deleting fields during an edit session. Add the field before you start editing.
... View more
10-10-2013
07:34 AM
|
0
|
0
|
557
|
|
POST
|
You can write a function that counts the feature layers in a given group layer by looping through the layers in that group layer. For each layer, check the type. If it's a feature layer, then add to the count. If it's a group layer then call the function recursively and add it's return value to the layer count. The function returns the count.
... View more
10-09-2013
06:40 AM
|
0
|
0
|
717
|
|
POST
|
Here you are creating a new polyline: polyline = (Polyline)serverContext.CreateObject("esriGeometry.Polyline"); Here you are performing a QI from IPoint to IPointCollection: pointCollection = polyline as IPointCollection; Here you are adding points to the point collection: for (int count = 0; count < geoDataArray.Length; count++) { pointArray = geoDataArray[count].Split(new char[] { ',' }); latitude = Convert.ToDouble(pointArray[0].ToString()); longitude = Convert.ToDouble(pointArray[1].ToString()); point.X = latitude; point.Y = longitude; pointCollection.AddPoint(point, ref missingObject, ref missingObject); } At this point you have created the polyline and added the points. But, here you add the points again by adding the point collection to the polyline: polyline.AddPointCollection(pointCollection); You don't want to do that because you're adding the points twice.
... View more
10-09-2013
06:37 AM
|
0
|
0
|
1516
|
|
POST
|
You need to QI to IEnumFeatureSetup and set AllFields to true. By default, only the geometry is set for the feature selection. This is explained in the help topic for IMap.FeatureSelection, but doesn't appear to be repeated in the topic for IScene.FeatureSelection.
... View more
10-07-2013
11:48 AM
|
0
|
0
|
449
|
|
POST
|
3 things I would try first: use ShapeCopy instead of Shape to set the geometry, add a check to the field to make sure it's editable before trying to copy the field value and combine the field value assignment to not use a variable (feature.set_Value = feature.get_value).
... View more
10-07-2013
11:42 AM
|
0
|
0
|
1738
|
|
POST
|
I'm positive. The tlb will most likely show up under Detected Dependencies, in which case you should right-click and Exclude it. Same with the ESRI assemblies and anything else that is guaranteed to be on the target machine. The installer package should include the Primary Output for your application as well as any dependencies, such as code libraries, 3rd party assemblies, etc. that are not typically installed on the target machine. Also note, the instructions I referenced are for ArcGIS Desktop 10. If you're not using 10, then you may be getting the error because it can't find esriRegAsm.exe when the installer class code runs.
... View more
10-03-2013
12:34 PM
|
0
|
0
|
1541
|
|
POST
|
You shouldn't include the *.tlb files with your deployment. All of your ESRI components should have component category registration code added to them. Add an installer class to your project that has the code necessary to perform the registration. The code inside your installer class will depend on which version of ArcGIS Desktop you're using. Use a Custom Action in the installer to call the installer class. All of this is explained in the help: http://resources.arcgis.com/en/help/arcobjects-net/conceptualhelp/#/How_to_deploy_a_custom_component_using_a_setup_project/00010000016r000000/ The help documents for previous versions have similar topics.
... View more
10-03-2013
05:30 AM
|
0
|
0
|
1541
|
|
POST
|
Have you tried IRasterWorkspace2.CreateRasterDataset? It has input params for the number of rows and columns.
... View more
10-01-2013
05:27 AM
|
0
|
0
|
797
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 06-20-2014 05:29 AM | |
| 1 | 02-01-2011 04:18 AM | |
| 1 | 02-04-2011 04:15 AM | |
| 1 | 01-17-2014 03:57 AM | |
| 1 | 10-07-2010 07:37 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|