|
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
|
542
|
|
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
|
946
|
|
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
|
531
|
|
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
|
1762
|
|
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
|
1762
|
|
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
|
561
|
|
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
|
442
|
|
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
|
946
|
|
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
|
946
|
|
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
|
2065
|
|
POST
|
I don't think you should be setting the variables to Nothing before you exit the Using block. From what I understand, the ComReleaser class is handling the calls to ReleaseComObject that are necessary to release any resources being used by the object instances. You can't call ReleaseComObject on an object that has been set to Nothing so I imagine you are preventing the ComReleaser class from doing what it needs to do. I personally haven't used the ComReleaser class myself so I'm not sure how well it works. I prefer to release the objects myself by calling FinalReleaseComObject on them as needed.
... View more
05-12-2010
04:18 AM
|
0
|
0
|
2065
|
|
POST
|
When you set the Id property you need to include the curly braces {} as part of the GUID. itemDef.ID = "{81c4a489-678b-49cb-9af5-4d49df6933a6}" Another more human readable way to do this is to use the ClassId constant available from your command class. itemDef.ID = "{" & yourCommandClass.ClassId & "}"
... View more
04-15-2010
10:26 AM
|
0
|
0
|
264
|
|
POST
|
One possibility is your Declare statement for the API call. In VB6/VBA, a Long is a 32-bit integer. In VB.NET, a Long is a 64-bit integer. You should change the Declare statement to use Integer or Int32 instead of Long.
... View more
04-15-2010
10:20 AM
|
0
|
0
|
512
|
|
POST
|
The elements in the map's graphics container should have the same spatial reference as the map. If this spatial reference is different from the spatial reference of the feature class you're adding the feature to, then you should project the geometry into the spatial reference of the feature class. Do the map and feature class have different spatial references?
... View more
04-05-2010
08:41 AM
|
0
|
0
|
596
|
|
POST
|
So what exactly are you doing? You mention that you're using native tools to draw the graphic and to convert the graphic into a feature. If so, then you aren't doing it in code so you aren't calling IFeature::Store. If you are converting the graphic to a feature using code, then post your code and I'll take a look at it.
... View more
04-05-2010
07:15 AM
|
0
|
0
|
596
|
| 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
|