POST
|
If you show the dialog modal (form.ShowDialog()) then everything works as expected. If you show the form modeless (form.Show()) then the form does not process keystrokes as you would expect. Follow the link in my signature to my company blog and you'll find a couple of articles that address this issue.
... View more
06-10-2010
04:28 AM
|
0
|
0
|
1
|
POST
|
Sorry, ESRI's new forums suck and I don't get email notifications anymore. The OpenFeatureClass method expects just the name of the feature class. It looks like you're passing in a full path. Strip off the directory path and it should be fine.
... View more
06-08-2010
09:09 AM
|
0
|
0
|
3
|
POST
|
A layer file doesn't have any properties for you to change. The process would be to open the layer file, get the layer it contains, change that layer however you need to, replace the layer in the layer file with your updated layer, then save the layer file back out. You can use ILayerFile to access the layer file on disk.
... View more
06-01-2010
10:33 AM
|
0
|
0
|
10
|
POST
|
Wow, that was really strange. The code window didn't have a scrollbar. I restarted my computer and voila! there it is. Your code looks fine to me. I wonder if its a resource reference that isn't getting cleaned up. In the deleteField method, try calling Marshal.FinalReleaseComObject on the Field and Fields references you are using and see if that clears it up.
... View more
05-27-2010
07:47 AM
|
0
|
0
|
19
|
POST
|
What is the code behind deleteField? I don't see anything wrong with your code and I'm pretty sure I've deleted multiple fields at the same time before.
... View more
05-27-2010
04:52 AM
|
0
|
0
|
19
|
POST
|
IRasterLayer is in Carto but the implementing class (RasterLayer) requires references to Geodatabase, Display, System, and DataSourcesRaster. Make sure you have all of these assemblies added as references.
... View more
05-24-2010
04:42 AM
|
0
|
0
|
6
|
POST
|
The code is correct. You don't have any error handling here so if an error is occurring you won't know it. Have you tried stepping through the code with the debugger? If your form class has code inside of New() or code inside one of the events that fire when the form is displayed (ie, Load, Activate, etc.) then an error could be thrown there. If so, that would prevent the form from being shown because the code would stop executing before the call to Show(). The problem is most likely in your form class, not the code you posted here.
... View more
05-20-2010
04:27 AM
|
0
|
0
|
6
|
POST
|
The developer help topic for the IObjectFactory interface has a link to a sample for automating the ArcGIS desktop apps. The sample is available in VB.NET and C#.
... View more
05-19-2010
10:44 AM
|
0
|
0
|
3
|
POST
|
If this code is not running inside of ArcMap then you can't use New to instantiate your objects. Your application and ArcMap are running in two separate process spaces and objects created in one can't be used in the other. You'll need to use IObjectFactory to create instances of the ArcObjects you want to use with ArcMap. You may not be able to use the objects returned by the geoprocessor methods your using either.
... View more
05-14-2010
04:29 AM
|
0
|
0
|
3
|
POST
|
I've never noticed any ill side effects in apps (or extensions) that do not call ReleaseCOMObject on IFeature/IRow references - has anyone else? For example if I have methods that return generic lists of IFeatures (List<IFeature>) and releases the cursor when its done, do I really need to call ReleaseCOMObject on each feature when they are no longer in use? Can anyone show me code where failing to call ReleaseCOMObject on an IFeature/IRow causes an exception? Thanks! Hi Kirk, I've never seen any exceptions thrown but in one of our applications a temporary geodatabase was being created, used, then deleted. The code that deleted the geodatabase failed any time the user tried to repeat the same workflow without first closing the dialog and re-opening it (which we didn't want them to have to do). I went over all of the code with a fine toothed comb several times releasing every object I could find to no avail. I didn't bother with feature and row objects inside of loops because I was releasing the objects outside of the loops. The last thing I tried was releasing the feature and row objects inside the loop because I had seen an ESRI example where it was being done and all of a sudden the geodatabase could be deleted without any problems. Under normal circumstances I don't think you'll run into any problems if you don't release the objects but in specific cases like mine it's necessary. Hope this helps.
... View more
05-12-2010
12:51 PM
|
0
|
0
|
66
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|