|
POST
|
This is just a guess, but it seems that the method is trying to access a geometry or value that doesn't exist. This might happen if the number of geometries in the geometry collection doesn't match the number of distances in the array. You're adding polylines to the geometry collection by calling AddGeometryCollection. I'm not sure if it makes any difference but you might want to try adding the polylines using AddGeometry. Also, check the GeometryCount property on the geometry collection and make sure it matches the Count property on the array. Another possibility is it doesn't like the geometry collection you're passing in to receive the output buffers. You're instantiating it as a geometry bag. Try not instantiating it at all. Just declare the variable and pass it in. Some ArcObjects methods like to create their own class instances. One last thing I can think of is that it could be a data problem. Before adding geometries to your input collection, check to make sure they are not null and not empty. You should probably check the buffer values too to make sure none of them are 0.
... View more
08-14-2012
05:38 AM
|
0
|
0
|
784
|
|
POST
|
You have to test for it using the various renderer interfaces. In VB, you use TypeOf. In C# I believe you use Is. If TypeOf renderer Is IUniqueValueRenderer Then Dim uvRenderer As IUniqueValueRenderer = DirectCast(renderer, IUniqueValueRenderer ElseIf TypeOf renderer Is IClassBreaksRenderer Then ' handle this type End If
... View more
08-13-2012
05:41 AM
|
0
|
0
|
919
|
|
POST
|
The exception is not caused by calling a method of that released COM object, but caused by releasing it again with my generic releasing method... it use "if (obj is IEnumerable)" to check the interface it supports. Because it is already released, the checking will fail in the second call of the releasing method. Now I decide to resolve this issue by coding carefully, not to release the same COM object twice, even though the logic will be a bit more comoplicated. Set the object to null after the call to ReleaseComObject. After the object is released, it's value isn't null so if you call the method again it will try to release it again. If you set the object to null after releasing it then the next time you call the method it will see the object is null and not try to release it a second time. Also, as you said, more careful programming is what you really need. You should be releasing objects when you're done with them. This is usually right before they go out of scope so in reality there shouldn't be another place in the code where you would even have access to the object in order to try to release it.
... View more
08-09-2012
05:21 AM
|
0
|
0
|
662
|
|
POST
|
When you specify the shapefile name are you typing it in or selecting the existing object displayed in the dialog? Do you get different behavior depending on which way you do it? Also, check the IGxDialog.ReplacingObject property to see if it's being set correctly. If it is, then you can work around the problem by implementing your own warning message. I really can't see why it work in one app but not the other either.
... View more
08-07-2012
12:10 PM
|
0
|
0
|
1512
|
|
POST
|
I'm not sure why it would work in one app but not another. Just to rule out the obvious, have you double-checked to make sure it's the exact same code in both apps? Are you trying to save to the same directory on the same computer with both apps and getting a warning from one but not the other? It might be a permissions issue, and OS setting or something similar if you're running the two apps on different systems or as different users.
... View more
08-07-2012
11:51 AM
|
0
|
0
|
1512
|
|
POST
|
I would expect the GxFilterFeatureClasses class to filter any type of feature class but ESRI probably had geodatabase feature classes in mind when they implemented it. It probably isn't appending the .shp extension onto the class name in order to check for the existing feature class. Do you get the correct behavior when you use the GxFilterShapefiles class?
... View more
08-07-2012
11:31 AM
|
0
|
0
|
1512
|
|
POST
|
They are still there according to the documentation. What are you seeing that makes you think they are missing?
... View more
07-27-2012
10:27 AM
|
0
|
0
|
766
|
|
POST
|
Which ArcGIS 10 product do you have installed? If you don't have ArcGIS Desktop 10 installed then I doubt the ArcMapUI assembly was installed since that assembly is specific to the ArcMap desktop application. The default location is \Program Files\ArcGIS\DeveloperKit10.0\DotNet. If you have everything installed correctly, it should show up in the Add Reference dialog under the .NET tab. I believe you also have to have the target framework for your project set to .NET 3.5.
... View more
07-26-2012
05:29 AM
|
0
|
0
|
844
|
|
POST
|
Are you running this code inside of ArcMap? If not, then you need to check out a license prior to calling any ArcObjects. If you are using ArcGIS 10, then you also need to bind to a product before attempting to check out the license.
... View more
07-24-2012
11:48 AM
|
0
|
0
|
2475
|
|
POST
|
If I remember right, features taken from a feature class are assumed to be simple whether or not they actually are. I don't think there's any way to tell for all geometry types. If you're working with polygons then I believe you can call IToplogicalOperator3.IsSimpleEx.
... View more
07-24-2012
09:19 AM
|
0
|
0
|
1343
|
|
POST
|
In order to simplify a geometry, you must use ITopologicalOperator2 and set IsKnownSimple to False. After that, calling Simplify will simplify the geometry. If you call Simplify without first setting IsKnownSimple to False, it will exit without doing anything if IsSimple returns true. IsSimple pretty much returns True all of the time, which is the reason IsKnownSimple was added to the object model. I don't know that it will solve your problem, but give it a try.
... View more
07-24-2012
05:56 AM
|
0
|
0
|
1343
|
|
POST
|
What type of feature class is it? Not all feature classes support field aliases. For example, if your feature class is a shapefile then you can't set an alias on a field because the shapefile has no way of storing it. As far as I know, only geodatabase feature classes support field aliases.
... View more
07-24-2012
05:42 AM
|
0
|
0
|
1074
|
|
POST
|
All of the GUIDs are in the system registry under HKEY_CLASSES_ROOT. The id for esriEditorExt.ConstructCommand is: {05A81952-2C61-4D60-92C6-9D2737666D5C}
... View more
07-19-2012
05:12 AM
|
0
|
0
|
1200
|
|
POST
|
You use ICursor the same way you use IFeatureCursor except for the cursor contains rows instead of features. So, use IRow instead of IFeature. The method calls reflect this as well, use ICursor.NextRow instead of IFeatureCursor.NextFeature.
... View more
07-18-2012
06:29 AM
|
0
|
0
|
1200
|
|
POST
|
As Ken mentioned you can usually use TypeOf and test for a particular interface that will identify the underlying class. In .NET you can also use the GetType method and check the FullName property. This will give you the fully qualified class name. Dim layer As IFeatureLayer = New FeatureLayer
Dim s As String = layer.GetType.FullName
... View more
07-18-2012
05:42 AM
|
0
|
0
|
1484
|
| 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
|