|
POST
|
IApplication is the interface you need to use. You will need to declare a variable of that type and set it to an instance of the ArcMap application. Once you've done that you can call the methods you need. How you do this depends on your environment so I'll leave that up to you.
... View more
01-07-2013
07:35 AM
|
0
|
0
|
2162
|
|
POST
|
If you want to unload the mxd then call IApplication.NewDocument. If you want to close ArcMap itself then call IApplication.Shutdown.
... View more
01-07-2013
05:43 AM
|
0
|
0
|
2162
|
|
POST
|
Or hide it in finally statement. It would still have to be declared outside of the Try/Catch. Variables declared within the Try/Catch do not have scope in the Finally clause.
... View more
01-04-2013
04:32 AM
|
0
|
0
|
1544
|
|
POST
|
You don't have to make the progress dialog public. All you need to do is declare it outside of the Try/Catch.
... View more
01-03-2013
11:28 AM
|
0
|
0
|
1544
|
|
POST
|
There are several ways to solve the problem. One way is to add code to the form's key press events to handle such things as tabbing, mnemonics, accept/cancel, etc. The drawback to this is that you have to add the code to every modeless form you create. A better way is to create a blank form with the custom code, put it in a code library and have all of your forms inherit from it. I'm attaching a code sample I wrote several years back that shows how you might do this.
... View more
01-02-2013
08:05 AM
|
0
|
0
|
2448
|
|
POST
|
I'm pretty sure you can't stop the edit session from within an editor event like this. A typical workflow would be for the user to start the edit session, sketch a new feature, you listen for the OnCreateFeature event and pop up your dialog which would in turn populate attributes on the new feature and close. The user would then continue their edit session. If they save, then your attribute edits would be saved along with the new feature. If they cancel, then your attribute edits are discarded. They could also continue creating more features and your dialog would pop up for each. If want a different workflow, then you may find it easier to skip using the editor altogether and simply write a tool that does what you need it to do.
... View more
12-19-2012
12:38 PM
|
0
|
0
|
1455
|
|
POST
|
Is this preventing you from doing something you're trying to do or are you just curious as to why you're seeing this? It's normal for the debugger to encounter errors when attempting to display information about properties that have not been initialized. For example, if you create a new IPoint object and look at its properties, you'll see exceptions are thrown for properties such as M, X, Y and Z. However, after you set the coordinates for the new point (i.e. call PutCoords), these properties then will display actual values. Unless you're encountering some type of problem, I wouldn't worry about it.
... View more
12-06-2012
06:58 AM
|
0
|
0
|
787
|
|
POST
|
You'll need to set the ArcMap window as the form's owner. In the code below, m_application is a reference to the ArcMap application. yourForm.Show(System.Windows.Forms.Control.FromHandle((IntPtr)m_application.hWnd));
... View more
12-06-2012
04:08 AM
|
0
|
0
|
2448
|
|
POST
|
I would guess the problem is your program is ending before the geoprocessor has completed. The call to Execute is asynchronous. Your code will not stop at that point and wait for the process to finish. Instead, it will continue on and in this case that's the end of the program. You should be subscribing to the geoprocessor's events and waiting for it to finish before exiting your program.
... View more
12-05-2012
05:27 AM
|
0
|
0
|
1494
|
|
POST
|
What exactly are you trying to do? Are you wanting the user to sketch an envelope on the map that indicates which features they want to delete? If so, you need a tool not a command. If you want to simply delete all of the features in a layer then you just need to call ITable.DeleteSearchedRows and pass in null. DirectCast(featureLayer.FeatureClass, ITable).DeleteSearchedRows(Nothing) If you want to delete a subset of the features in the layer then create a query filter and pass it into the method.
... View more
12-05-2012
04:21 AM
|
0
|
0
|
2433
|
|
POST
|
If you mean that you would like to copy the symbology from one layer to another then you can use the IObjectCopy interface to copy the layer's renderer. You get and set a layer's renderer via IGeoFeatureLayer.Renderer. You could simply set the renderer of one layer to the renderer of another layer but that would result in both layers using the same renderer object in memory. So, you should deep clone the renderer using IObjectCopy and set the second layer's renderer using the clone.
... View more
11-30-2012
12:08 PM
|
0
|
0
|
1086
|
|
POST
|
ArcObjects, to the best of my knowledge, doesn't support exporting to a multipage pdf. You could export each layout to its own pdf and then combine these individual pdfs into a single file. I don't know about java but if you were using .NET then you could use a free 3rd party library such as SharpPDF to create the final pdf file.
... View more
11-06-2012
08:06 AM
|
0
|
0
|
765
|
|
POST
|
I don't work with addins but if I remember right, that config file is just an xml file. In xml, the tags <!-- and --> are used for comments and the tags <? and ?> are used in the file header (i.e. <?xml version="1.0" encoding="utf-8"?>).
... View more
10-29-2012
10:55 AM
|
0
|
0
|
4593
|
|
POST
|
It could be a 64-bit vs 32-bit issue. Because ArcObjects are 32-bit, any application that uses them must run as 32-bit. The target platform should be set to x86 in your project properties.
... View more
10-16-2012
12:01 PM
|
0
|
0
|
2511
|
| 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
|