|
POST
|
Does the user have admin privileges on the machine? If not, Add from File won't work for them because it requires entries to be created in the system registry. Also, you can have your installer do this during install (it will also need admin rights). There's really no need to require the user to do anything other than run your installer then open ArcMap and turn on your toolbar.
... View more
07-20-2011
06:44 AM
|
0
|
0
|
1638
|
|
POST
|
You're calling DoModalOpen, which is a dialog for opening. You can't open what doesn't exist so that's why it gives you that message. You should call DoModalSave.
... View more
07-20-2011
06:36 AM
|
0
|
0
|
708
|
|
POST
|
pExportCAD.in_features = @"C:\Arquivos de Programas\ArcGIS\ArcGlobeData\World Image.lyr"; All you should need to do is change this line to the path to the feature class. If you are unsure what this path should be then you can browse to the feature class in ArcCatalog and copy the text you see in the Location box at the top. You should also be able to set in_features to the actual feature class object, which you can get from the map layer or by connecting to the workspace and opening the feature class.
... View more
07-20-2011
06:19 AM
|
0
|
0
|
1574
|
|
POST
|
I don't think there is any direct support in the ArcObjects model but you should be able to execute the context menu's command item. Just set the document's context item prior to executing it. Sub CreateLayerPackage()
Dim uid As New uid
uid.Value = "{18DF94D9-0F8A-11D2-94B1-080009EEBECB}:23"
Dim mxDoc As IMxDocument
Set mxDoc = ThisDocument
mxDoc.ContextItem = mxDoc.FocusMap.Layer(0)
Dim commandItem As ICommandItem
Set commandItem = ThisDocument.CommandBars.Find(uid)
commandItem.Execute
End Sub
... View more
07-20-2011
05:45 AM
|
0
|
0
|
963
|
|
POST
|
A couple of other things - you're passing in True to StartEditing. If you're not implementing undo/redo capability then I would pass in False. Also, when running code in ArcMap I use the Editor extension (IEditor) to manage the edit session instead of IWorkspaceEdit.
... View more
07-20-2011
05:21 AM
|
0
|
0
|
1023
|
|
POST
|
I haven't tested anything to see what happens but calling the com releaser on the feature class might hose ArcMap's reference to it (I've had this happen in other situations). Before releasing the feature class you may want to either clear the operation stack or remove the last operation (which should be the deleting of the layer) so that ArcMap isn't hanging on to it anymore. You can access the operation stack via IMxDocument.OperationStack.
... View more
07-19-2011
12:11 PM
|
0
|
0
|
1794
|
|
POST
|
Before removing the layer from the map you should QI over to IDataLayer2 and call Disconnect.
... View more
07-19-2011
07:04 AM
|
0
|
0
|
1794
|
|
POST
|
A layer file doesn't contain any data. It's a serialized layer object. Instead of using a layer file, try using the data that the layer file points to.
... View more
07-19-2011
06:16 AM
|
0
|
0
|
1574
|
|
POST
|
It could be because you're calling Store and UpdateFeature. Use one or the other but not both. I would suggest UpdateFeature.
... View more
07-19-2011
05:45 AM
|
0
|
0
|
1023
|
|
POST
|
I don't see any error handling that will show you the error message if an exception is thrown. Are you checking the geoprocessing results object for any messages? What happens when you run this same tool from ArcToolbox on the same data?
... View more
07-19-2011
05:42 AM
|
0
|
0
|
1574
|
|
POST
|
Have you thought about just creating a layer package or a map package if you're using ArcGIS 10? http://www.esri.com/library/fliers/pdfs/easy-ways-share-data.pdf
... View more
07-19-2011
05:36 AM
|
0
|
0
|
963
|
|
POST
|
You can only have an IApplication reference if ArcMap is running. If it's not running then you'll need to modify the code to work without an application reference. The first thing to do will be to get rid of the code that uses IObjectFactory. Another thing I see is the way you're running the geoprocessing tool. To run a geoprocessing tool, create an instance of the Geoprocessor class as well as an instance of the tool class you want to run. Set the parameters on the tool class then pass it into IGeoprocessor.Execute.
... View more
07-18-2011
06:08 AM
|
0
|
0
|
879
|
|
POST
|
Having the user visit each selected item could be slow and tedious. A better solution IMO would be to simply display the query results in a data grid so that the user can change the ones they want and simply ignore the rest. I would also include a way for them to select multiple rows in the grid and update them to the same value all at once instead of having to edit each one individually.
... View more
07-15-2011
05:52 AM
|
0
|
0
|
548
|
|
POST
|
You just create a new map object. I'm assuming your original code worked with a map reference that you got from IMxDocument.FocusMap. None of that code logic would change except that you're creating a new map instead of using one you got from ArcMap. Dim map As IMap = new Map The code to create the layer objects should be pretty much the same as what you were originally doing, just add them to this map instead. Also use this map to get your IActiveView references and any others that you were originally getting from the ArcMap document's FocusMap.
... View more
07-13-2011
06:42 AM
|
0
|
0
|
3596
|
|
POST
|
Have you tried creating a new instance of the Map class and adding a couple of layers to it then exporting it as a jpg image? If that works, then you can add all of the additional code.
... View more
07-13-2011
06:24 AM
|
0
|
0
|
3596
|
| 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
|